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
AudioWorkletNode options serialization is underdefined #1971
Comments
What's the difference between the option 2 and 3? How do you specify the target global in the algorithm? |
Hmm. I guess what we are doing with the resulting object is structured cloning it, not converting it back to a dictionary, so maybe there is no difference in practice, because structured cloning is never affected by the prototype, right? (This claim needs to be carefully double-checked!) If that's correct, then we can just use https://heycam.github.io/webidl/#dictionary-to-es as-is; it picks up the global from the ambient "current Realm" state, which should be fine here. |
Yes. It's just an intermediate step for the post-messaging. |
Note that someone still needs to:
|
|
https://webaudio.github.io/web-audio-api/#instantiation-of-AudioWorkletNode-and-AudioWorkletProcessor step 7 says:
But at this point options is an IDL dictionary (in particular an
AudioWorkletNodeOptions
), whileStructuredSerialize
takes as input an IDL value, not an ES value. It's not 100% clear where this ES value should come from. Possible options are:AudioWorkletNodeOptions
was created from. This is not generally available from a dictionary, though.These are all observably different from each other when proxies and getters on Object.prototype are involved.
The spec should really define what happens here, and there should be tests for the behavior.
@karlt
The text was updated successfully, but these errors were encountered: