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

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

Issue 18920008: Add point to Window class and Window polyfills of screen. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 $!MEMBERS 270 $!MEMBERS
271 271
272 @DomName('DOMWindow.beforeunloadEvent') 272 @DomName('DOMWindow.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('DOMWindow.onbeforeunload') 277 @DomName('DOMWindow.onbeforeunload')
278 @DocsEditable() 278 @DocsEditable()
279 Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this); 279 Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
280
281 void moveTo(Point p) => $dom_moveTo(p.x, p.y);
282 int get screenX() => Device.isIE ? $dom_screenLeft : $dom_screenX;
283 int get screenY() => Device.isIE ? $dom_screenTop : $dom_screenY;
280 } 284 }
281 285
282 /** 286 /**
283 * Event object that is fired before the window is closed. 287 * Event object that is fired before the window is closed.
284 * 288 *
285 * The standard window close behavior can be prevented by setting the 289 * The standard window close behavior can be prevented by setting the
286 * [returnValue]. This will display a dialog to the user confirming that they 290 * [returnValue]. This will display a dialog to the user confirming that they
287 * want to close the page. 291 * want to close the page.
288 */ 292 */
289 abstract class BeforeUnloadEvent implements Event { 293 abstract class BeforeUnloadEvent implements Event {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 return wrapped.returnValue; 332 return wrapped.returnValue;
329 }); 333 });
330 334
331 return controller.stream; 335 return controller.stream;
332 } 336 }
333 337
334 String getEventType(EventTarget target) { 338 String getEventType(EventTarget target) {
335 return _eventType; 339 return _eventType;
336 } 340 }
337 } 341 }
OLDNEW
« sdk/lib/html/dart2js/html_dart2js.dart ('K') | « tools/dom/scripts/htmlrenamer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698