KeyframeKit / KeyframesFactory / getStyleSheetKeyframes
Function getStyleSheetKeyframes()
ts
function getStyleSheetKeyframes(obj: {
in: CSSStyleSheetSource;
of: string;
}): ParsedKeyframes | undefined;Gets a CSS keyframes rule from a stylesheet or stylesheet list, then converts it to Web Animations API keyframes.
Parameters
obj
in
The stylesheet or stylesheet list where the rule resides.
of
string
The name of the @keyframes rule to get keyframes from.
Returns
ParsedKeyframes | undefined
Throws
KeyframesRuleNameTypeError- Thrown if keyframes rule name is not a string.
SourceTypeError- Thrown if source is not a
CSSStyleSheetor aStyleSheetList.
- Thrown if source is not a