Closed Bug 1455968 Opened 8 years ago Closed 8 years ago

Components.utils is unavailable in a content script

Categories

(Core :: XPConnect, defect)

59 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: angelore.main, Unassigned)

Details

(Keywords: dev-doc-complete)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20180323154952 Steps to reproduce: As specified here: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Xray_vision I have used Components.utils.waiveXrays(window.wrappedJSObject.GlobalObject).Foo() in a content script. Foo is a function added via prototyping. Actual results: TypeError: Components.utils is undefined. Expected results: I have expected to see the unwrapped object with the prototyped properties available.
Component: Untriaged → XPConnect
Product: Firefox → Core
:mixedpuppy, do you happen to know if this is applicable to webextensions?
Flags: needinfo?(mixedpuppy)
Components is not available to extensions, the docs should be updated.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(mixedpuppy)
Keywords: dev-doc-needed
Resolution: --- → INVALID
(In reply to Shane Caraveo (:mixedpuppy) from comment #2) > Components is not available to extensions, the docs should be updated. Sorry if this is off-topic, but is there another way for extensions to access prototyped page script object fields then?
I've added a note to the cited doc to say this is not available to webext, but is there something else that needs to be updated, to your knowledge?
You need to log in before you can comment on or make changes to this bug.