[whatwg] Inline SVG
Alexey Feldgendler
alexey at feldgendler.ru
Sat Dec 9 09:35:19 PST 2006
On Sat, 09 Dec 2006 19:54:29 +0600, Michel Fortin
<michel.fortin at michelf.com> wrote:
> You'd need a JavaScript fallback in addition to noscript, something like
> this:
>
> <script type="text/xml" id="a">
> <xml-element/>
> </script>
> <noscript id="b">
> fallback content
> </noscript>
> <script type="text/javascript">
> if (/* browser does not support XML scripts */) {
> if (/* has some javascript XML parser library */) {
> parserLibrary.parseAndInsertXML(getElementById("a").textContent);
> } else {
> document.write(getElementById("b").textContent);
> }
> }
> </script>
>
> It could also be an external script that justs search the document for a
> particular class of <noscript> element once the document is loaded.
I'm afraid that <noscript> doesn't end up in DOM when scripting is enabled.
--
Alexey Feldgendler <alexey at feldgendler.ru>
[ICQ: 115226275] http://feldgendler.livejournal.com
More information about the whatwg
mailing list