| 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 $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 $if DART2JS | 7 $if DART2JS |
| 8 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS native "Wind
ow,DOMWindow" { | 8 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS native "Wind
ow,DOMWindow" { |
| 9 $else | 9 $else |
| 10 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 10 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 @DomName('Window.beforeunloadEvent') | 272 @DomName('Window.beforeunloadEvent') |
| 273 @DocsEditable() | 273 @DocsEditable() |
| 274 static const EventStreamProvider<BeforeUnloadEvent> beforeUnloadEvent = | 274 static const EventStreamProvider<BeforeUnloadEvent> beforeUnloadEvent = |
| 275 const _BeforeUnloadEventStreamProvider('beforeunload'); | 275 const _BeforeUnloadEventStreamProvider('beforeunload'); |
| 276 | 276 |
| 277 @DomName('Window.onbeforeunload') | 277 @DomName('Window.onbeforeunload') |
| 278 @DocsEditable() | 278 @DocsEditable() |
| 279 Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this); | 279 Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this); |
| 280 | 280 |
| 281 void moveTo(Point p) { | 281 void moveTo(Point p) { |
| 282 $dom_moveTo(p.x, p.y); | 282 moveTo(p.x, p.y); |
| 283 } | 283 } |
| 284 | 284 |
| 285 $if DART2JS | 285 $if DART2JS |
| 286 int get scrollX => JS('bool', '("scrollX" in #)', this) ? JS('int', | 286 int get scrollX => JS('bool', '("scrollX" in #)', this) ? JS('int', |
| 287 '#.scrollX', this) : document.documentElement.scrollLeft; | 287 '#.scrollX', this) : document.documentElement.scrollLeft; |
| 288 int get scrollY => JS('bool', '("scrollY" in #)', this) ? JS('int', | 288 int get scrollY => JS('bool', '("scrollY" in #)', this) ? JS('int', |
| 289 '#.scrollY', this) : document.documentElement.scrollTop; | 289 '#.scrollY', this) : document.documentElement.scrollTop; |
| 290 $endif | 290 $endif |
| 291 } | 291 } |
| 292 | 292 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 return wrapped.returnValue; | 339 return wrapped.returnValue; |
| 340 }); | 340 }); |
| 341 | 341 |
| 342 return controller.stream; | 342 return controller.stream; |
| 343 } | 343 } |
| 344 | 344 |
| 345 String getEventType(EventTarget target) { | 345 String getEventType(EventTarget target) { |
| 346 return _eventType; | 346 return _eventType; |
| 347 } | 347 } |
| 348 } | 348 } |
| OLD | NEW |