Interface StyleElement
- All Superinterfaces:
DomQueryable
,Element
,EventTarget
,Node
Style element used to link SCSS stylesheets to a document.
If the Attributes.SOURCE
is set, then the element will use
ViewResources.loadStylesheet(String)
to load it. Any
changes to the source attribute cause the stylesheet to be loaded again.
If the Attributes.SOURCE
is not set, then the element's text content will be parsed
as a stylesheet, and changes to the element's content will cause the stylesheet to be parsed
again.
- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
Get the value of theAttributes.SOURCE
attribute@Nullable Stylesheet
Get the stylesheet that was created by this element.Methods inherited from interface com.juliewoolie.dom.DomQueryable
getElementsByClassName, getElementsByTagName, querySelector, querySelectorAll
Methods inherited from interface com.juliewoolie.dom.Element
appendChild, appendElement, appendText, canHaveChildren, clearChildren, firstChild, forEachDescendant, getAttribute, getAttributeEntries, getAttributeNames, getChild, getChildCount, getChildren, getClassList, getClassName, getCurrentStyle, getId, getInlineStyle, getTagName, getTextContent, getTitleNode, getTooltip, hasAttribute, hasChild, hasChildren, indexOf, insertAfter, insertBefore, isDescendant, lastChild, matches, prependChild, removeAttribute, removeChild, removeChild, removeMatchingChildren, replaceChild, replaceChild, setAttribute, setClassName, setId, setTextContent, setTitleNode
Methods inherited from interface com.juliewoolie.dom.event.EventTarget
addEventListener, dispatchEvent, getOnAddAttribute, getOnAddOption, getOnAppendChild, getOnAttributeChange, getOnClick, getOnClosing, getOnInput, getOnLoaded, getOnMouseEnter, getOnMouseExit, getOnMouseMove, getOnOptionChange, getOnRemoveAttribute, getOnRemoveChild, getOnRemoveOption, getOnRightClick, getOnSetAttribute, getOnSetOption, getOnSpawned, onAddAttribute, onAddOption, onAppendChild, onAttributeChange, onClick, onClosing, onInput, onLoaded, onMouseEnter, onMouseExit, onMouseMove, onOptionChange, onRemoveAttribute, onRemoveChild, onRemoveOption, onRightClick, onSetAttribute, onSetOption, onSpawned, removeEventListener
Methods inherited from interface com.juliewoolie.dom.Node
enterVisitor, exitVisitor, getDepth, getOwningDocument, getParent, getRenderingBounds, getSiblingIndex, hasFlag, nextSibling, previousSibling
-
Method Details
-
getStylesheet
Get the stylesheet that was created by this element.Note that the stylesheet itself will only be loaded or parsed after the style element has been added to a document's header. Before that, this method will return
null
.- Returns:
- Stylesheet
-
getSource
Get the value of theAttributes.SOURCE
attribute- Returns:
- Source attribute value
-