> Here's some feedback and improvement suggestions on your page.
Thanks! Sorry for the late reply! =)
[color=blue]
> 1- srcElement: you write "The same, but in Mozilla the nodes of type
> text can also fire events,(...)". That's not true. It's the target
> property of the event object and there is a large consensus on the web
> regarding this.[/color]
I don't undesrtand this. Isn't the same?
[color=blue]
> 2- offsetX, offsetY (for event object): you write "If event.target is in
> a normally (static) positioned element these properties will give you
> the offset with respect to the page." That's not true; that's not
> precise. When an object is statically positioned, then offsetLeft and
> offsetTop return x and y coordinates relative to the document root
> element. I would remove that sentence. What you write would be true for
> objects (not event object) and for offsetLeft and offsetTop properties
> and the following code would be correct:
>
> var Element = evt.target ;
> var CalculatedTotalOffsetLeft = CalculatedTotalOffsetTop = 0 ;
> while (Element.offsetParent)
> {
> CalculatedTotalOffsetLeft += Element.offsetLeft ;
> CalculatedTotalOffsetTop += Element.offsetTop ;
> Element = Element.offsetParent ;
> } ;
>
> OffsetXForMozilla = evt.pageX - CalculatedTotalOffsetLeft ;
> OffsetYForMozilla = evt.pageY - CalculatedTotalOffsetTop ;
>
> In my own homepage (at this precise url; you need MSIE 6 to view it)
>
http://www10.brinkster.com/doctorunc...l#NoteOffsetXY
>
>
> , I wrote "Under NS 6+, it is possible to calculate [directly] the
> offsetX/Y values." and I still think this is true.[/color]
My text, although a bit imprecise, was useful. I corrected it a bit.
What do you think now?
[color=blue]
> 3- window.screenX, window.screenY are not the equivalent to MSIE's
> window.screenLeft, window.screenTop
>
> If you open the explorer bar or activate the Tip of the day frame,
> you'll see that values are different, they change. If you open the
> sidebar in Mozilla, window.screenX won't change.
>
>
http://www10.brinkster.com/doctorunc...enLeftTop.html[/color]
I see theses properties specify the coordinates of different points in
the window. I've noted that in my page.
[color=blue]
> 4- document.defaultView is NOT the equilavent of document.parentWindow.
> document.contentWindow is the equivalent to document.parentWindow
> Note here:
>
> See/try
>
http://bugzilla.mozilla.org/attachme...09&action=view
> from bug 151300 at bugzilla.
> Also, bug 228497: contentWindow is not implemented on document
>
http://bugzilla.mozilla.org/show_bug.cgi?id=228497[/color]
From a pragmatic point of view, "defaultView" is what the reader needs:
It's implemented in "document" and it points to the right object. Is
there a case when it would be pointing somewhere else?
[color=blue]
> 5- innerText: "There's no direct mozilla equivalent." Strictly speaking,
> that is not true as Mozilla 1.5+ implement DOM 3 Core method textContent.
>
>
http://www.w3.org/TR/2004/REC-DOM-Le...e3-textContent[/color]
Right. This property wasn't there in Mozilla when I wrote the page. I'll
update it.
[color=blue]
> I think your document should just give an example of how to replace
> innerTtext with a working example.
> E.g.:
> <p id="idText">Hello world!</p>
> document.getElementById("idText").innerText
> can be replaced with
> document.getElementById("idText").firstChild.nodeV alue
> Depending on the specific need of the scripter, some CharacterData
> method might be more relevant to use.[/color]
I'm already providing an example!
[color=blue]
>
> 6- MyForm: "You must use document.myForm" The scripter might also use
> document.forms["myForm"]
> or even
> document.forms[ordinalInteger] which will be XHTML compliant as well. I
> would at least change your "must" to "may" in your file and offer the 2
> other alternatives.
> In your "Parentheses or brackets" section, you write
> "One must always use [], i.e.: documents.forms[0].field.value"[/color]
I've changed "must" to "may".
[color=blue]
>
> Finally, I invite you to participate (feedback, suggestions, ideas) in
> bug 74952.[/color]
Thanks! =)
I appreciate all your work here, the reason that I delayed the response
was that I'm now not working with WWW related things. So I had to take
the time to study your mail. I've now made some corrections to my page
and I look forward to hear more comments.
Thank you again!