Skip to content
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

[css-paint-api] class constructor valid flag is unused #329

Closed
dbaron opened this issue Oct 26, 2016 · 1 comment
Closed

[css-paint-api] class constructor valid flag is unused #329

dbaron opened this issue Oct 26, 2016 · 1 comment

Comments

@dbaron
Copy link
Member

dbaron commented Oct 26, 2016

The concepts section of the paint API spec defines a "class constructor valid flag".

However, the algorithm that sets this flag always sets it to true, since it throws exceptions earlier rather than doing things that would set it to false.

It seems like this flag can be removed given that the earlier errors throw exceptions. Unless, that is, it's needed to address #328 .

(I got here from w3ctag/design-reviews#140 .)

@bfgeek
Copy link
Contributor

bfgeek commented Jan 3, 2017

This flag is used to only try to construct a class instance once. E.g. if the constructor threw an error for example (in "draw a paint image"). Where it was set was misspelled and hence not referenced properly.

E.g.

registerPaint('foo', class {
  constructor() { throw Error(); } // will once get called once.
});

@bfgeek bfgeek closed this as completed in b41aa79 Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants