Re: altering text with javascript
Jim Ley wrote:
[color=blue]
> [...] Thomas 'PointedEars' Lahn [...] wrote:[color=green]
>> Robert wrote:[color=darkred]
>>> 2) There is no need for javascript: in an event handler. Javascript is
>>> assumed in all event handler such as onclick.[/color]
>>
>> No, it is not. In fact, it is only where the default scripting language
>> is J(ava)Script.[/color]
>
> Which is in all user agents that assume a default.[/color]
That is a bold statement. You have tested all user agents in questions, all
versions of them with all OSes on all platforms? If not, you should be
more careful with generalizations like "all".
[color=blue][color=green]
>> <meta http-equiv="Content-Script-Type" content="text/javascript">[/color]
>
> This bogus,[/color]
It is not bogus.
[color=blue]
> and until the HTML WG respond to the comments against it,
> it doesn't even have much weight of standard,[/color]
The exact opposite is true. It has much weight of a standard until there
is an official consensus among the HTML WG that it should be removed from
or altered in the HTML 4.01 Specification:
<http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.2.1>
[color=blue]
> it's certainly not an http-equiv header.[/color]
(There is no "http-equiv" header.) It is true that "Content-Script-Type"
is not an HTTP/1.0 or HTTP/1.1 header, but that does not invalidate the
Recommendation. There is no "text/javascript" MIME media type registered
at IANA, for example, however it is recommended, in this group too, to use
it because there is not a widely supported alternative.
[color=blue][color=green]
>>To workaround this bug, M$ has introduced the abuse of labels in event
>>handler attribute values to specify the scripting language.[/color]
>
> This predates the HTML WG's bogosity.[/color]
That does not matter here.
[color=blue][color=green]
>> However, this only works in IE and is a proprietary approach that should
>> not be pursued on the Web.[/color]
>
> Agreed, but it's harmless,[/color]
It is not. A script engine that does not support labels will yield a syntax
script error here. Since the used script engine is an unknown factor on
the Web, it cannot be recommended to pursue that proprietary approach.
[color=blue]
> [...] but that's just bogus irrelevance.[/color]
(Script) Errors that can be avoided are never irrelevant.
PointedEars
--
No matter who you vote for, government always wins.
Jim Ley wrote:
[color=blue]
> [...] Thomas 'PointedEars' Lahn [...] wrote:[color=green]
>> Robert wrote:[color=darkred]
>>> 2) There is no need for javascript: in an event handler. Javascript is
>>> assumed in all event handler such as onclick.[/color]
>>
>> No, it is not. In fact, it is only where the default scripting language
>> is J(ava)Script.[/color]
>
> Which is in all user agents that assume a default.[/color]
That is a bold statement. You have tested all user agents in questions, all
versions of them with all OSes on all platforms? If not, you should be
more careful with generalizations like "all".
[color=blue][color=green]
>> <meta http-equiv="Content-Script-Type" content="text/javascript">[/color]
>
> This bogus,[/color]
It is not bogus.
[color=blue]
> and until the HTML WG respond to the comments against it,
> it doesn't even have much weight of standard,[/color]
The exact opposite is true. It has much weight of a standard until there
is an official consensus among the HTML WG that it should be removed from
or altered in the HTML 4.01 Specification:
<http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.2.1>
[color=blue]
> it's certainly not an http-equiv header.[/color]
(There is no "http-equiv" header.) It is true that "Content-Script-Type"
is not an HTTP/1.0 or HTTP/1.1 header, but that does not invalidate the
Recommendation. There is no "text/javascript" MIME media type registered
at IANA, for example, however it is recommended, in this group too, to use
it because there is not a widely supported alternative.
[color=blue][color=green]
>>To workaround this bug, M$ has introduced the abuse of labels in event
>>handler attribute values to specify the scripting language.[/color]
>
> This predates the HTML WG's bogosity.[/color]
That does not matter here.
[color=blue][color=green]
>> However, this only works in IE and is a proprietary approach that should
>> not be pursued on the Web.[/color]
>
> Agreed, but it's harmless,[/color]
It is not. A script engine that does not support labels will yield a syntax
script error here. Since the used script engine is an unknown factor on
the Web, it cannot be recommended to pursue that proprietary approach.
[color=blue]
> [...] but that's just bogus irrelevance.[/color]
(Script) Errors that can be avoided are never irrelevant.
PointedEars
--
No matter who you vote for, government always wins.
Comment