- From: mozer <xmlizer@gmail.com>
- Date: Sat, 28 Jul 2007 09:16:49 +0200
- To: "Travis Leithead" <travil@windows.microsoft.com>
- Cc: public-webapi@w3.org, ian@hixie.ch, bjoern@hoehrmann.de, "Chris Wilson" <chris.wilson@microsoft.com>
Sorry, if I miss the point (see below)
On 7/27/07, Travis Leithead <travil@windows.microsoft.com> wrote:
>
>
>
> In light of the DOM Core L3 Second Edition...
>
>
>
> We happened to notice an interesting behavior difference in
> removeAttributeNode recently, and an appeal to the standard didn't seem to
> help...
>
>
>
> <html>
>
> <head>
>
> <script type=text/javascript>
>
> function doFoo()
>
> {
>
> var pElem = document.getElementById('foo');
>
> var newAttr = document.createAttribute('align');
Isn'it pElem.createAttribute('align') ?
>
> // To illustrate that these are not the same attribute
> exactly...
>
> newAttr.value = "right";
>
> try {
>
> var oldAttr = pElem.removeAttributeNode(newAttr);
>
> alert(oldAttr.value + ": command successful");
>
> } catch (e) {
>
> alert("removeAttributeNode failed with message: " +
> e.message);
>
> }
>
> }
>
> </script>
>
> </head>
>
> <body onload="doFoo()">
>
> <p id="foo" align="left">Sample text</p>
>
> </body>
>
> </html>
>
>
>
> IE fails in this example and triggers the try/catch. FF works, Opera also
> fails. It seems that some browser implementers deciphered the DOM Core
> spec::removeAttributeNode to mean that "object" comparison is used as the
> delete criteria, but others seem to only base it on the "name" of the Attr.
>
>
>
> Is there hope in coming to harmony across implementations on this point? Or
> how should the spec be interpreted?
>
>
>
> -Travis Leithead
>
> MS Windows Internet Explorer
Regards,
Xmlizer
Received on Saturday, 28 July 2007 07:17:01 UTC