| Index: tools/dom/src/WrappedEvent.dart
|
| diff --git a/tools/dom/src/WrappedEvent.dart b/tools/dom/src/WrappedEvent.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..92b13f97b97487a53dde21c2481e819b1025a0b8
|
| --- /dev/null
|
| +++ b/tools/dom/src/WrappedEvent.dart
|
| @@ -0,0 +1,54 @@
|
| +// 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 dart.html;
|
| +
|
| +/**
|
| + * Helper class to implement custom events which wrap DOM events.
|
| + */
|
| +class _WrappedEvent implements Event {
|
| + final Event wrapped;
|
| + _WrappedEvent(this.wrapped);
|
| +
|
| + bool get bubbles => wrapped.bubbles;
|
| +
|
| + bool get cancelBubble => wrapped.bubbles;
|
| + void set cancelBubble(bool value) {
|
| + wrapped.cancelBubble = value;
|
| + }
|
| +
|
| + bool get cancelable => wrapped.cancelable;
|
| +
|
| + DataTransfer get clipboardData => wrapped.clipboardData;
|
| +
|
| + EventTarget get currentTarget => wrapped.currentTarget;
|
| +
|
| + bool get defaultPrevented => wrapped.defaultPrevented;
|
| +
|
| + int get eventPhase => wrapped.eventPhase;
|
| +
|
| + EventTarget get target => wrapped.target;
|
| +
|
| + int get timeStamp => wrapped.timeStamp;
|
| +
|
| + String get type => wrapped.type;
|
| +
|
| + void $dom_initEvent(String eventTypeArg, bool canBubbleArg,
|
| + bool cancelableArg) {
|
| + throw new UnsupportedError(
|
| + 'Cannot initialize this Event.');
|
| + }
|
| +
|
| + void preventDefault() {
|
| + wrapped.preventDefault();
|
| + }
|
| +
|
| + void stopImmediatePropagation() {
|
| + wrapped.stopImmediatePropagation();
|
| + }
|
| +
|
| + void stopPropagation() {
|
| + wrapped.stopPropagation();
|
| + }
|
| +}
|
|
|