[whatwg] HTML 5 Script Tag
Ian Hickson
ian at hixie.ch
Sat Aug 22 00:23:11 PDT 2009
On Fri, 14 Aug 2009, Markus Ernst wrote:
>
> The favored example:
>
> <link rel="script" type="text/javascript" href="script.js">
>
> would actually not break pages in legacy browsers, unless their
> functionality depends on the script. They would just not find and thus
> not execute the script, and possibly throw "function does not exist"
> errors.
>
> Authors are encouraged to code web pages in a way that the functionality
> is provided, or at least degrades nicely, in no-script environments. So
> I assume that a properly coded page would work or degrade nicely in
> legacy browsers with the <link> syntax. Anyway I am not sure about this,
> as I am aware of the fact that a missing script file is not the same as
> a user agent without script execution. At least the following example
> would work in Firefox - if the foo() function is not defined,
> otherpage.php will be called:
>
> <a href="otherpage.php" onClick="return foo()">Click here</a>
We could indeed add a new feature in this way. However, we're trying to
limit the number of redundant features we add, because each such feature
increases the complexity of the platform overall.
On Fri, 14 Aug 2009, Cready, James wrote:
> >
> > Generally speaking I think we should avoid making the platform have
> > too many redundant features, however illogical some of them might be.
>
> <article> == <section> == <div>
These are not the same.
> <aside> == <details> == <figure>
These are really not the same.
> <i> == <em>
> <b> == <strong>
> <span> == <mark>
These are again veeeeery different.
> <caption> == <legend> (if it was allowed inside <table>)
These are close to the same, and they're not alone in being rather
redundant -- <th>, <h1>, <label>, etc. (This is why I'd really rather not
have to introduce another <legend>, despite the problems with <figure>.)
This is something we're trying to avoid.
> > I agree that some people expect this. I don't think that making it
> > work with exactly one element and dependent on the presence of an
> > attribute is the way to improve this situation, however.
>
> It already works this way. The browser ignores everything inside the
> <script> tag the moment you put these three letters inside the brackets:
> "src"
You still can't omit the </script>, though. That's what I meant.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list