Issue
I am trying to code an iFrame to act as a test area in an in-browser HTML/Javascript/CSS IDE in chrome, but I am losing a lot of functionality due to certain bugs, and I was wondering if someone could tell me how to set the .src attribute of the iFrame to a URL with the html Javascript CSS etc code encoded directly in the .src attribute. Don't tell me it can't be done, because I know it can, I just lost the web page where I found this method. Also, as a side note, would it be possible to programmatically force this iFrame to refresh?
Thank you for your time,
Chris
Solution
From my research it looks like this has been deemed a security risk and so is disallowed in all browsers.
MS IE site link excerpt:
Data URIs are supported only for the following elements and/or attributes.
- object (images only)
- img
- input type=image
- link
- CSS declarations that accept a URL, such as background, backgroundImage, and so on.
HTML5 Security Cheatsheet: http://html5sec.org/
Answered By - rushkeldon
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.