Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: tools/dom/templates/html/impl/impl_Window.darttemplate

Issue 20385002: Added shim for scrollX and scrollY for IE 9. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 $dom_moveTo(p.x, p.y);
283 } 283 }
284
285 $if DART2JS
286 int get scrollX => JS('bool', '("scrollX" in #)', this) ? JS('int',
287 '#.scrollX', this) : document.documentElement.scrollLeft;
288 int get scrollY => JS('bool', '("scrollY" in #)', this) ? JS('int',
289 '#.scrollY', this) : document.documentElement.scrollTop;
290 $endif
284 } 291 }
285 292
286 /** 293 /**
287 * Event object that is fired before the window is closed. 294 * Event object that is fired before the window is closed.
288 * 295 *
289 * The standard window close behavior can be prevented by setting the 296 * The standard window close behavior can be prevented by setting the
290 * [returnValue]. This will display a dialog to the user confirming that they 297 * [returnValue]. This will display a dialog to the user confirming that they
291 * want to close the page. 298 * want to close the page.
292 */ 299 */
293 abstract class BeforeUnloadEvent implements Event { 300 abstract class BeforeUnloadEvent implements Event {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 return wrapped.returnValue; 339 return wrapped.returnValue;
333 }); 340 });
334 341
335 return controller.stream; 342 return controller.stream;
336 } 343 }
337 344
338 String getEventType(EventTarget target) { 345 String getEventType(EventTarget target) {
339 return _eventType; 346 return _eventType;
340 } 347 }
341 } 348 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698