blob: bf7bd07a02341b41c7dc3771afde663abbb6a515 [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.
// WARNING: Do not edit - generated code.
part of $LIBRARYNAME;
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
factory $CLASSNAME(String type,
{bool canBubble: true, bool cancelable: true, String oldUrl,
String newUrl}) {
$if DART2JS
var options = {
'canBubble' : canBubble,
'cancelable' : cancelable,
'oldURL': oldUrl,
'newURL': newUrl,
};
return JS('HashChangeEvent', 'new HashChangeEvent(#, #)',
type, convertDartToNative_Dictionary(options));
$else
// TODO(alanknight): This is required while we're on Dartium 39, but will need
// to look like dart2js with later versions when initHashChange is removed.
var event = document._createEvent("HashChangeEvent");
event._initHashChangeEvent(type, canBubble, cancelable, oldUrl, newUrl);
return event;
$endif
}
$!MEMBERS
}