Class HTMLStyleElement
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The HTMLStyleElement interface represents a {{HTMLElement("style")}} element. It inherits properties and methods from its parent, HTMLElement.
[Value("HTMLStyleElement")]
public class HTMLStyleElement : HTMLElement, Region, GeometryUtils, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable, ElementCSSInlineStyle, GlobalEventHandlers, ElementContentEditable, HTMLOrSVGElement, LinkStyle
- Inheritance
-
HTMLStyleElement
- Implements
- Inherited Members
Remarks
This interface doesn't allow to manipulate the CSS it contains (in most case). To manipulate CSS, see Using dynamic styling information for an overview of the objects used to manipulate specified CSS properties using the DOM.
-The HTML element implementing this interface: style.
-Using dynamic styling information to see how to manipulate CSS.
Constructors
HTMLStyleElement()
public HTMLStyleElement()
Properties
Blocking
The read-only blocking property of the HTMLStyleElement returns a live DOMTokenList object containing the operations that should be blocked on the fetching of an external resource. It reflects the {{HTMLElement("style")}} element's blocking content attribute.
[Value("blocking")]
public DOMTokenList Blocking { get; }
Property Value
- DOMTokenList
A live DOMTokenList object.Although the
blockingproperty itself is read-only in the sense that you can't replace theDOMTokenListobject, you can still assign to theblockingproperty directly, which is equivalent to assigning to its DOMTokenListvalue property. You can also modify theDOMTokenListobject using the DOMTokenListadd, DOMTokenListremove, DOMTokenListreplace, and DOMTokenListtoggle methods.
Remarks
Disabled
The HTMLStyleElement.disabled property can be used to get and set whether the stylesheet is disabled (true) or not (false).
[Value("disabled")]
public bool Disabled { get; set; }
Property Value
- bool
Returns
trueif the stylesheet is disabled, or there is no associated stylesheet; otherwisefalse.
The value isfalseby default (if there is an associated stylesheet).The property can be used to enable or disable an associated stylesheet.
Setting the property totruewhen there is no associated stylesheet has no effect.
Remarks
Note that there is no corresponding disabled attribute on the HTML <style> element.
-SVGStyleElement.Disabled
Media
The HTMLStyleElement.media property specifies the
intended destination medium for style information.
[Value("media")]
public string Media { get; set; }
Property Value
- string
A string describing a single medium or a comma-separated list.
Remarks
Type
IMPORTANT
DeprecatedHTMLStyleElement.type property returns the type of the current style.The value mirrors the HTML
<style> element's type attribute.
[Value("type")]
public string Type { get; set; }
Property Value
- string
The permitted values are an empty string or a case-insensitive match for "text/css".