You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
411 B
15 lines
411 B
//Types of elements found in the DOM
|
|
module.exports = {
|
|
Text: "text", //Text
|
|
Directive: "directive", //<? ... ?>
|
|
Comment: "comment", //<!-- ... -->
|
|
Script: "script", //<script> tags
|
|
Style: "style", //<style> tags
|
|
Tag: "tag", //Any tag
|
|
CDATA: "cdata", //<![CDATA[ ... ]]>
|
|
Doctype: "doctype",
|
|
|
|
isTag: function(elem){
|
|
return elem.type === "tag" || elem.type === "script" || elem.type === "style";
|
|
}
|
|
};
|
|
|