Created
August 24, 2016 09:06
-
-
Save voischev/4cafa93dfa23457d17c8e69855f32641 to your computer and use it in GitHub Desktop.
PostHTMLTree.js ideas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
format PostHTMLTree | |
@see https://dev.w3.org/html5/html-author/ | |
*/ | |
/* | |
declarations | |
@see https://dev.w3.org/html5/html-author/#doctype-declaration | |
<!DOCTYPE | |
HTML | |
PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> | |
*/ | |
[ | |
{ | |
type: 'declaration', | |
name: 'doctype', | |
data: '<!DOCTYPE\n HTML\n PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">', | |
position: { | |
start: { line: 1, column: 1, offset: 0 }, // for example | |
end: { line: 1, column: 16, offset: 15 } | |
} | |
} | |
] | |
/* | |
elements | |
normal, void, raw text, RCDATA and foreign elements | |
https://dev.w3.org/html5/html-author/#tags | |
https://dev.w3.org/html5/html-author/#void | |
https://dev.w3.org/html5/html-author/#raw-text-elements | |
https://dev.w3.org/html5/html-author/#rcdata-elements | |
https://dev.w3.org/html5/html-author/#foreign-elements | |
https://dev.w3.org/html5/html-author/#normal-elements | |
@see https://dev.w3.org/html5/html-author/#elements | |
<div></div> | |
<meta> | |
text | |
*/ | |
[ | |
{ | |
type: 'declaration', | |
name: 'doctype', | |
data: '<!DOCTYPE\n HTML\n PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">', | |
position: { | |
start: { line: 1, column: 1, offset: 0 }, // for example | |
end: { line: 1, column: 16, offset: 15 } | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment