G
Garrett Smith
David said:Yes, and that would be what in this case? I mean a single word to
replace evaluate. I realized when I wrote it it wasn't technically
specified, but couldn't come up with a better word.
Yes, and speaking of the FAQ:-
http://www.jibbering.com/faq/#onlineResources
...needs section for browser scripting resources (e.g. mine, Kangax'
blog, etc.) And:-
http://www.jibbering.com/faq/faq_notes/contributors.html
...needs my name added. At the very least, the confirm issue I fixed:-
http://www.jibbering.com/faq/#changeBrowserDialog
There are a lot of folks who have provided feedback to the FAQ. If you
search for subjects with "FAQ_Updated" (replace "_" with " "), you'll
find a lot more folks.
My idea is to create a new contributors' page under /faq/notes/contributors/
Sound, but I would ditch the parenthetical. Could happen to any browser.
What is this one's aside about?
An "expando" is Microsoft terminology for user-defined properties that
get added on to an IE host object. For example:-
// ERROR-PRONE. DO NOT DO THIS.
if(typeof e.pageX == "undefined") {
e.pageX = calculatePageX();
}
The execption to the rule is `unselectable` property of "DHTML Objects".
See also:
<URL: http://msdn.microsoft.com/en-us/library/ms534706(VS.85).aspx >
| o Host objects that error upon [[Get]] access are often ActiveX
| objects. These include, but are not limited to:
Host object _properties_ that throw errors on [[Get]] (a term that is
too subterranean for my primers) often indicate that the containing
object is an ActiveX implementation. All such method properties do it.
I am not sure that that is true. For example:-
element.filters.alpha
will result in error in some cases ("Unspecified error", IIRC.
A quick search indicates that error here:
http://www.dynamicdrive.com/forums/showthread.php?t=40912
The OP mentioned that he suspected IE preference "Binary and Script
Behaviors" disabled as being a possible culprit.
The solution posted there uses CC. Manipulating the filter string is
sufficient, smaller, simpler, and easier to read (as discussed here).
In some cases, all properties of element nodes go AWOL ("unknown" typeof
results). IIRC, that happens when they are orphaned by an innerHTML
replacement.
I have read of this but have not seen it first hand.
| + XMLHttpRequest methods (open, send, etc).
And its ActiveX equivalents.
| + filters: elem.filters.alpha, elem.style.filters.alpha, etc.
The filters object is implemented with ActiveX, so its properties are
suspect.
| + document.styleSheets[99999] - Error from [[Get]] for a
| nonexistent numeric property of a styleSheets collection.
That one may not be due to ActiveX, but just an allowable exception for
an out of bounds request.
I haven't dug deep enough to know, but I would not be surprised if it is
related to ActiveX. As discussed previously:
javascript: alert(typeof document.styleSheets[9999])
Yes, the Stockton href incident. That one was truly unexpected (and
likely a bug) as how else are you to get the href value. (!)
That's an odd one. Likely also a bug.
That's an *old* one. Prototype JS had that issue; kangax posted how
`typeof` test did not avoid the crash. (the solution was to use an `in`
operator test).
|
| * Type conversion
| [[ToString]]
| Perform string conversion by starting concatenation with a string
| value. See Newsgroup message explanation.
<URL:
http://groups.google.bg/group/comp.lang.javascript/msg/1528f612e31f09fe >
I don't see how the explanation relates to host objects, which don't
have to follow the specs at all.
The linked newsgroup message shows how string conversion of host object
does not follow the specification for string conversion. The linked
message serves as an example of showing that these host objects are
fragile and can't be trusted.
I would like to finish the entry on "What is a host object", link from
that, to this "code guidelines" note.
I would also like to mention that when typeof operator results
"unknown", then the object is unsafe.