1999-04-07 02:03:08 +00:00
|
|
|
<?xml version="1.0"?>
|
1999-04-06 06:37:52 +00:00
|
|
|
<!--
|
|
|
|
|
|
|
|
This test exercises some of the DOMAttr stuff.
|
|
|
|
|
|
|
|
-->
|
|
|
|
<?xml-stylesheet href="dom-test-1.css" type="text/css"?>
|
|
|
|
|
|
|
|
<xul:window
|
|
|
|
xmlns:html="http://www.w3.org/TR/REC-html40"
|
|
|
|
xmlns:rdf="http://www.w3.org/TR/WD-rdf-syntax#"
|
|
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
|
|
|
|
|
|
|
<html:script>
|
|
|
|
function DumpAttributes()
|
|
|
|
{
|
|
|
|
var bookmarksRoot = document.getElementById("NC:BookmarksRoot");
|
|
|
|
dump("bookmarksRoot = " + bookmarksRoot + "\n");
|
|
|
|
if (bookmarksRoot == null)
|
|
|
|
return;
|
|
|
|
|
|
|
|
var attrs = bookmarksRoot.attributes;
|
|
|
|
dump("attrs = " + attrs + "\n");
|
|
|
|
if (attrs == null)
|
|
|
|
return;
|
|
|
|
|
1999-04-07 02:03:08 +00:00
|
|
|
for (var i = 0; i < attrs.length; ++i) {
|
1999-04-06 06:37:52 +00:00
|
|
|
var attr = attrs[i];
|
|
|
|
dump("attrs[" + i + "] = " + attr + "\n");
|
|
|
|
if (attr != null) {
|
|
|
|
dump("attr.name = " + attr.name + "\n");
|
|
|
|
dump("attr.value = " + attr.value + "\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</html:script>
|
|
|
|
|
|
|
|
<html:button onclick="DumpAttributes();">DumpAttributes</html:button>
|
|
|
|
|
|
|
|
<tree id="tree" datasources="rdf:bookmarks" onclick="return OpenURL(event,event.target.parentNode);">
|
|
|
|
<treecol rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
|
|
|
|
<treecol rdf:resource="http://home.netscape.com/NC-rdf#URL"/>
|
|
|
|
<treehead>
|
|
|
|
<treeitem>
|
|
|
|
<treecell>Name</treecell>
|
|
|
|
<treecell>URL</treecell>
|
|
|
|
</treeitem>
|
|
|
|
</treehead>
|
|
|
|
|
|
|
|
<treebody id="NC:BookmarksRoot">
|
|
|
|
</treebody>
|
|
|
|
</tree>
|
|
|
|
|
1999-04-07 02:03:08 +00:00
|
|
|
</xul:window>
|