W3C home > Mailing lists > Public > public-html-comments@w3.org > July 2011

HTML5 suggestion: Elements of HTML section: Scripting and Document Metadata subsections

From: Andrew Martin <andrew@martinone.co.uk>
Date: Thu, 21 Jul 2011 00:12:35 +0100
Message-ID: <BLU0-SMTP1068F87B5E7A69C392B78C98A4C0@phx.gbl>
To: public-html-comments@w3.org
When using JavaScript libraries such as jQuery or MooTools, they currently need to be called from another file using an empty <script></script> element. It is not currently possible, however, for a browser to have such libraries pre-installed.

I would like to suggest the introduction of an empty <library> (<library /> in XHTML) containing the attributes:
name (required) - the library's name. Case insensitive.
minvers - the minimum version required
maxvers - the maximum version required
src - the URL of the library, if a suitable version isn't pre-installed, similar to <script>
type - just like <script>, the MIME type of the library. Defaults to "text/javascript".

For example, jQuery (at least 1.4) could be called using:
<library name="jquery" minvers="1.4" src="jquery-1.6.2.min.js" />

Andrew Martin
Received on Saturday, 23 July 2011 15:05:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:27 UTC