{"_id":"srcdoc-polyfill","_rev":"4-49c5aa94f5f60533508159588f1a08cc","name":"srcdoc-polyfill","description":"A shim for the iFrame \"srcdoc\" attribute","dist-tags":{"latest":"1.0.0"},"versions":{"0.2.0":{"name":"srcdoc-polyfill","version":"0.2.0","description":"A shim for the iFrame \"srcdoc\" attribute","main":"srcdoc-polyfill.js","directories":{"test":"test"},"scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/jugglinmike/srcdoc-polyfill.git"},"keywords":["html5","polyfill","iframe"],"author":{"name":"Mike Pennisi"},"license":"MIT","devDependencies":{"grunt":"~0.4.0","grunt-browserify":"~4.0.1","grunt-contrib-connect":"~0.11.2","grunt-contrib-jshint":"~0.11.3","grunt-contrib-qunit":"~0.2.0","grunt-contrib-uglify":"~0.9.2","qunitjs":"~1.19.0","requirejs":"~2.1.20"},"gitHead":"81525b0c846fe6a80c841388a84fdacb94d210bc","bugs":{"url":"https://github.com/jugglinmike/srcdoc-polyfill/issues"},"homepage":"https://github.com/jugglinmike/srcdoc-polyfill#readme","_id":"srcdoc-polyfill@0.2.0","_shasum":"097ed1ebaae0e55e80a4b889192bd42ff17c7851","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"jugglinmike","email":"mike@mikepennisi.com"},"maintainers":[{"name":"jugglinmike","email":"mike@mikepennisi.com"}],"dist":{"shasum":"097ed1ebaae0e55e80a4b889192bd42ff17c7851","tarball":"https://registry.npmjs.org/srcdoc-polyfill/-/srcdoc-polyfill-0.2.0.tgz","integrity":"sha512-OgOWTJNu/EZArwJgPcvRiPRiClS0YxSDzlsOCu+d9WWcF4UrUvq/F9zgt8CeSznfFpTN8WwP7uawJ+wKBj7QgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5RnvouGPYvSC7HmaUX1yk8E4okj3Nj2cwBApZLbrTVAiAKnbjpYGAvkIpqLAHlzyCTlKDvyJNy3JXOLznvTSPb0g=="}]}},"1.0.0":{"name":"srcdoc-polyfill","version":"1.0.0","description":"A shim for the iFrame \"srcdoc\" attribute","main":"srcdoc-polyfill.js","directories":{"test":"test"},"scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/jugglinmike/srcdoc-polyfill.git"},"keywords":["html5","polyfill","iframe"],"author":{"name":"Mike Pennisi"},"license":"MIT","devDependencies":{"grunt":"~0.4.0","grunt-browserify":"~4.0.1","grunt-contrib-connect":"~0.11.2","grunt-contrib-jshint":"~0.11.3","grunt-contrib-qunit":"~1.2.0","grunt-contrib-uglify":"~0.9.2","qunitjs":"~1.19.0","requirejs":"~2.1.20"},"gitHead":"af5a41ca819ceeb77bf6ee7aaf152d987b8aab92","bugs":{"url":"https://github.com/jugglinmike/srcdoc-polyfill/issues"},"homepage":"https://github.com/jugglinmike/srcdoc-polyfill#readme","_id":"srcdoc-polyfill@1.0.0","_shasum":"81b6d79131f33231ea0f205c9236be90e9aca718","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.1","_npmUser":{"name":"jugglinmike","email":"mike@mikepennisi.com"},"maintainers":[{"name":"jugglinmike","email":"mike@mikepennisi.com"}],"dist":{"shasum":"81b6d79131f33231ea0f205c9236be90e9aca718","tarball":"https://registry.npmjs.org/srcdoc-polyfill/-/srcdoc-polyfill-1.0.0.tgz","integrity":"sha512-DS9fuUZvW0iM5OkSUpKtH7PxmaJ14fuU2U+U5zQl/KWyusKyOxLineIu1yxUb8jppbWN7b6rcEnVXb+LW6Sx0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIBp0fPRsLD7HDqO0xFhhUT8AjL9Jm41cc1npK6YseaQIhAL38rcxIx4GI1h0Jijf8w4fbX/R942FSkVt3dt4FMCGL"}]},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/srcdoc-polyfill-1.0.0.tgz_1485723256873_0.9180942222010344"}}},"readme":"# `srcdoc` polyfill [![Build Status](https://travis-ci.org/jugglinmike/srcdoc-polyfill.svg)](https://travis-ci.org/jugglinmike/srcdoc-polyfill)\n\nHTML5 defines a new attribute for iFrames named\t`srcdoc`. This attribute allows\ndevelopers to specify an iFrame's content in-line with the iFrame itself. For\ninstance:\n\n\t<iframe srcdoc=\"<html><body>Hello, <b>world</b>.</body></html>\"></iframe>\n\nThis feature only began to see adoption in major browsers in early 2013.\nFortunately, most older browsers support similar functionality through\nscript-targeted URLs, i.e.\n\n\t<iframe src=\"javascript: '<html><body>Hello, <b>world</b>.</body></html>'\"></iframe>\n\n(Because of limitations on URL length, the actual mechanism that the polyfill\nimplements not quite this direct.)\n\nFor more on `srcdoc`, see [the WhatWG specification](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-srcdoc) and [this post on\nBocoup.com](http://weblog.bocoup.com/third-party-javascript-development-future/).\n\n## Usage\n\nBy including the script at the bottom of the document `<body>`, any available\niFrames which declare a `srcdoc` attribute attribute) will receive this\n\"shimmed\" behavior. (In browsers that already implement this functionality, no\nchange will take place.)\n\n**Note on [the HTML5 `sandbox`\nattribute](https://html.spec.whatwg.org/multipage/embedded-content.html#attr-iframe-sandbox):**\nBecause the shim operates using a script-targeted URL in legacy environments,\nsome configurations of the `sandbox` attribute may interfere with its behavior.\nThis issue will only surface in environments that implement `sandbox` but that\ndo *not* implement `srcdoc`. Because of this, this polyfill's default behavior\nis to issue a warning for potentially-hazardous configurations but to proceed\noptimistically. The API supports an `force` option that enables modification of\nthis behavior.\n\n## Executing\n\nThis script may be consumed as a AMD module, a CommonJS module, or standalone\nvia direct inclusion with a `<script>` element.\n\n## API\n\nThe shim also defines a minimal JavaScript API:\n\n* `srcDoc.set( iframe [, content [, options ] ] )` - sets the content of the\n  provided iFrame element using the `srcdoc` attribute where available (falling\n  back on a script-targeted URL in non-supporting browsers).\n  * `content` (optional) - The desired content of the iFrame. If blank, the\n    current value of the element's `srcdoc` attribute will be referenced for\n    content.\n  * `options` (optional) - An object used to specify low-level behavior.\n    Supports a single attribute, `force`, for controlling behavior in the\n    presence of the `sandbox` attribute (see the note in \"Usage\" section of\n    this document).\n    * If unspecified, a warning will be issued and the library will attempt to\n      shim the `srcdoc` behavior optimistically.\n    * If `true`, then the target iFrame's `sandbox` attribute will be removed\n      prior to setting the content. Note that this\n    * If `false`, no warning will be issued and the library will attempt to\n      shim the `srcdoc` behavior optimistically.\n* `srcDoc.noConflict()` - Sets the value of the global `srcDoc` variable to its\n  original value. Returns the `srcDoc` object defined by this project for\n  re-aliasing.\n\n## Browser Support\n\nTested in the following browsers:\n\n* Microsoft Internet Explorer\n  * 6, 7, 8, 9, 10, 11\n* Microsoft Edge\n  * 13, 14\n* Apple Safari\n  * 4, 5.0, 5.1, 6, 6.2, 7.1, 8, 9.1, 10\n* Google Chrome\n  * 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24.0.1312.5 (beta), 25.0.1364.5\n    (dev), 55\n* Opera\n  * 11.1, 11.5, 11.6, 12.10, 12.11 (beta), 42\n* Mozilla FireFox\n  * 3.0, 3.6, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 (beta), 50\n\nThe following browsers are *not* supported:\n\n* Opera 10.0\n\n## Building\n\nThe build process for this project is written with\n[Grunt.js](http://gruntjs.com). Please refer to the grunt documentation for\ndetails on installing grunt.\n\n## Tests\n\nThe shim's tests are written in QUnit, and can be run by visiting the\n`test/index.html` file in the browser, or by running `grunt test` from the\ncommand line.\n\n## Release Notes\n\n- `1.0.0` (2017-01-29)\n  - Warn in the presence of the `sandbox` attribute if its value may cause\n    issues in environments that support it\n- `0.2.0` (2015-10-02)\n  - Wrap in \"UMD\" pattern, enabling more natural consumption from CommonJS and\n    AMD environments\n- `0.1.1` (2013-03-01)\n  - Allow content length to exceed the limit browsers impose on URLs\n- `0.1.0` (2012-06-13)\n  - Initial release\n\n## License\n\nCopyright (c) 2012 Mike Pennisi  \nLicensed under the MIT license.\n","maintainers":[{"name":"jugglinmike","email":"mike@mikepennisi.com"}],"time":{"modified":"2022-06-26T23:23:44.935Z","created":"2015-10-02T20:16:11.412Z","0.2.0":"2015-10-02T20:16:11.412Z","1.0.0":"2017-01-29T20:54:17.429Z"},"homepage":"https://github.com/jugglinmike/srcdoc-polyfill#readme","keywords":["html5","polyfill","iframe"],"repository":{"type":"git","url":"git+https://github.com/jugglinmike/srcdoc-polyfill.git"},"author":{"name":"Mike Pennisi"},"bugs":{"url":"https://github.com/jugglinmike/srcdoc-polyfill/issues"},"license":"MIT","readmeFilename":"readme.md"}