Closed Bug 1614251 Opened 5 years ago Closed 5 years ago

WebComponents in WebExtension content script are initialized as base class

Categories

(WebExtensions :: Frontend, defect)

73 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1492002

People

(Reporter: chaoskeeper, Unassigned)

Details

Attachments

(1 file)

Attached file example.zip

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

Component: Untriaged → Frontend
Product: Firefox → WebExtensions
Flags: needinfo?(lgreco)

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).

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(lgreco)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: