NotSupportedError: 'conversation-browser' has already been defined as a custom element
Categories
(Chat Core :: General, defect)
Tracking
(Not tracked)
People
(Reporter: clokep, Unassigned)
Details
Attachments
(1 file)
1.53 KB,
patch
|
Details | Diff | Splinter Review |
Building on tip (40da1ce45af3) I'm getting the following error whenever I select a conversation:
JavaScript error: chrome://chat/content/conversation-browser.js, line 851: NotSupportedError: 'conversation-browser' has already been defined as a custom element
I don't see this on TB70b4, so I think it is a new error.
Comment 1•5 years ago
|
||
Will be fixed in bug 1590074 comment #4.
Comment 2•5 years ago
|
||
Oops, I should have read bug 1590074 comment #4 better which says:
The error of "NotSupportedError: 'conversation-browser' has already been defined as a custom element" seen on the preferences page is not related to this. That is due to the overlay loader and creation of a duplicate about:preferences document.
Updated•5 years ago
|
Reporter | ||
Comment 3•5 years ago
|
||
Magnus -- I'm unsure if the cause of this is the same as bug 1590047, but could the fix also get applied to the conversation-browser element?
Comment 5•5 years ago
|
||
I'm not sure exactly why this happens. It's due to that we get document-element-inserted for chrome://chat/content/conv.html loading (first) and then document-element-inserted for chrome://messenger/content/messenger.xul which will already have the CEs set up. I don't see why it has them, and perhaps there is a bug further down somewhere. Brian, any ideas?
The reason it didn't happen before 1590074 was that "text/html" docs weren't getting CEs loaded.
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Shouldn't you early return if window.MozXULElement
at the top of your customElements.js file (https://searchfox.org/comm-central/rev/2268dc26e059e6efdc606b0246bed2875120f53b/mail/base/content/customElements.js#10), just like we do with https://searchfox.org/mozilla-central/rev/8a63fc190b39ed6951abb4aef4a56487a43962bc/toolkit/content/customElements.js#14-19. Then you could drop the if (!window.MozXULElement)
condition wrapping the subscript load to the toolkit customElements.js, and more importantly you wouldn't re-load your custom elements a second time.
Comment 7•3 years ago
|
||
I'm getting a slightly different error:
Uncaught DOMException: CustomElementRegistry.define: 'conversation-browser' has already been defined as a custom element conversation-browser.js:845
<anonymous> chrome://chat/content/conversation-browser.js:845
<anonymous> chrome://messenger/content/customElements.js:34
<anonymous> chrome://messenger/content/customElements.js:37
openWindowPrompt resource:///actors/PromptParent.jsm:161
receiveMessage resource:///actors/PromptParent.jsm:108
openPrompt resource://gre/modules/Prompter.jsm:1246
openPromptSync resource://gre/modules/Prompter.jsm:1105
confirmEx resource://gre/modules/Prompter.jsm:1529
confirmEx resource://gre/modules/Prompter.jsm:305
ComposeCanClose chrome://messenger/content/messengercompose/MsgComposeCommands.js:6142
<anonymous> chrome://messenger/content/messengercompose/MsgComposeCommands.js:214
is it the same issue this bug is about, or is it something different?
Updated•2 years ago
|
Comment 8•2 years ago
|
||
Ping?
Updated•1 year ago
|
Description
•