summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-21 00:05:05 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-21 00:05:05 +0200
commit61a05da018433899a6991409eb5711bce0a901fb (patch)
tree856cae35089bb270c886316161d7a2303492d00d /toolkit
parenta9fbfba2ada6a6a87eacdd189129ebb0c8ec228a (diff)
downloadUXP-61a05da018433899a6991409eb5711bce0a901fb.tar
UXP-61a05da018433899a6991409eb5711bce0a901fb.tar.gz
UXP-61a05da018433899a6991409eb5711bce0a901fb.tar.lz
UXP-61a05da018433899a6991409eb5711bce0a901fb.tar.xz
UXP-61a05da018433899a6991409eb5711bce0a901fb.zip
Fix reference to undefined property warnings in toolkit's browser.xml.
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/content/widgets/browser.xml9
1 files changed, 5 insertions, 4 deletions
diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml
index e595c847d..a30ff1c43 100644
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -389,10 +389,11 @@
<method name="getTabBrowser">
<body>
<![CDATA[
- var tabBrowser = this.parentNode;
- while (tabBrowser && tabBrowser.localName != "tabbrowser")
- tabBrowser = tabBrowser.parentNode;
- return tabBrowser;
+ for (let node = this.parentNode; node instanceof Element; node = node.parentNode) {
+ if (node.localName == "tabbrowser")
+ return node;
+ }
+ return null;
]]>
</body>
</method>