W3C home > Mailing lists > Public > public-html@w3.org > December 2007

Fwd: Add an @type attribute on code

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Fri, 7 Dec 2007 18:48:17 -0800
Message-ID: <c9e12660712071848h61f4b90fo357a8a400d540832@mail.gmail.com>
To: "HTML Issue Tracking WG" <public-html@w3.org>

(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

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:51 UTC