Table of Contents

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, 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.

See also on MDN

Constructors

HTMLStyleElement()

public HTMLStyleElement()

Properties

Blocking

The blocking property of the HTMLStyleElement interface is a string indicating that certain operations should be blocked on the fetching of critical subresources.

[Value("blocking")]
public DOMTokenList Blocking { get; }

Property Value

DOMTokenList

A string. Must be a space-separated list of blocking tokens listed below indicating the operations that are to be blocked:

Remarks

It reflects the blocking attribute of the style element.

-Blocking
-Blocking

See also on MDN

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 true if the stylesheet is disabled, or there is no associated stylesheet; otherwise false.
The value is false by default (if there is an associated stylesheet).The property can be used to enable or disable an associated stylesheet.
Setting the property to true when there is no associated stylesheet has no effect.

Remarks

Note that there is no corresponding disabled attribute on the HTML <style> element.

-SVGStyleElement.Disabled

See also on MDN

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
Deprecated
The HTMLStyleElement.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".

Remarks

Authors should not use this property or rely on the value.

-Type

See also on MDN