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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11419294: Use language or userlanguage (IE) depending on what's defined in the browser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: remove parens from getter! Created 8 years 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 | « no previous file | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library html; 1 library html;
2 2
3 import 'dart:html_common'; 3 import 'dart:html_common';
4 import 'dart:isolate'; 4 import 'dart:isolate';
5 import 'dart:json'; 5 import 'dart:json';
6 import 'dart:svg' as svg; 6 import 'dart:svg' as svg;
7 import 'dart:web_audio' as web_audio; 7 import 'dart:web_audio' as web_audio;
8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
9 // for details. All rights reserved. Use of this source code is governed by a 9 // for details. All rights reserved. Use of this source code is governed by a
10 // BSD-style license that can be found in the LICENSE file. 10 // BSD-style license that can be found in the LICENSE file.
(...skipping 5999 matching lines...) Expand 10 before | Expand all | Expand 10 after
6010 6010
6011 /// @domName DirectoryReaderSync.readEntries; @docsEditable true 6011 /// @domName DirectoryReaderSync.readEntries; @docsEditable true
6012 @Returns('_EntryArraySync') @Creates('_EntryArraySync') 6012 @Returns('_EntryArraySync') @Creates('_EntryArraySync')
6013 List<EntrySync> readEntries() native; 6013 List<EntrySync> readEntries() native;
6014 } 6014 }
6015 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6015 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6016 // for details. All rights reserved. Use of this source code is governed by a 6016 // for details. All rights reserved. Use of this source code is governed by a
6017 // BSD-style license that can be found in the LICENSE file. 6017 // BSD-style license that can be found in the LICENSE file.
6018 6018
6019 6019
6020 /**
6021 * Represents an HTML <div> element.
6022 *
6023 * The [DivElement] is a generic container for content and does not have any
6024 * special significance. It is functionally similar to [SpanElement].
6025 *
6026 * The [DivElement] is a block-level element, as opposed to [SpanElement],
6027 * which is an inline-level element.
6028 *
6029 * Example usage:
6030 *
6031 * DivElement div = new DivElement();
6032 * div.text = 'Here's my new DivElem
6033 * document.body.elements.add(elem);
6034 *
6035 * See also:
6036 *
6037 * * [HTML <div> element](http://www.w3.org/TR/html-markup/div.html) from W3C.
6038 * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) f rom W3C.
6039 * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes) from W3C.
6040 */
6041 /// @domName HTMLDivElement; @docsEditable true 6020 /// @domName HTMLDivElement; @docsEditable true
6042 class DivElement extends Element implements Element native "*HTMLDivElement" { 6021 class DivElement extends Element implements Element native "*HTMLDivElement" {
6043 6022
6044 factory DivElement() => document.$dom_createElement("div"); 6023 factory DivElement() => document.$dom_createElement("div");
6045 } 6024 }
6046 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6025 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6047 // for details. All rights reserved. Use of this source code is governed by a 6026 // for details. All rights reserved. Use of this source code is governed by a
6048 // BSD-style license that can be found in the LICENSE file. 6027 // BSD-style license that can be found in the LICENSE file.
6049 6028
6050 6029
(...skipping 18 matching lines...) Expand all
6069 /// @domName Document.body; @docsEditable true 6048 /// @domName Document.body; @docsEditable true
6070 @JSName('body') 6049 @JSName('body')
6071 Element $dom_body; 6050 Element $dom_body;
6072 6051
6073 /// @domName Document.charset; @docsEditable true 6052 /// @domName Document.charset; @docsEditable true
6074 String charset; 6053 String charset;
6075 6054
6076 /// @domName Document.cookie; @docsEditable true 6055 /// @domName Document.cookie; @docsEditable true
6077 String cookie; 6056 String cookie;
6078 6057
6079 /// Returns the [Window] associated with the document.
6080 /// @domName Document.defaultView; @docsEditable true 6058 /// @domName Document.defaultView; @docsEditable true
6081 Window get window => _convertNativeToDart_Window(this._window); 6059 Window get window => _convertNativeToDart_Window(this._window);
6082 @JSName('defaultView') 6060 @JSName('defaultView')
6083 @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object') 6061 @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
6084 final dynamic _window; 6062 final dynamic _window;
6085 6063
6086 /// @domName Document.documentElement; @docsEditable true 6064 /// @domName Document.documentElement; @docsEditable true
6087 final Element documentElement; 6065 final Element documentElement;
6088 6066
6089 /// @domName Document.domain; @docsEditable true 6067 /// @domName Document.domain; @docsEditable true
(...skipping 6699 matching lines...) Expand 10 before | Expand all | Expand 10 after
12789 final int totalJSHeapSize; 12767 final int totalJSHeapSize;
12790 12768
12791 /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true 12769 /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true
12792 final int usedJSHeapSize; 12770 final int usedJSHeapSize;
12793 } 12771 }
12794 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 12772 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
12795 // for details. All rights reserved. Use of this source code is governed by a 12773 // for details. All rights reserved. Use of this source code is governed by a
12796 // BSD-style license that can be found in the LICENSE file. 12774 // BSD-style license that can be found in the LICENSE file.
12797 12775
12798 12776
12799 /**
12800 * An HTML <menu> element.
12801 *
12802 * A <menu> element represents an unordered list of menu commands.
12803 *
12804 * See also:
12805 *
12806 * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu) from MDN.
12807 * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-e lement) from the W3C.
12808 */
12809 /// @domName HTMLMenuElement; @docsEditable true 12777 /// @domName HTMLMenuElement; @docsEditable true
12810 class MenuElement extends Element implements Element native "*HTMLMenuElement" { 12778 class MenuElement extends Element implements Element native "*HTMLMenuElement" {
12811 12779
12812 factory MenuElement() => document.$dom_createElement("menu"); 12780 factory MenuElement() => document.$dom_createElement("menu");
12813 } 12781 }
12814 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 12782 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
12815 // for details. All rights reserved. Use of this source code is governed by a 12783 // for details. All rights reserved. Use of this source code is governed by a
12816 // BSD-style license that can be found in the LICENSE file. 12784 // BSD-style license that can be found in the LICENSE file.
12817 12785
12818 12786
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
13395 Node setNamedItemNS(Node node) native; 13363 Node setNamedItemNS(Node node) native;
13396 } 13364 }
13397 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 13365 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
13398 // for details. All rights reserved. Use of this source code is governed by a 13366 // for details. All rights reserved. Use of this source code is governed by a
13399 // BSD-style license that can be found in the LICENSE file. 13367 // BSD-style license that can be found in the LICENSE file.
13400 13368
13401 13369
13402 /// @domName Navigator; @docsEditable true 13370 /// @domName Navigator; @docsEditable true
13403 class Navigator native "*Navigator" { 13371 class Navigator native "*Navigator" {
13404 13372
13373 /// @domName Navigator.language; @docsEditable true
13374 String get language => JS('String', '#.language || #.userLanguage', this,
13375 this);
13376
13405 /// @domName Navigator.appCodeName; @docsEditable true 13377 /// @domName Navigator.appCodeName; @docsEditable true
13406 final String appCodeName; 13378 final String appCodeName;
13407 13379
13408 /// @domName Navigator.appName; @docsEditable true 13380 /// @domName Navigator.appName; @docsEditable true
13409 final String appName; 13381 final String appName;
13410 13382
13411 /// @domName Navigator.appVersion; @docsEditable true 13383 /// @domName Navigator.appVersion; @docsEditable true
13412 final String appVersion; 13384 final String appVersion;
13413 13385
13414 /// @domName Navigator.cookieEnabled; @docsEditable true 13386 /// @domName Navigator.cookieEnabled; @docsEditable true
13415 final bool cookieEnabled; 13387 final bool cookieEnabled;
13416 13388
13417 /// @domName Navigator.geolocation; @docsEditable true 13389 /// @domName Navigator.geolocation; @docsEditable true
13418 final Geolocation geolocation; 13390 final Geolocation geolocation;
13419 13391
13420 /// @domName Navigator.language; @docsEditable true
13421 final String language;
13422
13423 /// @domName Navigator.mimeTypes; @docsEditable true 13392 /// @domName Navigator.mimeTypes; @docsEditable true
13424 final DOMMimeTypeArray mimeTypes; 13393 final DOMMimeTypeArray mimeTypes;
13425 13394
13426 /// @domName Navigator.onLine; @docsEditable true 13395 /// @domName Navigator.onLine; @docsEditable true
13427 final bool onLine; 13396 final bool onLine;
13428 13397
13429 /// @domName Navigator.platform; @docsEditable true 13398 /// @domName Navigator.platform; @docsEditable true
13430 final String platform; 13399 final String platform;
13431 13400
13432 /// @domName Navigator.plugins; @docsEditable true 13401 /// @domName Navigator.plugins; @docsEditable true
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
13468 return; 13437 return;
13469 } 13438 }
13470 var options_2 = convertDartToNative_Dictionary(options); 13439 var options_2 = convertDartToNative_Dictionary(options);
13471 _webkitGetUserMedia_2(options_2, successCallback); 13440 _webkitGetUserMedia_2(options_2, successCallback);
13472 return; 13441 return;
13473 } 13442 }
13474 @JSName('webkitGetUserMedia') 13443 @JSName('webkitGetUserMedia')
13475 void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successC allback, NavigatorUserMediaErrorCallback errorCallback) native; 13444 void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successC allback, NavigatorUserMediaErrorCallback errorCallback) native;
13476 @JSName('webkitGetUserMedia') 13445 @JSName('webkitGetUserMedia')
13477 void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successC allback) native; 13446 void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successC allback) native;
13447
13478 } 13448 }
13479 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 13449 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
13480 // for details. All rights reserved. Use of this source code is governed by a 13450 // for details. All rights reserved. Use of this source code is governed by a
13481 // BSD-style license that can be found in the LICENSE file. 13451 // BSD-style license that can be found in the LICENSE file.
13482 13452
13483 13453
13484 /// @domName NavigatorUserMediaError; @docsEditable true 13454 /// @domName NavigatorUserMediaError; @docsEditable true
13485 class NavigatorUserMediaError native "*NavigatorUserMediaError" { 13455 class NavigatorUserMediaError native "*NavigatorUserMediaError" {
13486 13456
13487 static const int PERMISSION_DENIED = 1; 13457 static const int PERMISSION_DENIED = 1;
(...skipping 11591 matching lines...) Expand 10 before | Expand all | Expand 10 after
25079 if (length < 0) throw new ArgumentError('length'); 25049 if (length < 0) throw new ArgumentError('length');
25080 if (start < 0) throw new RangeError.value(start); 25050 if (start < 0) throw new RangeError.value(start);
25081 int end = start + length; 25051 int end = start + length;
25082 if (end > a.length) throw new RangeError.value(end); 25052 if (end > a.length) throw new RangeError.value(end);
25083 for (int i = start; i < end; i++) { 25053 for (int i = start; i < end; i++) {
25084 accumulator.add(a[i]); 25054 accumulator.add(a[i]);
25085 } 25055 }
25086 return accumulator; 25056 return accumulator;
25087 } 25057 }
25088 } 25058 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698