Skip to content

[css-animation-worklet] IDL for StatelessAnimator doesn't make sense #906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bzbarsky opened this issue Jun 27, 2019 · 2 comments
Closed
Assignees
Labels
css-animationworklet-1 CSS AnimationWorklet API

Comments

@bzbarsky
Copy link

I was reading through https://drafts.css-houdini.org/css-animationworklet-1/ and the IDL global/exposure bits don't make any sense to me. For example, the draft has:

[Exposed=AnimationWorklet, Global=AnimationWorklet, Constructor
 (optional any options
)]
interface StatelessAnimator {
};

This defines an object which is supposed to be a global (hence Global=AnimationWorklet) but has a Constructor, so you can create multiple of them in a given global?

The IDL spec explicitly says for [Global]:

The [Global] extended attribute must not be used on an interface that can have more than one object implementing it in the same Realm.

which means it's not really compatible with [Constructor]. I filed whatwg/webidl#744 to make that very explicit.

Anyway, is this object constructible or a global? It can't really be both.

@bzbarsky
Copy link
Author

StatefulAnimator has the same problem.

@majido
Copy link
Contributor

majido commented Jun 27, 2019

You are correct. These shouldn't really have the [Global] attribute. This is a mistake. 😞

Given that we are dropping these interfaces as part of #850 so I will not attempt a fix directly to this issue.

@majido majido closed this as completed Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-animationworklet-1 CSS AnimationWorklet API
Projects
None yet
Development

No branches or pull requests

2 participants