1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

SEE compatibility in forms.namedItem.html.

This commit is contained in:
Kalle Olavi Niemitalo 2007-06-10 15:16:51 +03:00 committed by Kalle Olavi Niemitalo
parent c7b3a8c423
commit 55f4307511

View File

@ -8,34 +8,53 @@
<P><BUTTON name="b" type="button">dummy</BUTTON></P>
</FORM>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: [object HTMLFormElement]
// ELinks 0.11.3: [object form]
window.alert("window.document.forms.f=" + window.document.forms.f);
function stringify(val)
{
var str = typeof(val);
var first = true;
if (str != "object" || val === null) {
str += " " + val;
} else {
str += " {";
for (var prop in val) {
if (!first) str += ", ";
first = false;
str += prop;
}
str += "}";
}
return str;
}
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: [object HTMLFormElement]
// ELinks 0.11.3: [object form]
window.alert("window.document.forms[\"f\"]=" + window.document.forms["f"]);
// iceweasel 2.0+dfsg-1: object {b, nodeName, nodeValue, nodeType, parentNode, childNodes...
// ELinks 0.11.3: object {action, elements, encoding, length, method, name, target}
window.alert("document.forms.f=" + stringify(document.forms.f));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: [object HTMLFormElement]
// ELinks 0.11.3: TypeError: window.document.forms.namedItem is not a function
window.alert("window.document.forms.namedItem(\"f\")=" + window.document.forms.namedItem("f"));
// iceweasel 2.0+dfsg-1: object {b, nodeName, nodeValue, nodeType, parentNode, childNodes...
// ELinks 0.11.3: object {action, elements, encoding, length, method, name, target}
window.alert("document.forms[\"f\"]=" + stringify(document.forms["f"]));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: undefined
// ELinks 0.11.3: null
window.alert("window.document.forms.notfound=" + window.document.forms.notfound);
// iceweasel 2.0+dfsg-1: object {b, nodeName, nodeValue, nodeType, parentNode, childNodes...
// ELinks 0.11.3: TypeError: document.forms.namedItem is not a function
window.alert("document.forms.namedItem(\"f\")=" + stringify(document.forms.namedItem("f")));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: undefined
// ELinks 0.11.3: null
window.alert("window.document.forms[\"notfound\"]=" + window.document.forms["notfound"]);
// iceweasel 2.0+dfsg-1: undefined undefined
// ELinks 0.11.3: object null
window.alert("document.forms.notfound=" + stringify(document.forms.notfound));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: null
// ELinks 0.11.3: TypeError: window.document.forms.namedItem is not a function
window.alert("window.document.forms.namedItem(\"notfound\")=" + window.document.forms.namedItem("notfound"));
// iceweasel 2.0+dfsg-1: undefined undefined
// ELinks 0.11.3: object null
window.alert("document.forms[\"notfound\"]=" + stringify(document.forms["notfound"]));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: object null
// ELinks 0.11.3: TypeError: document.forms.namedItem is not a function
window.alert("document.forms.namedItem(\"notfound\")=" + stringify(document.forms.namedItem("notfound")));
</SCRIPT>
</BODY>
</HTML>