You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AudioWorkletNodeOptions.processorOptions should not default to null. #2011
Describe the issue
Because it is defaulting to null, the processor always get null for the field even the main scope option object is undefined. We should make it a plain object.
I'm not aware of any benefit in processorOptions being nullable.
If the value could default to the empty object, then that would permit clients to test for members without throwing a TypeError when processorOptions is not specified, but I don't think it is possible to specify an empty object default in WebIDL.
So, yes, the proposed change seems the best option available.
Activity
guest271314 commentedon Jul 25, 2019
hoch commentedon Jul 25, 2019
The setup code:
When
nodeOptions = {}:When
nodeOptions = {foo: 'bar'}:When
nodeOptions = {foo:bar, processorOptions: {foo:'bar'}}:hoch commentedon Jul 25, 2019
From WG Telecon:
Remove the
nullabletype and the default value fromprocessorOptions.karlt commentedon Jul 25, 2019
I'm not aware of any benefit in
processorOptionsbeing nullable.If the value could default to the empty object, then that would permit clients to test for members without throwing a TypeError when
processorOptionsis not specified, but I don't think it is possible to specify an empty object default in WebIDL.So, yes, the proposed change seems the best option available.