[dart:html] Change AudioNode.connect to be nullable
AudioNode.connect can return undefined in the case where destination is an AudioParam. Note this is not a breaking change since it's a private method. This unbreaks users who use native null assertions. Change-Id: I517863798b0ebe4859d195dcadc2696716ebc8a8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237500 Commit-Queue: Srujan Gaddam <srujzs@google.com> Reviewed-by: Riley Porter <rileyporter@google.com>
This commit is contained in:
committed by
Commit Bot
parent
c9d2394c02
commit
a16bd37ed2
@@ -386,7 +386,7 @@ class AudioNode extends EventTarget {
|
||||
int? get numberOfOutputs native;
|
||||
|
||||
@JSName('connect')
|
||||
AudioNode _connect(destination, [int? output, int? input]) native;
|
||||
AudioNode? _connect(destination, [int? output, int? input]) native;
|
||||
|
||||
void disconnect([destination_OR_output, int? output, int? input]) native;
|
||||
|
||||
|
||||
@@ -450,6 +450,15 @@ interface AudioContext {
|
||||
[DartSuppress] DelayNode createDelayNode(optional double maxDelayTime);
|
||||
};
|
||||
|
||||
[DartSupplemental]
|
||||
interface AudioNode : EventTarget {
|
||||
[DartSuppress] AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
|
||||
[DartSuppress] void connect(AudioParam destination, optional unsigned long output = 0);
|
||||
AudioNode? connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
|
||||
// Scripts don't unify return types, so this is changed from void to do so.
|
||||
AudioNode? connect(AudioParam destination, optional unsigned long output = 0);
|
||||
};
|
||||
|
||||
[DartSupplemental]
|
||||
interface HTMLInputElement {
|
||||
[DartSuppress] attribute boolean webkitSpeech;
|
||||
|
||||
Reference in New Issue
Block a user