- From: Charles Pritchard <chuck@jumis.com>
- Date: Wed, 25 Jan 2012 12:36:19 -0800
On 1/25/12 12:08 PM, whatwg-request at lists.whatwg.org wrote: > 2. We can add the script polyfil in seamlessly - conforming UA's will > ignore internal content, non-conforming UA's will treat it as an > element they should descend into and thus load the required script. > <intent ...> > <!-- Load the polyfill shim --> > <script src="http://webintents.org/webintents.min.js"></script> > </intent> I don't think you can use the fallback content as a method of optionally loading the script tag. The resource is loaded as part of the DOM, the only way to get around that is with <noscript>, which would get awkward. I learned this while exploring <img> content in fallback tags: <canvas><img src="loaded.png" title="this image tag will always be loaded" /></canvas>. This is more typical: if(!self.Intent) document.head.appendChild(document.createElement('script')).src='shimaddress.js'; -Charles
Received on Wednesday, 25 January 2012 12:36:19 UTC