Re: [css-houdini-drafts] [css-paint-api] Running author function without proper preparation.

`callback interface` has different semantics to what we are doing here.

Using a callback interface would mean each time we need to access the `paint` or `animate` function off the instance, instead what we do here is look up the `paint` method upon registration, and then invoke that each time.

This was done to be consistent with custom elements which uses the exact same semantics.
@domenic has some of the history here, but this pattern is consistent with the other "register a class" methods on the platform.

-- 
GitHub Notification of comment by bfgeek
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/743#issuecomment-379458507 using your GitHub account

Received on Saturday, 7 April 2018 10:07:29 UTC