forked from mirrors/gecko-dev
Bug 1771152 - Use documentElement.closest r=sgalich
mutation.target is HTMLDocument, which doesn't have closest function. This patch uses mutation.target.documentElement instead. Differential Revision: https://phabricator.services.mozilla.com/D147294
This commit is contained in:
parent
57597b3ce3
commit
23a28dbccb
1 changed files with 4 additions and 1 deletions
|
|
@ -41,7 +41,10 @@ CONTENT_WIN.addEventListener("DOMContentLoaded", function onDCL(evt) {
|
|||
|
||||
case "childList": {
|
||||
// We really only care about elements appending inside pages.
|
||||
if (!mutation.addedNodes || !mutation.target.closest(".page")) {
|
||||
if (
|
||||
!mutation.addedNodes ||
|
||||
!mutation.target.documentElement.closest(".page")
|
||||
) {
|
||||
break;
|
||||
}
|
||||
FormAutofillUtils.localizeMarkup(mutation.target);
|
||||
|
|
|
|||
Loading…
Reference in a new issue