浏览代码

Add a lang attribute on the tac root div

Amauri CHAMPEAUX 3 年之前
父节点
当前提交
a470a4be59
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tarteaucitron.js

+ 4 - 0
tarteaucitron.js

@@ -529,6 +529,8 @@ var tarteaucitron = {
                             // Append tarteaucitron: #tarteaucitronRoot last-child of the body
                             body.appendChild(div, body);
                         }
+
+                        div.setAttribute('lang', language);
                         div.innerHTML = html;
 
                         //ie compatibility
@@ -612,6 +614,8 @@ var tarteaucitron = {
                                 // Append tarteaucitron: #tarteaucitronRoot last-child of the body
                                 body.appendChild(div, body);
                             }
+
+                            div.setAttribute('lang', language);
                             div.innerHTML = html;
                         }
                     }, 1500);