82 |
map.put("body", DomHTMLBodyElement.class); |
map.put("body", DomHTMLBodyElement.class); |
83 |
map.put("br", DomHTMLBRElement.class); |
map.put("br", DomHTMLBRElement.class); |
84 |
map.put("button", DomHTMLButtonElement.class); |
map.put("button", DomHTMLButtonElement.class); |
85 |
|
map.put("dir", DomHTMLDirectoryElement.class); |
86 |
|
map.put("div", DomHTMLDivElement.class); |
87 |
|
map.put("dlist", DomHTMLDListElement.class); |
88 |
|
map.put("fieldset", DomHTMLFieldSetElement.class); |
89 |
|
map.put("font", DomHTMLFontElement.class); |
90 |
|
map.put("form", DomHTMLFormElement.class); |
91 |
|
map.put("frame", DomHTMLFrameElement.class); |
92 |
|
map.put("frameset", DomHTMLFrameSetElement.class); |
93 |
|
map.put("head", DomHTMLHeadElement.class); |
94 |
|
map.put("h1", DomHTMLHeadingElement.class); |
95 |
|
map.put("h2", DomHTMLHeadingElement.class); |
96 |
|
map.put("h3", DomHTMLHeadingElement.class); |
97 |
|
map.put("h4", DomHTMLHeadingElement.class); |
98 |
|
map.put("h5", DomHTMLHeadingElement.class); |
99 |
|
map.put("h6", DomHTMLHeadingElement.class); |
100 |
|
map.put("html", DomHTMLHtmlElement.class); |
101 |
|
map.put("iframe", DomHTMLIFrameElement.class); |
102 |
|
map.put("img", DomHTMLImageElement.class); |
103 |
|
map.put("input", DomHTMLInputElement.class); |
104 |
|
map.put("isindex", DomHTMLIsIndexElement.class); |
105 |
|
map.put("label", DomHTMLLabelElement.class); |
106 |
|
map.put("legend", DomHTMLLegendElement.class); |
107 |
|
map.put("li", DomHTMLLIElement.class); |
108 |
|
map.put("link", DomHTMLLinkElement.class); |
109 |
|
map.put("map", DomHTMLMapElement.class); |
110 |
|
map.put("menu", DomHTMLMenuElement.class); |
111 |
|
map.put("meta", DomHTMLMetaElement.class); |
112 |
|
map.put("ins", DomHTMLModElement.class); |
113 |
|
map.put("del", DomHTMLModElement.class); |
114 |
|
map.put("object", DomHTMLObjectElement.class); |
115 |
|
map.put("ol", DomHTMLOListElement.class); |
116 |
|
map.put("optgroup", DomHTMLOptGroupElement.class); |
117 |
|
map.put("option", DomHTMLOptionElement.class); |
118 |
|
map.put("p", DomHTMLParagraphElement.class); |
119 |
|
map.put("param", DomHTMLParamElement.class); |
120 |
|
map.put("pre", DomHTMLPreElement.class); |
121 |
|
map.put("q", DomHTMLQuoteElement.class); |
122 |
|
map.put("blockquote", DomHTMLQuoteElement.class); |
123 |
|
map.put("script", DomHTMLScriptElement.class); |
124 |
|
map.put("select", DomHTMLSelectElement.class); |
125 |
|
map.put("style", DomHTMLStyleElement.class); |
126 |
|
map.put("caption", DomHTMLTableCaptionElement.class); |
127 |
|
map.put("th", DomHTMLTableCellElement.class); |
128 |
|
map.put("td", DomHTMLTableCellElement.class); |
129 |
|
map.put("col", DomHTMLTableColElement.class); |
130 |
|
map.put("colgroup", DomHTMLTableColElement.class); |
131 |
|
map.put("table", DomHTMLTableElement.class); |
132 |
|
map.put("tr", DomHTMLTableRowElement.class); |
133 |
|
map.put("thead", DomHTMLTableSectionElement.class); |
134 |
|
map.put("tfoot", DomHTMLTableSectionElement.class); |
135 |
|
map.put("tbody", DomHTMLTableSectionElement.class); |
136 |
// TODO others |
// TODO others |
137 |
ELEMENT_CLASSES = Collections.unmodifiableMap(map); |
ELEMENT_CLASSES = Collections.unmodifiableMap(map); |
138 |
} |
} |
253 |
|
|
254 |
public HTMLCollection getImages() |
public HTMLCollection getImages() |
255 |
{ |
{ |
256 |
DomHTMLCollection ret = new DomHTMLCollection(this); |
DomHTMLCollection ret = new DomHTMLCollection(this, this); |
257 |
ret.addNodeName("img"); |
ret.addNodeName("img"); |
258 |
|
ret.evaluate(); |
259 |
return ret; |
return ret; |
260 |
} |
} |
261 |
|
|
262 |
public HTMLCollection getApplets() |
public HTMLCollection getApplets() |
263 |
{ |
{ |
264 |
DomHTMLCollection ret = new DomHTMLCollection(this); |
DomHTMLCollection ret = new DomHTMLCollection(this, this); |
265 |
ret.addNodeName("object"); |
ret.addNodeName("object"); |
266 |
ret.addNodeName("applet"); |
ret.addNodeName("applet"); |
267 |
|
ret.evaluate(); |
268 |
return ret; |
return ret; |
269 |
} |
} |
270 |
|
|
271 |
public HTMLCollection getLinks() |
public HTMLCollection getLinks() |
272 |
{ |
{ |
273 |
DomHTMLCollection ret = new DomHTMLCollection(this); |
DomHTMLCollection ret = new DomHTMLCollection(this, this); |
274 |
ret.addNodeName("area"); |
ret.addNodeName("area"); |
275 |
ret.addNodeName("a"); |
ret.addNodeName("a"); |
276 |
|
ret.evaluate(); |
277 |
return ret; |
return ret; |
278 |
} |
} |
279 |
|
|
280 |
public HTMLCollection getForms() |
public HTMLCollection getForms() |
281 |
{ |
{ |
282 |
DomHTMLCollection ret = new DomHTMLCollection(this); |
DomHTMLCollection ret = new DomHTMLCollection(this, this); |
283 |
ret.addNodeName("form"); |
ret.addNodeName("form"); |
284 |
|
ret.evaluate(); |
285 |
return ret; |
return ret; |
286 |
} |
} |
287 |
|
|
288 |
public HTMLCollection getAnchors() |
public HTMLCollection getAnchors() |
289 |
{ |
{ |
290 |
DomHTMLCollection ret = new DomHTMLCollection(this); |
DomHTMLCollection ret = new DomHTMLCollection(this, this); |
291 |
ret.addNodeName("a"); |
ret.addNodeName("a"); |
292 |
ret.addAttributeName("name"); |
ret.addAttributeName("name"); |
293 |
|
ret.evaluate(); |
294 |
return ret; |
return ret; |
295 |
} |
} |
296 |
|
|
327 |
|
|
328 |
public NodeList getElementsByName(String name) |
public NodeList getElementsByName(String name) |
329 |
{ |
{ |
330 |
DomHTMLCollection ret = new DomHTMLCollection(this); |
DomHTMLCollection ret = new DomHTMLCollection(this, this); |
331 |
ret.addNodeName(name); |
ret.addNodeName(name); |
332 |
|
ret.evaluate(); |
333 |
return ret; |
return ret; |
334 |
// TODO xhtml: return only form controls (?) |
// TODO xhtml: return only form controls (?) |
335 |
} |
} |