Skip to content

Commit

Permalink
Update the css-animations IDL file (#9768)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebjerring authored Jun 19, 2018
1 parent 28b5323 commit 726bce7
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
36 changes: 36 additions & 0 deletions css/css-animations/idlharness.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>css-animations IDL tests</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
</head>

<body>
<div id="log"></div>

<script>
'use strict';

promise_test(async () => {
const idl = await fetch('/interfaces/css-animations.idl').then(r => r.text());
const cssom = await fetch('/interfaces/cssom.idl').then(r => r.text());
const dom = await fetch('/interfaces/dom.idl').then(r => r.text());

const idl_array = new IdlArray();
idl_array.add_idls(idl);
idl_array.add_dependency_idls(cssom);
idl_array.add_dependency_idls(dom);

idl_array.test();
}, 'Test css-animations IDL implementation');
</script>

</body>

</html>
45 changes: 45 additions & 0 deletions interfaces/css-animations.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "CSS Animations Level 1" spec.
// See: https://drafts.csswg.org/css-animations/

[Exposed=Window,
Constructor(CSSOMString type, optional AnimationEventInit animationEventInitDict)]
interface AnimationEvent : Event {
readonly attribute CSSOMString animationName;
readonly attribute double elapsedTime;
readonly attribute CSSOMString pseudoElement;
};
dictionary AnimationEventInit : EventInit {
CSSOMString animationName = "";
double elapsedTime = 0.0;
CSSOMString pseudoElement = "";
};

partial interface CSSRule {
const unsigned short KEYFRAMES_RULE = 7;
const unsigned short KEYFRAME_RULE = 8;
};

[Exposed=Window]
interface CSSKeyframeRule : CSSRule {
attribute CSSOMString keyText;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};

[Exposed=Window]
interface CSSKeyframesRule : CSSRule {
attribute CSSOMString name;
readonly attribute CSSRuleList cssRules;

void appendRule(CSSOMString rule);
void deleteRule(CSSOMString select);
CSSKeyframeRule? findRule(CSSOMString select);
};

partial interface GlobalEventHandlers {
attribute EventHandler onanimationstart;
attribute EventHandler onanimationiteration;
attribute EventHandler onanimationend;
attribute EventHandler onanimationcancel;
};

0 comments on commit 726bce7

Please sign in to comment.