Bug 1506237 - Delay search-one-offs connectedCallback;r=dao

It's best practice in chrome to not run code in the connectedCallback during parse
(see the comment above MozXULElement.delayConnectedCallback).

Differential Revision: https://phabricator.services.mozilla.com/D11520

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Grinstead 2018-11-09 20:55:09 +00:00
parent 5a22a68c3c
commit 0923cb852c

View File

@ -183,8 +183,11 @@ class MozSearchOneOffs extends MozXULElement {
}
connectedCallback() {
this.appendChild(
MozXULElement.parseXULToFragment(`
if (this.delayConnectedCallback()) {
return;
}
this.appendChild(MozXULElement.parseXULToFragment(`
<deck class="search-panel-one-offs-header search-panel-header search-panel-current-input">
<label class="searchbar-oneoffheader-search" value="&searchWithHeader.label;"></label>
<hbox class="search-panel-searchforwith search-panel-current-input">