WebComponents in WebExtension content script are initialized as base class
Categories
(WebExtensions :: Frontend, defect)
Tracking
(Not tracked)
People
(Reporter: chaoskeeper, Unassigned)
Details
Attachments
(1 file)
2.16 KB,
application/zip
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
Make basic WebExtension, take e.g. https://github.com/mdn/web-components-examples/blob/cda194a19156611a9cf636e1caac5dfcf488e8e3/editable-list/main.js as content script, add document.createElement('editable-list')
after define()
.
(see example.zip
)
Actual results:
EditableList.constructor()
called with this.constructor === HTMLElement
and missing all methods (i.e. they are undefined
) defined in EditableList
Expected results:
Same thing as when file loaded directly into page: i.e. constructor called with this.constructor === EditableList
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
|
||
I investigated this issue a bit this morning, it is definitely an additional side-effect of registering a custom element from a content script sandbox, which is already being tracked by Bug 1492002 (and so I'm closing this as a duplicate of the existing bug, and I'm going to update the minimal test case attached to that issue and to add some details from the investigation I did today).
Description
•