mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Not part of build. Added tests for document.load() (a DOM extension used to load XML documents asynchronloysly as data).
This commit is contained in:
parent
8df3b775ba
commit
ed0d730e7e
16
content/xml/tests/load/load.html
Normal file
16
content/xml/tests/load/load.html
Normal file
@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>document.load() test</h1>
|
||||
<script>
|
||||
var xmlDoc = document.implementation.createDocument("", "test", null);
|
||||
|
||||
function documentLoaded(e) {
|
||||
alert(xmlDoc.getElementById("id1").firstChild.nodeValue);
|
||||
}
|
||||
|
||||
xmlDoc.addEventListener("load", documentLoaded, false);
|
||||
|
||||
xmlDoc.load("test.xml");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
7
content/xml/tests/load/test.xml
Normal file
7
content/xml/tests/load/test.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE doc [
|
||||
<!ATTLIST p id ID #IMPLIED>
|
||||
]>
|
||||
<doc>
|
||||
<p id="id1">Text from sample XML document.</p>
|
||||
</doc>
|
Loading…
Reference in New Issue
Block a user