blob: 06b5456eaefdb852571905605e3ca304a52d79f3 [file] [log] [blame]
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
factory $CLASSNAME(Map dictionary) {
// TODO(efortuna): Remove this check if when you can actually construct with
// the unprefixed RTCIceCandidate in Firefox (currently both are defined,
// but one can't be used as a constructor).
var constructorName = JS('', 'window[#]',
Device.isFirefox ? '${Device.propertyPrefix}RTCIceCandidate' :
'RTCIceCandidate');
return JS('RtcIceCandidate', 'new #(#)', constructorName,
convertDartToNative_SerializedScriptValue(dictionary));
}
$!MEMBERS
}