(In reply to Magnus Melin [:mkmelin] from comment #3) > ::: mailnews/base/search/content/searchWidgets.js > @@ +1038,5 @@ > > + */ > > + class MozRuleactiontypeMenulist extends customElements.get("menulist") { > > + connectedCallback() { > > + super.connectedCallback(); > > + if (this.delayConnectedCallback()) { > > should protect against being run more than once, so add this.hasChildNodes() We are not inserting element in connected callback, the child elements are inserted in the XUL file only. So When connectedCallback will run, there will be child elements in the menulist. Any other to prevent connected callback for running 2nd time?
Bug 1546301 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Magnus Melin [:mkmelin] from comment #3) > should protect against being run more than once, so add this.hasChildNodes() We are not inserting the elements in the connected callback, the child elements are inserted in the XUL file only. So When connectedCallback will run, there will be child elements in the menulist. Any other to prevent connected callback for running 2nd time?