public class CSSRule extends HtmlUnitScriptable
CSSRule.org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunction| Modifier and Type | Field and Description |
|---|---|
static int |
CHARSET_RULE
The rule is a
CSSCharsetRule. |
static int |
COUNTER_STYLE_RULE
The rule is a
CSSCounterStyleRule. |
static int |
FONT_FACE_RULE
The rule is a
CSSFontFaceRule. |
static int |
FONT_FEATURE_VALUES_RULE
The rule is a
CSSCounterStyleRule. |
static int |
IMPORT_RULE
The rule is a
CSSImportRule. |
static int |
KEYFRAME_RULE
The rule is a
CSSKeyframeRule. |
static int |
KEYFRAMES_RULE
The rule is a
CSSKeyframesRule. |
static int |
MARGIN_RULE
The rule is a
CSSMerginRule. |
static int |
MEDIA_RULE
The rule is a
CSSMediaRule. |
static int |
NAMESPACE_RULE
The rule is a
CSSNamespaceRule. |
static int |
PAGE_RULE
The rule is a
CSSPageRule. |
static int |
STYLE_RULE
The rule is a
CSSStyleRule. |
static int |
SUPPORTS_RULE
The rule is a
CSSSupportsRule. |
static int |
UNKNOWN_RULE
The rule is a
CSSUnknownRule. |
static int |
VIEWPORT_RULE
The rule is a
CSSViewportRule. |
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Modifier | Constructor and Description |
|---|---|
|
CSSRule()
Creates a new instance.
|
protected |
CSSRule(CSSStyleSheet stylesheet,
org.htmlunit.cssparser.dom.AbstractCSSRuleImpl rule)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static CSSRule |
create(CSSStyleSheet stylesheet,
org.htmlunit.cssparser.dom.AbstractCSSRuleImpl rule)
Creates a CSSRule according to the specified rule type.
|
String |
getCssText()
Returns the parsable textual representation of the rule.
|
CSSRule |
getParentRule()
If this rule is contained inside another rule (e.g. a style rule inside a @media block),
this is the containing rule.
|
CSSStyleSheet |
getParentStyleSheet()
Returns the style sheet that contains this rule.
|
protected org.htmlunit.cssparser.dom.AbstractCSSRuleImpl |
getRule()
Returns the wrapped rule.
|
int |
getType()
Returns the type of the rule.
|
void |
jsConstructor()
Creates an instance.
|
void |
setCssText(String cssText)
|
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getWindow, getWindow, getWindowFromTopCallScope, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromiseapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkSlotRemoval, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, sizecreateSlotMappublic static final int UNKNOWN_RULE
CSSUnknownRule.public static final int STYLE_RULE
CSSStyleRule.public static final int CHARSET_RULE
CSSCharsetRule.public static final int IMPORT_RULE
CSSImportRule.public static final int MEDIA_RULE
CSSMediaRule.public static final int FONT_FACE_RULE
CSSFontFaceRule.public static final int PAGE_RULE
CSSPageRule.public static final int KEYFRAMES_RULE
CSSKeyframesRule.public static final int KEYFRAME_RULE
CSSKeyframeRule.public static final int MARGIN_RULE
CSSMerginRule.public static final int NAMESPACE_RULE
CSSNamespaceRule.public static final int COUNTER_STYLE_RULE
CSSCounterStyleRule.public static final int SUPPORTS_RULE
CSSSupportsRule.public static final int FONT_FEATURE_VALUES_RULE
CSSCounterStyleRule.public static final int VIEWPORT_RULE
CSSViewportRule.public CSSRule()
protected CSSRule(CSSStyleSheet stylesheet, org.htmlunit.cssparser.dom.AbstractCSSRuleImpl rule)
stylesheet - the Stylesheet of this rule.rule - the wrapped rulepublic void jsConstructor()
public static CSSRule create(CSSStyleSheet stylesheet, org.htmlunit.cssparser.dom.AbstractCSSRuleImpl rule)
stylesheet - the Stylesheet of this rulerule - the wrapped rulepublic int getType()
public String getCssText()
public void setCssText(String cssText)
cssText - ignoredpublic CSSStyleSheet getParentStyleSheet()
public CSSRule getParentRule()
null.protected org.htmlunit.cssparser.dom.AbstractCSSRuleImpl getRule()
Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.