OLD | NEW |
1 #library('html'); | 1 #library('html'); |
2 | 2 |
3 #import('dart:dom', prefix:'dom'); | 3 #import('dart:dom', prefix:'dom'); |
4 #import('dart:htmlimpl'); | 4 #import('dart:htmlimpl'); |
5 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 5 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
6 // for details. All rights reserved. Use of this source code is governed by a | 6 // for details. All rights reserved. Use of this source code is governed by a |
7 // BSD-style license that can be found in the LICENSE file. | 7 // BSD-style license that can be found in the LICENSE file. |
8 | 8 |
9 // DO NOT EDIT | 9 // DO NOT EDIT |
10 // Auto-generated Dart HTML library. | 10 // Auto-generated Dart HTML library. |
(...skipping 11276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11287 | 11287 |
11288 DeviceOrientationEvent(String type, double alpha, double beta, double gamma, | 11288 DeviceOrientationEvent(String type, double alpha, double beta, double gamma, |
11289 [bool canBubble, bool cancelable]); | 11289 [bool canBubble, bool cancelable]); |
11290 | 11290 |
11291 num get alpha(); | 11291 num get alpha(); |
11292 | 11292 |
11293 num get beta(); | 11293 num get beta(); |
11294 | 11294 |
11295 num get gamma(); | 11295 num get gamma(); |
11296 } | 11296 } |
11297 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 11297 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
11298 // for details. All rights reserved. Use of this source code is governed by a | 11298 // for details. All rights reserved. Use of this source code is governed by a |
11299 // BSD-style license that can be found in the LICENSE file. | 11299 // BSD-style license that can be found in the LICENSE file. |
11300 | 11300 |
11301 interface DocumentEvents extends ElementEvents { | 11301 interface DocumentEvents extends ElementEvents { |
11302 EventListenerList get readyStateChange(); | 11302 EventListenerList get readyStateChange(); |
11303 EventListenerList get selectionChange(); | 11303 EventListenerList get selectionChange(); |
11304 EventListenerList get contentLoaded(); | 11304 EventListenerList get contentLoaded(); |
11305 } | 11305 } |
11306 | 11306 |
11307 // TODO(jacobr): add DocumentFragment ctor | 11307 // TODO(jacobr): add DocumentFragment ctor |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11348 | 11348 |
11349 // TODO(jacobr): should this be removed? Users could write document.query("tit
le").text instead. | 11349 // TODO(jacobr): should this be removed? Users could write document.query("tit
le").text instead. |
11350 String get title(); | 11350 String get title(); |
11351 | 11351 |
11352 void set title(String value); | 11352 void set title(String value); |
11353 | 11353 |
11354 bool get webkitHidden(); | 11354 bool get webkitHidden(); |
11355 | 11355 |
11356 String get webkitVisibilityState(); | 11356 String get webkitVisibilityState(); |
11357 | 11357 |
11358 Future<Range> caretRangeFromPoint([int x, int y]); | 11358 /** Only call when [window.inMeasurementFrame] is true. */ |
| 11359 Range caretRangeFromPoint([int x, int y]); |
11359 | 11360 |
11360 Future<Element> elementFromPoint([int x, int y]); | 11361 /** Only call when [window.inMeasurementFrame] is true. */ |
| 11362 Element elementFromPoint([int x, int y]); |
11361 | 11363 |
11362 bool execCommand([String command, bool userInterface, String value]); | 11364 bool execCommand([String command, bool userInterface, String value]); |
11363 | 11365 |
11364 // TODO(jacobr): remove once a new API is specified | 11366 // TODO(jacobr): remove once a new API is specified |
11365 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, | 11367 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, |
11366 int width, int height); | 11368 int width, int height); |
11367 | 11369 |
11368 bool queryCommandEnabled([String command]); | 11370 bool queryCommandEnabled([String command]); |
11369 | 11371 |
11370 bool queryCommandIndeterm([String command]); | 11372 bool queryCommandIndeterm([String command]); |
11371 | 11373 |
11372 bool queryCommandState([String command]); | 11374 bool queryCommandState([String command]); |
11373 | 11375 |
11374 bool queryCommandSupported([String command]); | 11376 bool queryCommandSupported([String command]); |
11375 | 11377 |
11376 String queryCommandValue([String command]); | 11378 String queryCommandValue([String command]); |
11377 | 11379 |
11378 String get manifest(); | 11380 String get manifest(); |
11379 | 11381 |
11380 void set manifest(String value); | 11382 void set manifest(String value); |
11381 | 11383 |
11382 DocumentEvents get on(); | 11384 DocumentEvents get on(); |
11383 | |
11384 Future<ElementRect> get rect(); | |
11385 } | 11385 } |
11386 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 11386 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
11387 // for details. All rights reserved. Use of this source code is governed by a | 11387 // for details. All rights reserved. Use of this source code is governed by a |
11388 // BSD-style license that can be found in the LICENSE file. | 11388 // BSD-style license that can be found in the LICENSE file. |
11389 | 11389 |
11390 interface DocumentFragment extends Element default DocumentFragmentWrappingImple
mentation { | 11390 interface DocumentFragment extends Element default DocumentFragmentWrappingImple
mentation { |
11391 | 11391 |
11392 DocumentFragment(); | 11392 DocumentFragment(); |
11393 | 11393 |
11394 DocumentFragment.html(String html); | 11394 DocumentFragment.html(String html); |
(...skipping 30 matching lines...) Expand all Loading... |
11425 static final int UPDATEREADY = 4; | 11425 static final int UPDATEREADY = 4; |
11426 | 11426 |
11427 int get status(); | 11427 int get status(); |
11428 | 11428 |
11429 void swapCache(); | 11429 void swapCache(); |
11430 | 11430 |
11431 void update(); | 11431 void update(); |
11432 | 11432 |
11433 DOMApplicationCacheEvents get on(); | 11433 DOMApplicationCacheEvents get on(); |
11434 } | 11434 } |
11435 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 11435 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
11436 // for details. All rights reserved. Use of this source code is governed by a | 11436 // for details. All rights reserved. Use of this source code is governed by a |
11437 // BSD-style license that can be found in the LICENSE file. | 11437 // BSD-style license that can be found in the LICENSE file. |
11438 | 11438 |
11439 interface ElementList extends List<Element> { | 11439 interface ElementList extends List<Element> { |
11440 // TODO(jacobr): add element batch manipulation methods. | 11440 // TODO(jacobr): add element batch manipulation methods. |
11441 Element get first(); | 11441 Element get first(); |
11442 // TODO(jacobr): add insertAt | 11442 // TODO(jacobr): add insertAt |
11443 } | 11443 } |
11444 | 11444 |
11445 class DeferredElementRect { | |
11446 // TODO(jacobr) | |
11447 } | |
11448 | |
11449 interface ElementEvents extends Events { | 11445 interface ElementEvents extends Events { |
11450 EventListenerList get abort(); | 11446 EventListenerList get abort(); |
11451 EventListenerList get beforeCopy(); | 11447 EventListenerList get beforeCopy(); |
11452 EventListenerList get beforeCut(); | 11448 EventListenerList get beforeCut(); |
11453 EventListenerList get beforePaste(); | 11449 EventListenerList get beforePaste(); |
11454 EventListenerList get blur(); | 11450 EventListenerList get blur(); |
11455 EventListenerList get change(); | 11451 EventListenerList get change(); |
11456 EventListenerList get click(); | 11452 EventListenerList get click(); |
11457 EventListenerList get contextMenu(); | 11453 EventListenerList get contextMenu(); |
11458 EventListenerList get copy(); | 11454 EventListenerList get copy(); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11612 Element get parent(); | 11608 Element get parent(); |
11613 | 11609 |
11614 void scrollByLines([int lines]); | 11610 void scrollByLines([int lines]); |
11615 | 11611 |
11616 void scrollByPages([int pages]); | 11612 void scrollByPages([int pages]); |
11617 | 11613 |
11618 void scrollIntoView([bool centerIfNeeded]); | 11614 void scrollIntoView([bool centerIfNeeded]); |
11619 | 11615 |
11620 bool matchesSelector([String selectors]); | 11616 bool matchesSelector([String selectors]); |
11621 | 11617 |
11622 Future<ElementRect> get rect(); | 11618 /** Only access members when [window.inMeasurementFrame] is true. */ |
| 11619 ElementRect get rect(); |
11623 | 11620 |
11624 Future<CSSStyleDeclaration> get computedStyle(); | 11621 /** Only call when [window.inMeasurementFrame] is true. */ |
| 11622 CSSStyleDeclaration get computedStyle(); |
11625 | 11623 |
11626 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement); | 11624 /** Only call when [window.inMeasurementFrame] is true. */ |
| 11625 CSSStyleDeclaration getComputedStyle(String pseudoElement); |
11627 | 11626 |
11628 ElementEvents get on(); | 11627 ElementEvents get on(); |
11629 | 11628 |
11630 Element clone(bool deep); | 11629 Element clone(bool deep); |
11631 } | 11630 } |
11632 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 11631 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
11633 // for details. All rights reserved. Use of this source code is governed by a | 11632 // for details. All rights reserved. Use of this source code is governed by a |
11634 // BSD-style license that can be found in the LICENSE file. | 11633 // BSD-style license that can be found in the LICENSE file. |
11635 | 11634 |
11636 interface ErrorEvent extends Event default ErrorEventWrappingImplementation { | 11635 interface ErrorEvent extends Event default ErrorEventWrappingImplementation { |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12479 int get attrChange(); | 12478 int get attrChange(); |
12480 | 12479 |
12481 String get attrName(); | 12480 String get attrName(); |
12482 | 12481 |
12483 String get newValue(); | 12482 String get newValue(); |
12484 | 12483 |
12485 String get prevValue(); | 12484 String get prevValue(); |
12486 | 12485 |
12487 Node get relatedNode(); | 12486 Node get relatedNode(); |
12488 } | 12487 } |
12489 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 12488 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
12490 // for details. All rights reserved. Use of this source code is governed by a | 12489 // for details. All rights reserved. Use of this source code is governed by a |
12491 // BSD-style license that can be found in the LICENSE file. | 12490 // BSD-style license that can be found in the LICENSE file. |
12492 | 12491 |
12493 // TODO(jacobr): stop extending eventTarget. | 12492 // TODO(jacobr): stop extending eventTarget. |
12494 interface Node extends EventTarget { | 12493 interface Node extends EventTarget { |
12495 | 12494 |
12496 NodeList get nodes(); | 12495 NodeList get nodes(); |
12497 | 12496 |
12498 // TODO: The type of value should be Collection<Node>. See http://b/5392897 | 12497 // TODO: The type of value should be Collection<Node>. See http://b/5392897 |
12499 void set nodes(value); | 12498 void set nodes(value); |
(...skipping 15 matching lines...) Expand all Loading... |
12515 Node remove(); | 12514 Node remove(); |
12516 | 12515 |
12517 bool contains(Node otherNode); | 12516 bool contains(Node otherNode); |
12518 | 12517 |
12519 // TODO(jacobr): remove when/if Array supports a method similar to | 12518 // TODO(jacobr): remove when/if Array supports a method similar to |
12520 // insertBefore or we switch NodeList to implement LinkedList rather than | 12519 // insertBefore or we switch NodeList to implement LinkedList rather than |
12521 // array. | 12520 // array. |
12522 Node insertBefore(Node newChild, Node refChild); | 12521 Node insertBefore(Node newChild, Node refChild); |
12523 | 12522 |
12524 Node clone(bool deep); | 12523 Node clone(bool deep); |
| 12524 |
| 12525 bool get _inDocument(); |
12525 } | 12526 } |
12526 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 12527 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
12527 // for details. All rights reserved. Use of this source code is governed by a | 12528 // for details. All rights reserved. Use of this source code is governed by a |
12528 // BSD-style license that can be found in the LICENSE file. | 12529 // BSD-style license that can be found in the LICENSE file. |
12529 | 12530 |
12530 interface NodeList extends List<Node> { | 12531 interface NodeList extends List<Node> { |
12531 Node get first(); | 12532 Node get first(); |
12532 } | 12533 } |
12533 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 12534 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
12534 // for details. All rights reserved. Use of this source code is governed by a | 12535 // for details. All rights reserved. Use of this source code is governed by a |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13059 int get wheelDelta(); | 13060 int get wheelDelta(); |
13060 | 13061 |
13061 int get wheelDeltaX(); | 13062 int get wheelDeltaX(); |
13062 | 13063 |
13063 int get wheelDeltaY(); | 13064 int get wheelDeltaY(); |
13064 | 13065 |
13065 int get x(); | 13066 int get x(); |
13066 | 13067 |
13067 int get y(); | 13068 int get y(); |
13068 } | 13069 } |
13069 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 13070 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
13070 // for details. All rights reserved. Use of this source code is governed by a | 13071 // for details. All rights reserved. Use of this source code is governed by a |
13071 // BSD-style license that can be found in the LICENSE file. | 13072 // BSD-style license that can be found in the LICENSE file. |
13072 | 13073 |
| 13074 typedef void LayoutCallback(); |
| 13075 typedef LayoutCallback MeasurementCallback(); |
| 13076 |
13073 interface WindowEvents extends Events { | 13077 interface WindowEvents extends Events { |
13074 EventListenerList get abort(); | 13078 EventListenerList get abort(); |
13075 EventListenerList get beforeUnload(); | 13079 EventListenerList get beforeUnload(); |
13076 EventListenerList get blur(); | 13080 EventListenerList get blur(); |
13077 EventListenerList get canPlay(); | 13081 EventListenerList get canPlay(); |
13078 EventListenerList get canPlayThrough(); | 13082 EventListenerList get canPlayThrough(); |
13079 EventListenerList get change(); | 13083 EventListenerList get change(); |
13080 EventListenerList get click(); | 13084 EventListenerList get click(); |
13081 EventListenerList get contextMenu(); | 13085 EventListenerList get contextMenu(); |
13082 EventListenerList get dblClick(); | 13086 EventListenerList get dblClick(); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13362 int setInterval(TimeoutHandler handler, int timeout); | 13366 int setInterval(TimeoutHandler handler, int timeout); |
13363 | 13367 |
13364 int setTimeout(TimeoutHandler handler, int timeout); | 13368 int setTimeout(TimeoutHandler handler, int timeout); |
13365 | 13369 |
13366 Object showModalDialog(String url, [Object dialogArgs, String featureArgs]); | 13370 Object showModalDialog(String url, [Object dialogArgs, String featureArgs]); |
13367 | 13371 |
13368 void stop(); | 13372 void stop(); |
13369 | 13373 |
13370 void webkitCancelRequestAnimationFrame(int id); | 13374 void webkitCancelRequestAnimationFrame(int id); |
13371 | 13375 |
13372 // TODO(jacobr): make these return Future<Point>. | |
13373 Point webkitConvertPointFromNodeToPage([Node node, Point p]); | 13376 Point webkitConvertPointFromNodeToPage([Node node, Point p]); |
13374 | |
13375 Point webkitConvertPointFromPageToNode([Node node, Point p]); | 13377 Point webkitConvertPointFromPageToNode([Node node, Point p]); |
13376 | 13378 |
13377 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme
nt element]); | 13379 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme
nt element]); |
13378 | 13380 |
13379 /** | 13381 /** |
13380 * Executes a [callback] after the next batch of browser layout measurements | 13382 * Executes [callback] after the event loop unwinds but before the page is |
13381 * has completed or would have completed if any browser layout measurements | 13383 * rendered. Inside the callback, synchronous element measurement is |
13382 * had been scheduled. | 13384 * allowed and dom manipulation that could trigger a layout is disallowed. |
| 13385 * The [callback] may return a closure that is run in the normal |
| 13386 * context where dom manipulation is allowed but sync measurement is |
| 13387 * disallowed. |
13383 */ | 13388 */ |
13384 void requestLayoutFrame(TimeoutHandler callback); | 13389 void requestMeasurementFrame(MeasurementCallback callback); |
| 13390 |
| 13391 /** |
| 13392 * True iff within a call to [:requestMeasurementFrame:] |
| 13393 * When inside a measurement frame, any DOM manipulation that could trigger |
| 13394 * a layout is prohibited to avoid accidentally triggering large numbers of |
| 13395 * layouts. |
| 13396 */ |
| 13397 bool get inMeasurementFrame(); |
13385 | 13398 |
13386 // Window open(String url, String target, WindowSpec features); | 13399 // Window open(String url, String target, WindowSpec features); |
13387 | 13400 |
13388 WindowEvents get on(); | 13401 WindowEvents get on(); |
13389 } | 13402 } |
13390 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 13403 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
13391 // for details. All rights reserved. Use of this source code is governed by a | 13404 // for details. All rights reserved. Use of this source code is governed by a |
13392 // BSD-style license that can be found in the LICENSE file. | 13405 // BSD-style license that can be found in the LICENSE file. |
13393 | 13406 |
13394 interface WorkerEvents extends AbstractWorkerEvents { | 13407 interface WorkerEvents extends AbstractWorkerEvents { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13490 EventListenerList get abort(); | 13503 EventListenerList get abort(); |
13491 EventListenerList get error(); | 13504 EventListenerList get error(); |
13492 EventListenerList get load(); | 13505 EventListenerList get load(); |
13493 EventListenerList get loadStart(); | 13506 EventListenerList get loadStart(); |
13494 EventListenerList get progress(); | 13507 EventListenerList get progress(); |
13495 } | 13508 } |
13496 | 13509 |
13497 interface XMLHttpRequestUpload extends EventTarget { | 13510 interface XMLHttpRequestUpload extends EventTarget { |
13498 XMLHttpRequestUploadEvents get on(); | 13511 XMLHttpRequestUploadEvents get on(); |
13499 } | 13512 } |
OLD | NEW |