diff options
Diffstat (limited to 'toolkit/content/widgets')
-rw-r--r-- | toolkit/content/widgets/browser.xml | 9 |
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> |