Skip to content

Instantly share code, notes, and snippets.

@tomaslibal
Last active December 18, 2015 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaslibal/5760824 to your computer and use it in GitHub Desktop.
Save tomaslibal/5760824 to your computer and use it in GitHub Desktop.
[object HTMLElement]
[object HTMLElement]
[object HTMLElement]
[object HTMLAppletElement]
[object HTMLAreaElement]
[object HTMLElement]
[object HTMLBaseElement]
[object HTMLBaseFontElement]
[object HTMLElement]
[object HTMLElement]
[object HTMLQuoteElement]
!: blockquote != Quote
[object HTMLBodyElement]
[object HTMLBRElement]
[object HTMLButtonElement]
[object HTMLTableCaptionElement]
!: caption != TableCaption
[object HTMLElement]
[object HTMLElement]
[object HTMLElement]
[object HTMLTableColElement]
!: col != TableCol
[object HTMLTableColElement]
!: colgroup != TableCol
[object HTMLElement]
[object HTMLModElement]
!: del != Mod
[object HTMLElement]
[object HTMLDirectoryElement]
!: dir != Directory
[object HTMLDivElement]
[object HTMLDListElement]
!: dl != DList
[object HTMLElement]
[object HTMLElement]
[object HTMLFieldSetElement]
[object HTMLFontElement]
[object HTMLFormElement]
[object HTMLFrameElement]
[object HTMLFrameSetElement]
[object HTMLHeadingElement]
!: h1 != Heading
[object HTMLHeadingElement]
!: h2 != Heading
[object HTMLHeadingElement]
!: h3 != Heading
[object HTMLHeadingElement]
!: h4 != Heading
[object HTMLHeadingElement]
!: h5 != Heading
[object HTMLHeadingElement]
!: h6 != Heading
[object HTMLHeadElement]
[object HTMLHRElement]
[object HTMLHtmlElement]
[object HTMLElement]
[object HTMLIFrameElement]
[object HTMLImageElement]
!: img != Image
[object HTMLInputElement]
[object HTMLModElement]
!: ins != Mod
[object HTMLUnknownElement]
!: isindex != Unknown
[object HTMLElement]
[object HTMLLabelElement]
[object HTMLLegendElement]
[object HTMLLIElement]
[object HTMLLinkElement]
[object HTMLMapElement]
[object HTMLMenuElement]
[object HTMLMetaElement]
[object HTMLElement]
[object HTMLElement]
[object HTMLObjectElement]
[object HTMLOListElement]
!: ol != OList
[object HTMLOptGroupElement]
[object HTMLOptionElement]
[object HTMLParagraphElement]
!: p != Paragraph
[object HTMLParamElement]
[object HTMLPreElement]
[object HTMLQuoteElement]
!: q != Quote
[object HTMLElement]
[object HTMLElement]
[object HTMLScriptElement]
[object HTMLSelectElement]
[object HTMLElement]
[object HTMLSpanElement]
[object HTMLElement]
[object HTMLElement]
[object HTMLStyleElement]
[object HTMLElement]
[object HTMLElement]
[object HTMLTableElement]
[object HTMLTableSectionElement]
!: tbody != TableSection
[object HTMLTableCellElement]
!: td != TableCell
[object HTMLTextAreaElement]
[object HTMLTableSectionElement]
!: tfoot != TableSection
[object HTMLTableCellElement]
!: th != TableCell
[object HTMLTableSectionElement]
!: thead != TableSection
[object HTMLTitleElement]
[object HTMLTableRowElement]
!: tr != TableRow
[object HTMLElement]
[object HTMLElement]
[object HTMLUListElement]
!: ul != UList
[object HTMLElement]
var result = document.getElementById("result"),
add = function (tag_name) {
result.innerHTML += String(document.createElement(tag_name)) + "<br>";
tmp = /HTML([\w]+)?Element/.exec(string_value);
if(!tmp) { return; }
if(typeof tmp[1] !== "undefined") {
if(tmp[1].toLowerCase() !== tag_name) {
result.innerHTML += "!: " + tag_name+ " != " + tmp[1] + "<br>";
}
}
},
// http://www.w3.org/TR/html4/index/elements.html
tags_html4 = [
'a',
'abbr',
'acronym',
'address',
'applet',
'area',
'b',
'base',
'basefont',
'bdo',
'big',
'blockquote',
'body',
'br',
'button',
'caption',
'center',
'cite',
'code',
'col',
'colgroup',
'dd',
'del',
'dfn',
'dir',
'div',
'dl',
'dt',
'em',
'fieldset',
'font',
'form',
'frame',
'frameset',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'head',
'hr',
'html',
'i',
'iframe',
'img',
'input',
'ins',
'isindex',
'kbd',
'label',
'legend',
'li',
'link',
'map',
'menu',
'meta',
'noframes',
'noscript',
'object',
'ol',
'optgroup',
'option',
'p',
'param',
'pre',
'q',
's',
'samp',
'script',
'select',
'small',
'span',
'strike',
'strong',
'style',
'sub',
'sup',
'table',
'tbody',
'td',
'textarea',
'tfoot',
'th',
'thead',
'title',
'tr',
'tt',
'u',
'ul',
'var'
],
i = 0;
for (i; i < tags_html4.length; i += 1) {
add(tags_html4[i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment