[Bug 13582] HTML5 suggestion: Elements of HTML section: Scripting and Document Metadata subsections

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13582

T.J. Crowder <tj@crowdersoftware.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://www.w3.org/mid/BLU0- |http://www.w3.org/mid/BLU0-
                   |SMTP1068F87B5E7A69C392B78C9 |SMTP1068F87B5E7A69C392B78C9
                   |8A4C0@phx.gbl               |8A4C0@phx.gbl
                 CC|                            |tj@crowdersoftware.com

--- Comment #1 from T.J. Crowder <tj@crowdersoftware.com> 2011-08-03 05:55:02 UTC ---
Rather than using a separate `library` tag, which causes backward-compatibility
issues, if something like this were to be done I'd recommend doing it with
attributes on the `script` tag, perhaps:

* `library` - The case-insensitive name of the library ("jquery", "dojo",
"prototype", "YUI", etc.). This is the key attribute that triggers the "use
bundled" behavior; it explicitly declares that it's acceptable for the browser
to use its bundled version rather than fetching the given resource (and, of
course, tells it which library to use).

* `modules` - (Optional) If the library is modular, the modules required.

* `minver` - (Optional) The minimum acceptable version.

* `maxver` - (Optional) The maximum acceptable version.

The browser must always supply the latest version of the given library it has
within the given range. 

So for example:

`<script library="jquery" minver="1.5" src="jquery-1.5.2.min.js"></script>`

If the browser's latest is 1.6.2 (note the 6), it supplies that, because no
maxver was given.

Completely backward-compatible, but has the necessary information if browser
vendors start pre-bundling libraries.

-- T.J.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 3 August 2011 05:55:04 UTC