Fwd: Add an @type attribute on code

(back to list...)
---------- Forwarded message ----------
From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Dec 7, 2007 6:46 PM
Subject: Re: Add an @type attribute on code
To: Olivier GENDRIN <olivier.gendrin@gmail.com>


On 12/7/07, Olivier GENDRIN <olivier.gendrin@gmail.com> wrote:
>
> Hi WG !
>
> I wondered this night that code should have a kind of @type attribute.
> It would be a hook for specialised search engines or for specific code
> color rendering displays in UA.
>
What about:

<script type="text/monkeyscript" disabled="disabled">
// your script text
</script>

This would offer the ability to have a disabled script render as just text;

script [type=text/monkeyscript] {
  display: block;
  visibility: visible;
  font-family: monaco, monospace;
}

This CSS works in Firefox (all the way back to pre 1.0 Mozilla). It's
searchable by search engines, and you can select monkeyscript with a
css attribute selector.

It keeps compatibility with current script tag.

It would also be useful to enable the script:

var context = document.body;
document.getElementById("myscript").execute( context );

This does not, unfortunately, address the current security problems
with inserting an executable, yet untrusted script onto a page.

Garrett

> --
> Olivier G.
> http://www.lespacedunmatin.info/blog/
>
>


--
Monkey, so they say, is the root of all people today.


-- 
Monkey, so they say, is the root of all people today.

Received on Saturday, 8 December 2007 02:48:32 UTC