public class CSSRule extends HtmlUnitScriptable
CSSRule.| Modifier and Type | Field and Description |
|---|---|
static short |
CHARSET_RULE
The rule is a
CSSCharsetRule. |
static short |
COUNTER_STYLE_RULE
The rule is a
CSSCounterStyleRule. |
static short |
FONT_FACE_RULE
The rule is a
CSSFontFaceRule. |
static short |
FONT_FEATURE_VALUES_RULE
The rule is a
CSSCounterStyleRule. |
static short |
IMPORT_RULE
The rule is a
CSSImportRule. |
static short |
KEYFRAME_RULE
The rule is a
CSSKeyframeRule. |
static short |
KEYFRAMES_RULE
The rule is a
CSSKeyframesRule. |
static short |
MEDIA_RULE
The rule is a
CSSMediaRule. |
static short |
NAMESPACE_RULE
The rule is a
CSSNamespaceRule. |
static short |
PAGE_RULE
The rule is a
CSSPageRule. |
protected static Pattern |
REPLACEMENT_IE
RegEx to fix css text for IE.
|
static short |
STYLE_RULE
The rule is a
CSSStyleRule. |
static short |
SUPPORTS_RULE
The rule is a
CSSSupportsRule. |
static short |
UNKNOWN_RULE
The rule is a
CSSUnknownRule. |
static short |
VIEWPORT_RULE
The rule is a
CSSViewportRule. |
| Modifier | Constructor and Description |
|---|---|
|
CSSRule()
Creates a new instance.
|
protected |
CSSRule(CSSStyleSheet stylesheet,
com.gargoylesoftware.css.dom.AbstractCSSRuleImpl rule)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static CSSRule |
create(CSSStyleSheet stylesheet,
com.gargoylesoftware.css.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.
|
CSSStyleSheet |
getParentStyleSheet()
Returns the style sheet that contains this rule.
|
protected com.gargoylesoftware.css.dom.AbstractCSSRuleImpl |
getRule()
Returns the wrapped rule.
|
short |
getType()
Returns the type of the rule.
|
void |
setCssText(String cssText)
|
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScopeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, 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, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, sizeprotected static final Pattern REPLACEMENT_IE
public static final short UNKNOWN_RULE
CSSUnknownRule.public static final short STYLE_RULE
CSSStyleRule.public static final short CHARSET_RULE
CSSCharsetRule.public static final short IMPORT_RULE
CSSImportRule.public static final short MEDIA_RULE
CSSMediaRule.public static final short FONT_FACE_RULE
CSSFontFaceRule.public static final short PAGE_RULE
CSSPageRule.public static final short KEYFRAMES_RULE
CSSKeyframesRule.public static final short KEYFRAME_RULE
CSSKeyframeRule.public static final short NAMESPACE_RULE
CSSNamespaceRule.public static final short COUNTER_STYLE_RULE
CSSCounterStyleRule.public static final short SUPPORTS_RULE
CSSSupportsRule.public static final short FONT_FEATURE_VALUES_RULE
CSSCounterStyleRule.public static final short VIEWPORT_RULE
CSSViewportRule.public CSSRule()
protected CSSRule(CSSStyleSheet stylesheet, com.gargoylesoftware.css.dom.AbstractCSSRuleImpl rule)
stylesheet - the Stylesheet of this rule.rule - the wrapped rulepublic static CSSRule create(CSSStyleSheet stylesheet, com.gargoylesoftware.css.dom.AbstractCSSRuleImpl rule)
stylesheet - the Stylesheet of this rulerule - the wrapped rulepublic short getType()
public String getCssText()
public void setCssText(String cssText)
cssText - ignoredpublic CSSStyleSheet getParentStyleSheet()
public CSSRule getParentRule()
null.protected com.gargoylesoftware.css.dom.AbstractCSSRuleImpl getRule()
Copyright © 2002–2022 Gargoyle Software Inc.. All rights reserved.