Randy Webb wrote:
> Thomas 'PointedEars' Lahn said the following on 12/22/2005 2:32 PM:
>
>
> >That said, "loading scripts" after the document was loaded is still unreliable.
>
> No more unreliable than trying to load them when the page is loading.
>
if (scriptObject.readyState == 'complete')
in IE works just fine and reliable - at least seems so, I did not check
it under all circumstances.
It is a shame that others did not implement anything so convenient and
obvious - except for XMLHttpRequest - they must be thinking that after
such glorious achievement they can take a rest for another year or two.
The previous script properties dump was irrelevant (sorry for that) as
it was for inline script. Below the properties dump for external script
for Firefox 1.5 Win98 SE
So much of useless crap they put in it - and nothing really useful.
That's still would be the best to check the state w/o any in-script
helpers, to keep the data out of implementation.
nodeName = SCRIPT
nodeValue = null
nodeType = 1
parentNode = [object HTMLHeadElement]
childNodes = [object NodeList]
firstChild = null
lastChild = null
previousSibling = [object Text]
nextSibling = null
attributes = [object NamedNodeMap]
ownerDocument = [object HTMLDocument]
insertBefore = function insertBefore() {
[native code]
}
replaceChild = function replaceChild() {
[native code]
}
removeChild = function removeChild() {
[native code]
}
appendChild = function appendChild() {
[native code]
}
hasChildNodes = function hasChildNodes() {
[native code]
}
cloneNode = function cloneNode() {
[native code]
}
normalize = function normalize() {
[native code]
}
isSupported = function isSupported() {
[native code]
}
namespaceURI = null
prefix = null
localName = SCRIPT
hasAttributes = function hasAttributes() {
[native code]
}
tagName = SCRIPT
getAttribute = function getAttribute() {
[native code]
}
setAttribute = function setAttribute() {
[native code]
}
removeAttribute = function removeAttribute() {
[native code]
}
getAttributeNode = function getAttributeNode() {
[native code]
}
setAttributeNode = function setAttributeNode() {
[native code]
}
removeAttributeNode = function removeAttributeNode() {
[native code]
}
getElementsByTagName = function getElementsByTagName() {
[native code]
}
getAttributeNS = function getAttributeNS() {
[native code]
}
setAttributeNS = function setAttributeNS() {
[native code]
}
removeAttributeNS = function removeAttributeNS() {
[native code]
}
getAttributeNodeNS = function getAttributeNodeNS() {
[native code]
}
setAttributeNodeNS = function setAttributeNodeNS() {
[native code]
}
getElementsByTagNameNS = function getElementsByTagNameNS() {
[native code]
}
hasAttribute = function hasAttribute() {
[native code]
}
hasAttributeNS = function hasAttributeNS() {
[native code]
}
id =
title =
lang =
dir =
className =
text =
htmlFor =
event =
charset =
defer = false
src = file:///D:/JS/external.js
type = text/javascript
ELEMENT_NODE = 1
ATTRIBUTE_NODE = 2
TEXT_NODE = 3
CDATA_SECTION_NODE = 4
ENTITY_REFERENCE_NODE = 5
ENTITY_NODE = 6
PROCESSING_INSTRUCTION_NODE = 7
COMMENT_NODE = 8
DOCUMENT_NODE = 9
DOCUMENT_TYPE_NODE = 10
DOCUMENT_FRAGMENT_NODE = 11
NOTATION_NODE = 12
offsetTop = 0
offsetLeft = 0
offsetWidth = 0
offsetHeight = 0
offsetParent = null
innerHTML =
scrollTop = 0
scrollLeft = 0
scrollHeight = 0
scrollWidth = 0
clientHeight = 0
clientWidth = 0
tabIndex = -1
blur = function blur() {
[native code]
}
focus = function focus() {
[native code]
}
style = [object CSSStyleDeclaration]
removeEventListener = function removeEventListener() {
[native code]
}
dispatchEvent = function dispatchEvent() {
[native code]
}
baseURI = file:///D:/JS/TMP1135285699.htm
compareDocumentPosition = function compareDocumentPosition() {
[native code]
}
textContent =
isSameNode = function isSameNode() {
[native code]
}
lookupPrefix = function lookupPrefix() {
[native code]
}
isDefaultNamespace = function isDefaultNamespace() {
[native code]
}
lookupNamespaceURI = function lookupNamespaceURI() {
[native code]
}
isEqualNode = function isEqualNode() {
[native code]
}
getFeature = function getFeature() {
[native code]
}
setUserData = function setUserData() {
[native code]
}
getUserData = function getUserData() {
[native code]
}
DOCUMENT_POSITION_DISCONNECTED = 1
DOCUMENT_POSITION_PRECEDING = 2
DOCUMENT_POSITION_FOLLOWING = 4
DOCUMENT_POSITION_CONTAINS = 8
DOCUMENT_POSITION_CONTAINED_BY = 16
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32