new mmir.view.Layout.TagElement(tag, content, tagType){mmir.view.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:
Type | Description |
---|---|
mmir.view.Layout.TagElement | prop {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 LINK |
Members
-
tagName
-
the TAG type, e.g. "SCRIPT"
-
textContent
-
the TEXT content of the TAG (may be an empty String)
Methods
-
staticmmir.view.Layout.TagElement.attr(name){any}
-
Name Type Description name
String the attribute name Returns:
Type Description any the attribute-value for name (may be undefined) -
staticmmir.view.Layout.TagElement.html(){String}
-
Returns:
Type Description String the TEXT content of the TAG (may be an empty String) -
staticmmir.view.Layout.TagElement.isLink(){Boolean}
-
Returns:
Type Description Boolean returns TRUE if tagType is LINK -
staticmmir.view.Layout.TagElement.isScript(){Boolean}
-
Returns:
Type Description Boolean returns TRUE if tagType is SCRIPT -
staticmmir.view.Layout.TagElement.isStyle(){Boolean}
-
Returns:
Type Description Boolean returns TRUE if tagType is STYLE