KeyframeKit / KeyframesFactory
Interface: KeyframesFactory
Properties
Error
ts
readonly Error: {
KeyframesRuleNameTypeError: typeof KeyframesRuleNameTypeError;
SourceTypeError: typeof SourceTypeError;
StyleSheetImportError: typeof StyleSheetImportError;
};KeyframesRuleNameTypeError
ts
readonly KeyframesRuleNameTypeError: typeof KeyframesRuleNameTypeError;SourceTypeError
ts
readonly SourceTypeError: typeof SourceTypeError;StyleSheetImportError
ts
readonly StyleSheetImportError: typeof StyleSheetImportError;Methods
getAllStyleSheetKeyframesRules()
ts
getAllStyleSheetKeyframesRules(obj: {
in: KeyframesFactorySource;
}): ParsedKeyframesRules;Parameters
obj
in
Returns
getDocumentStyleSheetsOnLoad()
ts
getDocumentStyleSheetsOnLoad(obj?: {
document?: Document;
}): Promise<StyleSheetList>;Parameters
obj?
document?
Document = window.document
Returns
getStyleSheetKeyframes()
ts
getStyleSheetKeyframes(obj: {
in: KeyframesFactorySource;
of: string;
}): ParsedKeyframes | undefined;Parameters
obj
in
of
string
The name of the @keyframes rule to get keyframes from.
Returns
ParsedKeyframes | undefined
importStyleSheet()
ts
importStyleSheet(url: string): Promise<CSSStyleSheet>;Parameters
url
string
Returns
Remarks
Note: @import rules won't be resolved in imported stylesheets.
See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418.
parseKeyframesRule()
ts
parseKeyframesRule(obj: {
rule: CSSKeyframesRule;
}): ParsedKeyframes;