| 285 | } |
| 286 | |
| 287 | function getDomTree(node) { |
| 288 | // from here http://www.w3.org/TR/html4/index/elements.html |
| 289 | // lightly edited, plus new html5 elements and a few relevant svg elements |
| 290 | // (goin' for clarity here, not namespace-spec-conformity...) |
| 291 | var htmlElements = [ |
| 292 | {"name":"a","description":"anchor"}, |
| 293 | {"name":"abbr","description":"abbreviated form"}, |
| 294 | {"name":"acronym","description":"acronym"}, |
| 295 | {"name":"address","description":"information on author"}, |
| 296 | {"name":"applet","description":"Java applet"}, |
| 297 | {"name":"area","description":"image map area"}, |
| 298 | {"name":"article","description":"article"}, |
| 299 | {"name":"aside","description":"aside"}, |
| 300 | {"name":"audio","description":"sound or music"}, |
| 301 | {"name":"b","description":"bold text style"}, |
| 302 | {"name":"base","description":"document base URI"}, |
| 303 | {"name":"basefont","description":"base font size"}, |
| 304 | {"name":"bdi","description":""}, |
| 305 | {"name":"bdo","description":"I18N BiDi over-ride"}, |
| 306 | {"name":"big","description":"large text style"}, |
| 307 | {"name":"blockquote","description":"long quotation"}, |
| 308 | {"name":"body","description":"document body"}, |
| 309 | {"name":"br","description":"forced line break"}, |
| 310 | {"name":"button","description":"push button"}, |
| 311 | {"name":"caption","description":"table caption"}, |
| 312 | {"name":"center","description":"center-aligned"}, |
| 313 | {"name":"cite","description":"citation"}, |
| 314 | {"name":"code","description":"code fragment"}, |
| 315 | {"name":"col","description":"table column"}, |
| 316 | {"name":"colgroup","description":"table column group"}, |
| 317 | {"name":"datalist","description":"datalist input"}, |
| 318 | {"name":"dd","description":"definition description"}, |
| 319 | {"name":"del","description":"deleted text"}, |
| 320 | {"name":"details","description":"details"}, |
| 321 | {"name":"dfn","description":"instance definition"}, |
| 322 | {"name":"dialog","description":"dialog box"}, |
| 323 | {"name":"dir","description":"directory list"}, |
| 324 | {"name":"div","description":"generic block container"}, |
| 325 | {"name":"dl","description":"definition list"}, |
| 326 | {"name":"dt","description":"definition term"}, |
| 327 | {"name":"em","description":"emphasis"}, |
| 328 | {"name":"embed","description":"container for external applications"}, |
| 329 | {"name":"fieldset","description":"form control group"}, |
| 330 | {"name":"figcaption","description":"figure caption"}, |
| 331 | {"name":"figure","description":"figure"}, |
| 332 | {"name":"font","description":"local change to font"}, |
| 333 | {"name":"footer","description":"footer"}, |
| 334 | {"name":"form","description":"interactive form"}, |
| 335 | {"name":"frame","description":"subwindow"}, |
| 336 | {"name":"frameset","description":"window subdivision"}, |
| 337 | {"name":"g","description":"group"}, |
| 338 | {"name":"h1","description":"heading"}, |
| 339 | {"name":"h2","description":"subheading"}, |
| 340 | {"name":"h3","description":"subsubheading"}, |
| 341 | {"name":"h4","description":"subsubsubheading"}, |
| 342 | {"name":"h5","description":"subsubsubsubheading"}, |
| 343 | {"name":"h6","description":"subsubsubsubsubheading"}, |
| 344 | {"name":"head","description":"document head"}, |