Do not assign a default value to WakeLockRequestOptions.signal#203
Do not assign a default value to WakeLockRequestOptions.signal#203rakuco wants to merge 1 commit intow3c:gh-pagesfrom
Conversation
In Web IDL, the following `WakeLockRequestOptions` instances in JavaScript
should have the same effect (a dictionary that does _not_ have the `signal`
member present):
{}
{signal: undefined}
which are different from
{signal: null}
which means a `WakeLockRequestOptions` dictionary with one member, `signal`,
whose value is `null`.
Setting a default value to the nullable member `signal` means we'd always
have a `signal` member in the dictionary even when we do not set it at
all (first 2 cases), which is not needed and does not make sense.
|
This original change was requested by @marcoscaceres so he probably has comments |
Agree. The problem was (is?) that the algorithm prose was defaulting it to However, I'd still like clarity on what happens when |
You have a point, I don't think this needs to be nullable at all. Most other occurrences of I'll send a new PR making |
In Web IDL, the following
WakeLockRequestOptionsinstances in JavaScriptshould have the same effect (a dictionary that does not have the
signalmember present):
which are different from
which means a
WakeLockRequestOptionsdictionary with one member,signal,whose value is
null.Setting a default value to the nullable member
signalmeans we'd alwayshave a
signalmember in the dictionary even when we do not set it atall (first 2 cases), which is not needed and does not make sense.
Preview | Diff