From: Garrett Smith on
On 6/12/2010 3:23 PM, David Mark wrote:
> On Jun 10, 6:59 pm, Garrett Smith<dhtmlkitc...(a)gmail.com> wrote:
>> On 6/9/2010 12:02 PM, David Mark wrote:
>>

[...]

>
> As I've said, nothing is guaranteed. You've found a bug in IE6/7
> where setting the bottom and/or right style of a relatively positioned
> LI does not update the offsetLeft/Top (ever apparently). Such results
> are easy enough to detect and disallow. Or I may just add an issues
> section (this is the first one in ten years).
>

It requires more investigation as to why the result got that way. i know
you don't like me to say it, but writing tests really helps. As stated,
I started on a test runner. The code is pretty simple. You could finish
it off and use it for testing this.

> Thanks for your input.
>
> On a related note, how are you coming on your quest to find out where
> my other (somewhat related) inventions (e.g. injecting, manipulating
> and measuring DIV's in one-off feature testing) came from?
>

I actually came up with the idea on my own in "Find Element Position"
thread. You posted the idea, but I'd already started on that.

I may not have been the first who had invented the idea. We covered in
that thread why it is best to use node.insertBefore(x, node.firstChild)
and not appendChild, because that way it avoids the "operation aborted".

Other attempts to append nodes to documentElement were subsequently
proposed, and, oddly, those seemed to be more popular. Oddly because
they can be expected to throw the dom exception related to invalid
hierarchy, as specified in DOM 2 core. And in versions of some browsers,
it has been reported (older Mozillas and even recent Konq).

http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx

Gerard Talbot claims that even Konq 4 throws errors and I believe that.
Older versions of konq reportedly did so, as well, and according to DOM2
core, the error is to be expected.

Well, that IE blog post is not great, but it's a good sign in the right
direction and a lot better than what Apple, Google, and Yahoo are doing.
All three of those screen out "invalid" browsers based on the userAgent
sniffing. If you don't have the right userAgent, you get either a buggy
page, an error warning or redirected to their error page.

I have not had time to reply to all of the other posts and I started
working on a "recursive" regexp for trying to validate the JSON plus an
article on another topic. So, I'm going to follow up on replies but I
have a lot of things going on, including activities with people; not on
the Internet.

Garrett
From: David Mark on
On Jun 12, 11:22 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
> On 6/12/2010 3:23 PM, David Mark wrote:
>
> > On Jun 10, 6:59 pm, Garrett Smith<dhtmlkitc...(a)gmail.com>  wrote:
> >> On 6/9/2010 12:02 PM, David Mark wrote:
>
> [...]
>
>
>
> > As I've said, nothing is guaranteed.  You've found a bug in IE6/7
> > where setting the bottom and/or right style of a relatively positioned
> > LI does not update the offsetLeft/Top (ever apparently).  Such results
> > are easy enough to detect and disallow.  Or I may just add an issues
> > section (this is the first one in ten years).
>
> It requires more investigation as to why the result got that way. i know
> you don't like me to say it, but writing tests really helps. As stated,
> I started on a test runner. The code is pretty simple. You could finish
> it off and use it for testing this.

I have my own unit testing framework.

>
> > Thanks for your input.
>
> > On a related note, how are you coming on your quest to find out where
> > my other (somewhat related) inventions (e.g. injecting, manipulating
> > and measuring DIV's in one-off feature testing) came from?
>
> I actually came up with the idea on my own in "Find Element Position"
> thread. You posted the idea, but I'd already started on that.

Well, even in a vacuum, it was still late. I posted the menu example
(linked to in the host primer) months before that thread. Further
back still, I had proposed the idea of using such a technique after an
exchange with Richard and Randy Webb concerning the viabilities of GP
libraries and feature testing.

>
> I may not have been the first who had invented the idea.

Clearly you were not (and certainly not the first to publish practical
examples).

> We covered in
> that thread why it is best to use node.insertBefore(x, node.firstChild)
> and not appendChild, because that way it avoids the "operation aborted".

You can use appendChild if you understand why the "operation aborted"
happens. I've never had any trouble in that area.

>
> Other attempts to append nodes to documentElement were subsequently
> proposed, and, oddly, those seemed to be more popular.

The viability of browser scripting code usually has an inverse
relationship to its popularity.

> Oddly because
> they can be expected to throw the dom exception related to invalid
> hierarchy, as specified in DOM 2 core. And in versions of some browsers,
> it has been reported (older Mozillas and even recent Konq).

It's clearly a bad idea to create an invalid DOM tree. And there's no
reason to do it as virtually all of my examples back then included
(real) XHTML demos. No invalid operations, innerHTML hacks, etc.

>
> http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cro...
>
> Gerard Talbot claims that even Konq 4 throws errors and I believe that.

I wouldn't be shocked.

> Older versions of konq reportedly did so, as well, and according to DOM2
> core, the error is to be expected.

Of course. But the masses have the "show me where it fails" mindset.
If it appears to work in whatever browsers they have handy (and "care
about"), that's good enough for them. They take their cues from such
"luminaries" as the jQuery and YUI developers.

>
> Well, that IE blog post is not great, but it's a good sign in the right
> direction and a lot better than what Apple, Google, and Yahoo are doing.

Yes, I've seen their Websites. Almost anything would be better. It's
like they go out of their way to do everything in the most ill-advised
fashion. But try to point out the massive gaps in their logic and
they fall back to "show me where it fails" or "nobody is perfect".

> All three of those screen out "invalid" browsers based on the userAgent
> sniffing.

That's clearly ridiculous. As I pointed out back around the end of
2007, if the My Library test page could work (or degrade gracefully)
in old and new (X)HTML DOM's, then clearly there is no need to parse
the UA string. Years went by and new browsers didn't break it. I
eventually went back and tested every old browser I could find, which
(not unexpectedly) exposed some gaps in the feature testing logic.
After plugging a few holes, I found that it worked in virtually
everything released this century (and some browsers from last
century). Still, the "major" libraries continue with the browser
sniffing to this day, barely "keeping up" withe latest major desktop
browsers and burning bridges to the old ones.

> If you don't have the right userAgent, you get either a buggy
> page, an error warning or redirected to their error page.

Yes and it is amazing that the developers can't recognize these
failures for what they are. They are about rationalization rather
than reason.

>
> I have not had time to reply to all of the other posts and I started
> working on a "recursive" regexp for trying to validate the JSON plus an
> article on another topic.

I've been working on a couple of improvements to my keyboard primer,
an OO primer (O is for Object), a new editor widget (and accompanying
text range add-on) trying to find time to wrap up work in the RC of My
Library and the new Cinsoft site. Unfortunately (or fortunately
depending on perspective), work keeps getting in the way.

However, the Position primer is updated as of last night and I will
post it shortly.

> So, I'm going to follow up on replies but I
> have a lot of things going on, including activities with people; not on
> the Internet.
>

Who is not on the Internet these days? Many aren't on Usenet, but I
think virtually everyone uses the Internet now (in one way or another).
From: Garrett Smith on
On 6/13/2010 8:34 AM, David Mark wrote:
> On Jun 12, 11:22 pm, Garrett Smith<dhtmlkitc...(a)gmail.com> wrote:
>> On 6/12/2010 3:23 PM, David Mark wrote:
>>
>>> On Jun 10, 6:59 pm, Garrett Smith<dhtmlkitc...(a)gmail.com> wrote:
>>>> On 6/9/2010 12:02 PM, David Mark wrote:
>>
[...]

>> So, I'm going to follow up on replies but I
>> have a lot of things going on, including activities with people; not on
>> the Internet.
>>
>
> Who is not on the Internet these days?

activities.

Garrett