Ability to inject: evaluate code in the context of a page #132

Open
lloyd opened this Issue Jun 14, 2011 · 0 comments

Comments

Projects
None yet
1 participant
@lloyd
Contributor

lloyd commented Jun 14, 2011

If application code could evaluate arbitrary javascript in the context of a page it would be the last tool needed to allow full mashups. This should be fairly easy to do, and I suggest the function be called eval and be hung off the web-content module.

So for instance, updating the document title could be done thus:

require(`web-content`).eval(document.getElementById('theIFrame'), function() { document.title = "untitled"; });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment