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

I didn't know that Web IDL now supports [Construct a callback function type value](https://heycam.github.io/webidl/#construct-a-callback-function).  That's great and matches this use case.

I have another request, somewhat orthogonal to this, but somewhat relevant to this.

In [registerPaint](https://drafts.css-houdini.org/css-paint-api/#dom-paintworkletglobalscope-registerpaint) algorithm:
The algorithm is preparing "paint function" as a callback function (but exactly speaking, the manner to create a callback function is not correct.  This is another place to be fixed.  But this is a side note).
The "paint function" is invoked as a callback function in [invoke a paint callback](https://drafts.css-houdini.org/css-paint-api/#invoke-a-paint-callback) with "paintInstance" as the callback this value.

This is pretty similar to "callback interface" (not callback function) in Web IDL.  Why don't we define these algorithms using "callback interface"?  I'd recommend a well-defined common manner rather than a unique way.


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

Received on Friday, 6 April 2018 10:16:07 UTC