Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Bug 660780: Offer a way to access unwrapped DOM nodes in content scri…
Browse files Browse the repository at this point in the history
…pt r=myk
  • Loading branch information
ochameau committed Jun 16, 2011
1 parent 49de7e6 commit 1ba67c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/api-utils/lib/content/worker.js
Expand Up @@ -194,7 +194,13 @@ const WorkerGlobalScope = AsyncEventEmitter.compose({
});
Object.defineProperties(sandbox, {
window: { get: function() sandbox },
top: { get: function() sandbox }
top: { get: function() sandbox },
// Use the Greasemonkey naming convention to provide access to the
// unwrapped window object so the content script can access document
// JavaScript values.
// NOTE: this functionality is experimental and may change or go away
// at any time!
unsafeWindow: { get: function () window }
});

// Overriding / Injecting some natives into sandbox.
Expand Down

0 comments on commit 1ba67c3

Please sign in to comment.