| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of html; |
| 6 |
| 5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 7 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 6 factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(); | 8 factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(); |
| 7 $!MEMBERS | 9 $!MEMBERS |
| 8 $if DART2JS | 10 $if DART2JS |
| 9 GainNode createGain() { | 11 GainNode createGain() { |
| 10 if (JS('bool', '#.createGain !== undefined', this)) { | 12 if (JS('bool', '#.createGain !== undefined', this)) { |
| 11 return JS('GainNode', '#.createGain()', this); | 13 return JS('GainNode', '#.createGain()', this); |
| 12 } else { | 14 } else { |
| 13 return JS('GainNode', '#.createGainNode()', this); | 15 return JS('GainNode', '#.createGainNode()', this); |
| 14 } | 16 } |
| 15 } | 17 } |
| 16 | 18 |
| 17 ScriptProcessorNode createScriptProcessor(int bufferSize, | 19 ScriptProcessorNode createScriptProcessor(int bufferSize, |
| 18 [int numberOfInputChannels, int numberOfOutputChannels]) { | 20 [int numberOfInputChannels, int numberOfOutputChannels]) { |
| 19 var function = JS('dynamic', '#.createScriptProcessor || ' | 21 var function = JS('dynamic', '#.createScriptProcessor || ' |
| 20 '#.createJavaScriptNode', this, this); | 22 '#.createJavaScriptNode', this, this); |
| 21 if (?numberOfOutputChannels) { | 23 if (?numberOfOutputChannels) { |
| 22 return JS('ScriptProcessorNode', '#.call(#, #, #, #)', function, this, | 24 return JS('ScriptProcessorNode', '#.call(#, #, #, #)', function, this, |
| 23 bufferSize, numberOfInputChannels, numberOfOutputChannels); | 25 bufferSize, numberOfInputChannels, numberOfOutputChannels); |
| 24 } else if (?numberOfInputChannels) { | 26 } else if (?numberOfInputChannels) { |
| 25 return JS('ScriptProcessorNode', '#.call(#, #, #)', function, this, | 27 return JS('ScriptProcessorNode', '#.call(#, #, #)', function, this, |
| 26 bufferSize, numberOfInputChannels); | 28 bufferSize, numberOfInputChannels); |
| 27 } else { | 29 } else { |
| 28 return JS('ScriptProcessorNode', '#.call(#, #)', function, this, | 30 return JS('ScriptProcessorNode', '#.call(#, #)', function, this, |
| 29 bufferSize); | 31 bufferSize); |
| 30 } | 32 } |
| 31 } | 33 } |
| 32 $endif | 34 $endif |
| 33 } | 35 } |
| OLD | NEW |