Bug 1439153 - try to fix ESlint failures, CLOSED TREE, r=bustage

This commit is contained in:
Olli Pettay 2018-07-14 06:13:08 +03:00
Родитель de99e4460b
Коммит 5adedd4945
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -6,6 +6,7 @@
<body>
<div id="host">host</div>
<script>
"use strict";
document.getElementById("host").attachShadow({mode: "closed"});
</script>
</body>

Просмотреть файл

@ -14,7 +14,7 @@ const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`;
add_task(async function test_contentscript_shadowDOM() {
const PREFS = {
"dom.webcomponents.shadowdom.enabled": true
"dom.webcomponents.shadowdom.enabled": true,
};
// Set prefs to our initial values.
@ -35,9 +35,9 @@ add_task(async function test_contentscript_shadowDOM() {
}
function contentScript() {
var host = document.getElementById("host");
let host = document.getElementById("host");
browser.test.assertTrue("openOrClosedShadowRoot" in host, "Should have openOrClosedShadowRoot in Element.");
var shadowRoot = host.openOrClosedShadowRoot;
let shadowRoot = host.openOrClosedShadowRoot;
browser.test.assertEq(shadowRoot.mode, "closed", "Should have closed ShadowRoot.");
browser.test.sendMessage("contentScript");
}