Closed
Bug 1504479
Opened 6 years ago
Closed 6 years ago
Drop second unwrapping argument to ChromeUtils.import
Categories
(Remote Protocol :: Marionette, enhancement, P1)
Remote Protocol
Marionette
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: ato, Assigned: ato)
Details
Attachments
(1 obsolete file)
When we were previously using Cu.import, we had to pass a second argument {} to which to temporarily assign the imported object. We would then destructure this to just the symbols we’d need: > const {Foo} = Cu.import("somemodule.js", {}); With ChromeUtils.import we can drop the second argument, which looks more similar to how ES modules work: > const {Foo} = Cu.import("somemodule.js");
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: -- → P1
Assignee | ||
Comment 1•6 years ago
|
||
The second assignment argument was previously needed with Cu.import as a way to temporarily assign an imported object so only certain symbols on it would be imported into the scope. With ChromeUtils.import the second argument is no longer required.
Assignee | ||
Comment 2•6 years ago
|
||
OK, according to the Phabricator linter I was wrong about this.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Updated•6 years ago
|
Attachment #9022412 -
Attachment is obsolete: true
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•