I see. Unfortunately, some browser developers (e.g. MS) don't see the
specifications as firm rules.
Not exactly, that is correct. Like innerHTML, the innerHTML replacement
implementation only needs to provide something that resembles the original
markup enough for it to work; in the case of the replacement that means that
it needs to be consistent in one user agent, and interoperable among user
agents if possible.
Interoperability through consistency is the point.
`innerHTML' does not give "a clear view of the underlying document" either.
That's the point. My example is a replacement that does. As
mentioned, if the innerHTML were standardized to the point of
interoperability, this would be a moot point.
But it does not need to nor would it appear that it was supposed to.
See directly above.
[...] If you want to serialize something like this:-
<div id="test"></div>
...you don't normally want this:-
<div id="test" maxlength="1234567" tabindex="0" ... ></div>
Typo. That was supposed to be an INPUT example.
The default values for `maxLength' and `tabIndex' are -1 and 0 in a Gecko-
based browser.
So?
Obviously the former (or the value 0) does not make sense so
it can be safely ignored for serialization.
The latter? How do you figure a default tab index of 0 makes no
sense? It makes perfect sense to me.
Per HTML 4.01, it only needs to
be considered for type="text" or type="password" anyway.
That illustrates just how old that spec is. It was just the starting
point. Obviously if you ignored tab index for all but text and
password inputs today, you would miss a lot of significant
information.
As for the latter, if one were to avoid the attribute specification, whenin
doubt hasAttribute() or getAttribute() can be called for comparison.
Not sure what you mean about avoiding the attribute specification. As
for hasAttribute, that was introduced by MS in IE8 (standards mode
only). And, as I hope we all know by _now_ (two years since this
subject was brought up and beaten to death), get/set/removeAttribute
are all screwy in IE < 8 (and IE8 compatibility mode). So what are
you saying?
For a "Real World" example, at the recent jQuery attribute summit,
somebody pointed out that jQuery UI uses these DOM methods
(sparingly), but calls jQuery's odd assortment of "wrappers" more
often.
"47 occurrences of .attr() (a mix of string and object argument
syntaxes) and 12 .removeAttr()'s"
What does that tell you? It was determined by the panel that:-
"jQuery UI is more then expected to work browser independently, its
implied by its use."
I wouldn't expect their cunning plan to work any bettter than whatever
it is you mean by using has/getAttribute "when in doubt". My position
is there shouldn't be any real doubt about these methods at this
point.
Look, I am not to guess your thoughts; you will have to tell them or
consider your "argument" discarded.
Discard at will. Like I said, never mind custom attributes.
Obviously, we are talking about the standard ones.
Unfortunately, your "examples" are too general to be useful in a discussion.
That's your opinion.
I do not want to read that whole mostly full-quoted thread and sieve your
possible points out of it.
Okay.
If you want to prove something, prove it here.
I'm not trying to prove anything.
If you do not want to repeat yourself too much, you can support the argument
with a Message-ID to one of your postings.
Thanks.
Name them. And no more commonplace examples, please.
What do you consider commonplace?
Their problem.
Exactly.
You argument is too general to be useful, again.
I don't see that at all.
It was a rhetorical question. Most certainly the answer is yes.
I don't see that either. I say no.
Those two Specifications are the lowest common denominator.
You could still include custom attributes in a serialization. I'm not
saying it would be particularly useful though.
No, but I have debugged one. Get to the point, please.
I made the point about the editor.
I will look into it if and when I find the time. Until then, I will
continue writing my own.
Look into what? There are some related wrappers in My Library (e.g.
getElementHtml, getElementOuterHtml).
I don't follow that.
Well, then perhaps you haven't considered what goes into it. Think
about it.
I use it to retrieve elements by type identifier or attribute or ancestor-
descendant relationship. Aside from the `class' attribute in (X)HTML, CSS
does not even enter into my considerations.
Okay.
This is not a guessing game. Get to the point, please.
How would you duplicate any or all of those XPath tasks in IE?
Well, I'm not.
So, what are you talking about then?
At this point, that's my line.
And try to keep your quotes short, would you, please?
Sure.