These bits of code are stripped away from the final document, in the editor view, and when the Pen is viewed as a thumbnail in the grid. Nothing is stripped in Debug View though, if you need to test your code without any interference.
- Meta refresh tags, for example:
<meta http-equiv="refresh" content="5; url=http://example.com/">
- Autofocus (in the Editor View). This would would pull the focus away from the editors as you were trying to work.
location.reload()
There are also some keywords that we strip when running preprocessors like Haml, Slim, or Jade. If we strip from those, we’ll tell you with an inline error message in the editor itself.
Grid View and Screenshots
The “Grid” view is the the thumbnail preview of your Pen. Screenshots are the static image we generate of your Pen.
iframes
This is to prevent sound leaks and some other unpleasant issues iframes can create in the grid view.
alert(), confirm(), and prompt() dialogs
These create popups, so we strip them from code and markup in the grid view and screenshots.
The keyword “download”
The keyword download
is stripped from the grid view to help prevent forced file downloads.