new Layout.TagElement(tag, content, tagType){Layout.TagElement}
HELPER class: extract raw TAG Strings into a property-object
Name | Type | Description |
---|---|---|
tag |
String | the start TAG |
content |
String | the TEXT content of the TAG (may be empty) |
tagType |
String | the TAG type, e.g. "SCRIPT" |
Returns:
{String} tagName: the TAG type, e.g. "SCRIPT" prop {String} textContent: the TEXT content of the TAG (may be an empty String) prop EXTRACTED ATTRIBUTES: the extracted attributes form the start-TAG func {String} attr(STRING name): returns the attribute-value for name (may be undefined) func {String} html(): returns the TEXT content of the TAG (may be an empty String) func {Boolean} isScript(): returns TRUE if tagType is SCRIPT func {Boolean} isStyle(): returns TRUE if tagType is STYLE func {Boolean} isLink(): returns TRUE if tagType is LINKMembers
-
tagName
-
the TAG type, e.g. "SCRIPT"
-
textContent
-
the TEXT content of the TAG (may be an empty String)
Methods
-
attr(name){any}
-
Name Type Description name
String the attribute name Returns:
attribute-value for name (may be undefined)
-
html(){String}
-
Returns:
TEXT content of the TAG (may be an empty String)
-
isLink(){Boolean}
-
Returns:
TRUE if tagType is LINK
-
isScript(){Boolean}
-
Returns:
TRUE if tagType is SCRIPT
-
isStyle(){Boolean}
-
Returns:
TRUE if tagType is STYLE