Changed @domName annotation in comment to full fledge @DomName annotation.

Review URL: https://codereview.chromium.org//11887006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17154 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
amouravski@google.com 2013-01-16 19:01:07 +00:00
parent ddd106b523
commit 038af964dc
61 changed files with 13016 additions and 13340 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -41,3 +41,16 @@ class SupportedBrowser {
class Experimental {
const Experimental();
}
/**
* Metadata that specifies the DOM name associated with the element.
*
* This is used for API generation.
*
* [name] should be formatted as `interface.member`.
*/
class DomName {
final String name;
const DomName(this.name);
}

View file

@ -133,26 +133,31 @@ const _annotation_Returns_IDBKey = const Returns(_idbKey);
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBCursor; @docsEditable true
/// @docsEditable true
@DomName('IDBCursor')
class Cursor native "*IDBCursor" {
/// @domName IDBCursor.direction; @docsEditable true
/// @docsEditable true
@DomName('IDBCursor.direction')
final String direction;
/// @domName IDBCursor.key; @docsEditable true
@_annotation_Creates_IDBKey @_annotation_Returns_IDBKey
/// @docsEditable true
@DomName('IDBCursor.key') @_annotation_Creates_IDBKey @_annotation_Returns_IDBKey
final Object key;
/// @domName IDBCursor.primaryKey; @docsEditable true
/// @docsEditable true
@DomName('IDBCursor.primaryKey')
final Object primaryKey;
/// @domName IDBCursor.source; @docsEditable true
/// @docsEditable true
@DomName('IDBCursor.source')
final dynamic source;
/// @domName IDBCursor.advance; @docsEditable true
/// @docsEditable true
@DomName('IDBCursor.advance')
void advance(int count) native;
/// @domName IDBCursor.continueFunction; @docsEditable true
/// @docsEditable true
void continueFunction([/*IDBKey*/ key]) {
if (?key) {
var key_1 = _convertDartToNative_IDBKey(key);
@ -163,19 +168,23 @@ class Cursor native "*IDBCursor" {
return;
}
@JSName('continue')
@DomName('IDBCursor.continue')
void _continueFunction_1(key) native;
@JSName('continue')
@DomName('IDBCursor.continue')
void _continueFunction_2() native;
/// @domName IDBCursor.delete; @docsEditable true
/// @docsEditable true
@DomName('IDBCursor.delete')
Request delete() native;
/// @domName IDBCursor.update; @docsEditable true
/// @docsEditable true
Request update(/*any*/ value) {
var value_1 = convertDartToNative_SerializedScriptValue(value);
return _update_1(value_1);
}
@JSName('update')
@DomName('IDBCursor.update')
Request _update_1(value) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -183,11 +192,12 @@ class Cursor native "*IDBCursor" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBCursorWithValue; @docsEditable true
/// @docsEditable true
@DomName('IDBCursorWithValue')
class CursorWithValue extends Cursor native "*IDBCursorWithValue" {
/// @domName IDBCursorWithValue.value; @docsEditable true
@annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
/// @docsEditable true
@DomName('IDBCursorWithValue.value') @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
final Object value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -195,7 +205,11 @@ class CursorWithValue extends Cursor native "*IDBCursorWithValue" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBDatabase
@DomName('IDBDatabase')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
@Experimental()
class Database extends EventTarget native "*IDBDatabase" {
Transaction transaction(storeName_OR_storeNames, String mode) {
@ -222,28 +236,34 @@ class Database extends EventTarget native "*IDBDatabase" {
static const EventStreamProvider<UpgradeNeededEvent> versionChangeEvent = const EventStreamProvider<UpgradeNeededEvent>('versionchange');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
DatabaseEvents get on =>
new DatabaseEvents(this);
/// @domName IDBDatabase.name; @docsEditable true
/// @docsEditable true
@DomName('IDBDatabase.name')
final String name;
/// @domName IDBDatabase.objectStoreNames; @docsEditable true
/// @docsEditable true
@DomName('IDBDatabase.objectStoreNames')
@Returns('DomStringList') @Creates('DomStringList')
final List<String> objectStoreNames;
/// @domName IDBDatabase.version; @docsEditable true
/// @docsEditable true
@DomName('IDBDatabase.version')
final dynamic version;
/// @domName IDBDatabase.addEventListener; @docsEditable true
/// @docsEditable true
@JSName('addEventListener')
@DomName('IDBDatabase.addEventListener')
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
/// @domName IDBDatabase.close; @docsEditable true
/// @docsEditable true
@DomName('IDBDatabase.close')
void close() native;
/// @domName IDBDatabase.createObjectStore; @docsEditable true
/// @docsEditable true
ObjectStore createObjectStore(String name, [Map options]) {
if (?options) {
var options_1 = convertDartToNative_Dictionary(options);
@ -252,19 +272,24 @@ class Database extends EventTarget native "*IDBDatabase" {
return _createObjectStore_2(name);
}
@JSName('createObjectStore')
@DomName('IDBDatabase.createObjectStore')
ObjectStore _createObjectStore_1(name, options) native;
@JSName('createObjectStore')
@DomName('IDBDatabase.createObjectStore')
ObjectStore _createObjectStore_2(name) native;
/// @domName IDBDatabase.deleteObjectStore; @docsEditable true
/// @docsEditable true
@DomName('IDBDatabase.deleteObjectStore')
void deleteObjectStore(String name) native;
/// @domName IDBDatabase.dispatchEvent; @docsEditable true
/// @docsEditable true
@JSName('dispatchEvent')
@DomName('IDBDatabase.dispatchEvent')
bool $dom_dispatchEvent(Event evt) native;
/// @domName IDBDatabase.removeEventListener; @docsEditable true
/// @docsEditable true
@JSName('removeEventListener')
@DomName('IDBDatabase.removeEventListener')
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
Stream<Event> get onAbort => abortEvent.forTarget(this);
@ -293,7 +318,7 @@ class DatabaseEvents extends Events {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBFactory
@DomName('IDBFactory')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
@ -310,23 +335,26 @@ class IdbFactory native "*IDBFactory" {
}
/// @domName IDBFactory.cmp; @docsEditable true
/// @docsEditable true
int cmp(/*IDBKey*/ first, /*IDBKey*/ second) {
var first_1 = _convertDartToNative_IDBKey(first);
var second_2 = _convertDartToNative_IDBKey(second);
return _cmp_1(first_1, second_2);
}
@JSName('cmp')
@DomName('IDBFactory.cmp')
int _cmp_1(first, second) native;
/// @domName IDBFactory.deleteDatabase; @docsEditable true
/// @docsEditable true
@DomName('IDBFactory.deleteDatabase')
VersionChangeRequest deleteDatabase(String name) native;
/// @domName IDBFactory.open; @docsEditable true
@Returns('Request') @Creates('Request') @Creates('Database')
/// @docsEditable true
@DomName('IDBFactory.open') @Returns('Request') @Creates('Request') @Creates('Database')
OpenDBRequest open(String name, [int version]) native;
/// @domName IDBFactory.webkitGetDatabaseNames; @docsEditable true
/// @docsEditable true
@DomName('IDBFactory.webkitGetDatabaseNames')
Request webkitGetDatabaseNames() native;
}
@ -335,25 +363,31 @@ class IdbFactory native "*IDBFactory" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBIndex; @docsEditable true
/// @docsEditable true
@DomName('IDBIndex')
class Index native "*IDBIndex" {
/// @domName IDBIndex.keyPath; @docsEditable true
/// @docsEditable true
@DomName('IDBIndex.keyPath')
final dynamic keyPath;
/// @domName IDBIndex.multiEntry; @docsEditable true
/// @docsEditable true
@DomName('IDBIndex.multiEntry')
final bool multiEntry;
/// @domName IDBIndex.name; @docsEditable true
/// @docsEditable true
@DomName('IDBIndex.name')
final String name;
/// @domName IDBIndex.objectStore; @docsEditable true
/// @docsEditable true
@DomName('IDBIndex.objectStore')
final ObjectStore objectStore;
/// @domName IDBIndex.unique; @docsEditable true
/// @docsEditable true
@DomName('IDBIndex.unique')
final bool unique;
/// @domName IDBIndex.count; @docsEditable true
/// @docsEditable true
Request count([key_OR_range]) {
if (!?key_OR_range) {
return _count_1();
@ -368,13 +402,16 @@ class Index native "*IDBIndex" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('count')
@DomName('IDBIndex.count')
Request _count_1() native;
@JSName('count')
@DomName('IDBIndex.count')
Request _count_2(KeyRange range) native;
@JSName('count')
@DomName('IDBIndex.count')
Request _count_3(key) native;
/// @domName IDBIndex.get; @docsEditable true
/// @docsEditable true
Request get(key) {
if ((key is KeyRange || key == null)) {
return _get_1(key);
@ -386,13 +423,13 @@ class Index native "*IDBIndex" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('get')
@Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
@DomName('IDBIndex.get') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
Request _get_1(KeyRange key) native;
@JSName('get')
@Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
@DomName('IDBIndex.get') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
Request _get_2(key) native;
/// @domName IDBIndex.getKey; @docsEditable true
/// @docsEditable true
Request getKey(key) {
if ((key is KeyRange || key == null)) {
return _getKey_1(key);
@ -404,13 +441,13 @@ class Index native "*IDBIndex" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('getKey')
@Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore')
@DomName('IDBIndex.getKey') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore')
Request _getKey_1(KeyRange key) native;
@JSName('getKey')
@Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore')
@DomName('IDBIndex.getKey') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore')
Request _getKey_2(key) native;
/// @domName IDBIndex.openCursor; @docsEditable true
/// @docsEditable true
Request openCursor([key_OR_range, String direction]) {
if (!?key_OR_range &&
!?direction) {
@ -435,22 +472,22 @@ class Index native "*IDBIndex" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_1() native;
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_2(KeyRange range) native;
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_3(KeyRange range, direction) native;
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_4(key) native;
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_5(key, direction) native;
/// @domName IDBIndex.openKeyCursor; @docsEditable true
/// @docsEditable true
Request openKeyCursor([key_OR_range, String direction]) {
if (!?key_OR_range &&
!?direction) {
@ -475,19 +512,19 @@ class Index native "*IDBIndex" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('openKeyCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openKeyCursor_1() native;
@JSName('openKeyCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openKeyCursor_2(KeyRange range) native;
@JSName('openKeyCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openKeyCursor_3(KeyRange range, direction) native;
@JSName('openKeyCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openKeyCursor_4(key) native;
@JSName('openKeyCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openKeyCursor_5(key, direction) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -495,7 +532,8 @@ class Index native "*IDBIndex" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBKey; @docsEditable true
/// @docsEditable true
@DomName('IDBKey')
class Key native "*IDBKey" {
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -503,52 +541,48 @@ class Key native "*IDBKey" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBKeyRange
@DomName('IDBKeyRange')
class KeyRange native "*IDBKeyRange" {
/**
* @domName IDBKeyRange.only
*/
@DomName('IDBKeyRange.only')
factory KeyRange.only(/*Key*/ value) =>
_KeyRangeFactoryProvider.createKeyRange_only(value);
/**
* @domName IDBKeyRange.lowerBound
*/
@DomName('IDBKeyRange.lowerBound')
factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) =>
_KeyRangeFactoryProvider.createKeyRange_lowerBound(bound, open);
/**
* @domName IDBKeyRange.upperBound
*/
@DomName('IDBKeyRange.upperBound')
factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) =>
_KeyRangeFactoryProvider.createKeyRange_upperBound(bound, open);
/**
* @domName KeyRange.bound
*/
@DomName('KeyRange.bound')
factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper,
[bool lowerOpen = false, bool upperOpen = false]) =>
_KeyRangeFactoryProvider.createKeyRange_bound(
lower, upper, lowerOpen, upperOpen);
/// @domName IDBKeyRange.lower; @docsEditable true
/// @docsEditable true
dynamic get lower => _convertNativeToDart_IDBKey(this._lower);
@JSName('lower')
@DomName('IDBKeyRange.lower')
final dynamic _lower;
/// @domName IDBKeyRange.lowerOpen; @docsEditable true
/// @docsEditable true
@DomName('IDBKeyRange.lowerOpen')
final bool lowerOpen;
/// @domName IDBKeyRange.upper; @docsEditable true
/// @docsEditable true
dynamic get upper => _convertNativeToDart_IDBKey(this._upper);
@JSName('upper')
@DomName('IDBKeyRange.upper')
final dynamic _upper;
/// @domName IDBKeyRange.upperOpen; @docsEditable true
/// @docsEditable true
@DomName('IDBKeyRange.upperOpen')
final bool upperOpen;
/// @domName IDBKeyRange.bound_; @docsEditable true
/// @docsEditable true
static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]) {
if (?upperOpen) {
var lower_1 = _convertDartToNative_IDBKey(lower);
@ -565,13 +599,16 @@ class KeyRange native "*IDBKeyRange" {
return _bound__3(lower_5, upper_6);
}
@JSName('bound')
@DomName('IDBKeyRange.bound')
static KeyRange _bound__1(lower, upper, lowerOpen, upperOpen) native;
@JSName('bound')
@DomName('IDBKeyRange.bound')
static KeyRange _bound__2(lower, upper, lowerOpen) native;
@JSName('bound')
@DomName('IDBKeyRange.bound')
static KeyRange _bound__3(lower, upper) native;
/// @domName IDBKeyRange.lowerBound_; @docsEditable true
/// @docsEditable true
static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) {
if (?open) {
var bound_1 = _convertDartToNative_IDBKey(bound);
@ -581,19 +618,22 @@ class KeyRange native "*IDBKeyRange" {
return _lowerBound__2(bound_2);
}
@JSName('lowerBound')
@DomName('IDBKeyRange.lowerBound')
static KeyRange _lowerBound__1(bound, open) native;
@JSName('lowerBound')
@DomName('IDBKeyRange.lowerBound')
static KeyRange _lowerBound__2(bound) native;
/// @domName IDBKeyRange.only_; @docsEditable true
/// @docsEditable true
static KeyRange only_(/*IDBKey*/ value) {
var value_1 = _convertDartToNative_IDBKey(value);
return _only__1(value_1);
}
@JSName('only')
@DomName('IDBKeyRange.only')
static KeyRange _only__1(value) native;
/// @domName IDBKeyRange.upperBound_; @docsEditable true
/// @docsEditable true
static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) {
if (?open) {
var bound_1 = _convertDartToNative_IDBKey(bound);
@ -603,8 +643,10 @@ class KeyRange native "*IDBKeyRange" {
return _upperBound__2(bound_2);
}
@JSName('upperBound')
@DomName('IDBKeyRange.upperBound')
static KeyRange _upperBound__1(bound, open) native;
@JSName('upperBound')
@DomName('IDBKeyRange.upperBound')
static KeyRange _upperBound__2(bound) native;
}
@ -613,26 +655,32 @@ class KeyRange native "*IDBKeyRange" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBObjectStore; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore')
class ObjectStore native "*IDBObjectStore" {
/// @domName IDBObjectStore.autoIncrement; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore.autoIncrement')
final bool autoIncrement;
/// @domName IDBObjectStore.indexNames; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore.indexNames')
@Returns('DomStringList') @Creates('DomStringList')
final List<String> indexNames;
/// @domName IDBObjectStore.keyPath; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore.keyPath')
final dynamic keyPath;
/// @domName IDBObjectStore.name; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore.name')
final String name;
/// @domName IDBObjectStore.transaction; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore.transaction')
final Transaction transaction;
/// @domName IDBObjectStore.add; @docsEditable true
/// @docsEditable true
Request add(/*any*/ value, [/*IDBKey*/ key]) {
if (?key) {
var value_1 = convertDartToNative_SerializedScriptValue(value);
@ -643,16 +691,17 @@ class ObjectStore native "*IDBObjectStore" {
return _add_2(value_3);
}
@JSName('add')
@Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
@DomName('IDBObjectStore.add') @Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
Request _add_1(value, key) native;
@JSName('add')
@Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
@DomName('IDBObjectStore.add') @Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
Request _add_2(value) native;
/// @domName IDBObjectStore.clear; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore.clear')
Request clear() native;
/// @domName IDBObjectStore.count; @docsEditable true
/// @docsEditable true
Request count([key_OR_range]) {
if (!?key_OR_range) {
return _count_1();
@ -667,13 +716,16 @@ class ObjectStore native "*IDBObjectStore" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('count')
@DomName('IDBObjectStore.count')
Request _count_1() native;
@JSName('count')
@DomName('IDBObjectStore.count')
Request _count_2(KeyRange range) native;
@JSName('count')
@DomName('IDBObjectStore.count')
Request _count_3(key) native;
/// @domName IDBObjectStore.createIndex; @docsEditable true
/// @docsEditable true
Index createIndex(String name, keyPath, [Map options]) {
if ((keyPath is List<String> || keyPath == null) &&
!?options) {
@ -694,15 +746,19 @@ class ObjectStore native "*IDBObjectStore" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('createIndex')
@DomName('IDBObjectStore.createIndex')
Index _createIndex_1(name, List<String> keyPath) native;
@JSName('createIndex')
@DomName('IDBObjectStore.createIndex')
Index _createIndex_2(name, List<String> keyPath, options) native;
@JSName('createIndex')
@DomName('IDBObjectStore.createIndex')
Index _createIndex_3(name, String keyPath) native;
@JSName('createIndex')
@DomName('IDBObjectStore.createIndex')
Index _createIndex_4(name, String keyPath, options) native;
/// @domName IDBObjectStore.delete; @docsEditable true
/// @docsEditable true
Request delete(key_OR_keyRange) {
if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) {
return _delete_1(key_OR_keyRange);
@ -714,14 +770,17 @@ class ObjectStore native "*IDBObjectStore" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('delete')
@DomName('IDBObjectStore.delete')
Request _delete_1(KeyRange keyRange) native;
@JSName('delete')
@DomName('IDBObjectStore.delete')
Request _delete_2(key) native;
/// @domName IDBObjectStore.deleteIndex; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore.deleteIndex')
void deleteIndex(String name) native;
/// @domName IDBObjectStore.getObject; @docsEditable true
/// @docsEditable true
Request getObject(key) {
if ((key is KeyRange || key == null)) {
return _getObject_1(key);
@ -733,16 +792,17 @@ class ObjectStore native "*IDBObjectStore" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('get')
@Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
@DomName('IDBObjectStore.get') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
Request _getObject_1(KeyRange key) native;
@JSName('get')
@Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
@DomName('IDBObjectStore.get') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
Request _getObject_2(key) native;
/// @domName IDBObjectStore.index; @docsEditable true
/// @docsEditable true
@DomName('IDBObjectStore.index')
Index index(String name) native;
/// @domName IDBObjectStore.openCursor; @docsEditable true
/// @docsEditable true
Request openCursor([key_OR_range, String direction]) {
if (!?key_OR_range &&
!?direction) {
@ -767,22 +827,22 @@ class ObjectStore native "*IDBObjectStore" {
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_1() native;
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_2(KeyRange range) native;
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_3(KeyRange range, direction) native;
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_4(key) native;
@JSName('openCursor')
@Returns('Request') @Creates('Request') @Creates('Cursor')
@DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
Request _openCursor_5(key, direction) native;
/// @domName IDBObjectStore.put; @docsEditable true
/// @docsEditable true
Request put(/*any*/ value, [/*IDBKey*/ key]) {
if (?key) {
var value_1 = convertDartToNative_SerializedScriptValue(value);
@ -793,10 +853,10 @@ class ObjectStore native "*IDBObjectStore" {
return _put_2(value_3);
}
@JSName('put')
@Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
@DomName('IDBObjectStore.put') @Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
Request _put_1(value, key) native;
@JSName('put')
@Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
@DomName('IDBObjectStore.put') @Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
Request _put_2(value) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -804,14 +864,16 @@ class ObjectStore native "*IDBObjectStore" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBOpenDBRequest; @docsEditable true
/// @docsEditable true
@DomName('IDBOpenDBRequest')
class OpenDBRequest extends Request implements EventTarget native "*IDBOpenDBRequest" {
static const EventStreamProvider<Event> blockedEvent = const EventStreamProvider<Event>('blocked');
static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = const EventStreamProvider<VersionChangeEvent>('upgradeneeded');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
OpenDBRequestEvents get on =>
new OpenDBRequestEvents(this);
@ -836,49 +898,58 @@ class OpenDBRequestEvents extends RequestEvents {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBRequest; @docsEditable true
/// @docsEditable true
@DomName('IDBRequest')
class Request extends EventTarget native "*IDBRequest" {
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
static const EventStreamProvider<Event> successEvent = const EventStreamProvider<Event>('success');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
RequestEvents get on =>
new RequestEvents(this);
/// @domName IDBRequest.error; @docsEditable true
/// @docsEditable true
@DomName('IDBRequest.error')
final DomError error;
/// @domName IDBRequest.readyState; @docsEditable true
/// @docsEditable true
@DomName('IDBRequest.readyState')
final String readyState;
/// @domName IDBRequest.result; @docsEditable true
/// @docsEditable true
dynamic get result => _convertNativeToDart_IDBAny(this._result);
@JSName('result')
@Creates('Null')
@DomName('IDBRequest.result') @Creates('Null')
final dynamic _result;
/// @domName IDBRequest.source; @docsEditable true
@Creates('Null')
/// @docsEditable true
@DomName('IDBRequest.source') @Creates('Null')
final dynamic source;
/// @domName IDBRequest.transaction; @docsEditable true
/// @docsEditable true
@DomName('IDBRequest.transaction')
final Transaction transaction;
/// @domName IDBRequest.webkitErrorMessage; @docsEditable true
/// @docsEditable true
@DomName('IDBRequest.webkitErrorMessage')
final String webkitErrorMessage;
/// @domName IDBRequest.addEventListener; @docsEditable true
/// @docsEditable true
@JSName('addEventListener')
@DomName('IDBRequest.addEventListener')
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
/// @domName IDBRequest.dispatchEvent; @docsEditable true
/// @docsEditable true
@JSName('dispatchEvent')
@DomName('IDBRequest.dispatchEvent')
bool $dom_dispatchEvent(Event evt) native;
/// @domName IDBRequest.removeEventListener; @docsEditable true
/// @docsEditable true
@JSName('removeEventListener')
@DomName('IDBRequest.removeEventListener')
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
Stream<Event> get onError => errorEvent.forTarget(this);
@ -902,7 +973,8 @@ class RequestEvents extends Events {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBTransaction; @docsEditable true
/// @docsEditable true
@DomName('IDBTransaction')
class Transaction extends EventTarget native "*IDBTransaction" {
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
@ -911,38 +983,48 @@ class Transaction extends EventTarget native "*IDBTransaction" {
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
TransactionEvents get on =>
new TransactionEvents(this);
/// @domName IDBTransaction.db; @docsEditable true
/// @docsEditable true
@DomName('IDBTransaction.db')
final Database db;
/// @domName IDBTransaction.error; @docsEditable true
/// @docsEditable true
@DomName('IDBTransaction.error')
final DomError error;
/// @domName IDBTransaction.mode; @docsEditable true
/// @docsEditable true
@DomName('IDBTransaction.mode')
final String mode;
/// @domName IDBTransaction.webkitErrorMessage; @docsEditable true
/// @docsEditable true
@DomName('IDBTransaction.webkitErrorMessage')
final String webkitErrorMessage;
/// @domName IDBTransaction.abort; @docsEditable true
/// @docsEditable true
@DomName('IDBTransaction.abort')
void abort() native;
/// @domName IDBTransaction.addEventListener; @docsEditable true
/// @docsEditable true
@JSName('addEventListener')
@DomName('IDBTransaction.addEventListener')
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
/// @domName IDBTransaction.dispatchEvent; @docsEditable true
/// @docsEditable true
@JSName('dispatchEvent')
@DomName('IDBTransaction.dispatchEvent')
bool $dom_dispatchEvent(Event evt) native;
/// @domName IDBTransaction.objectStore; @docsEditable true
/// @docsEditable true
@DomName('IDBTransaction.objectStore')
ObjectStore objectStore(String name) native;
/// @domName IDBTransaction.removeEventListener; @docsEditable true
/// @docsEditable true
@JSName('removeEventListener')
@DomName('IDBTransaction.removeEventListener')
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
Stream<Event> get onAbort => abortEvent.forTarget(this);
@ -971,13 +1053,16 @@ class TransactionEvents extends Events {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBVersionChangeEvent; @docsEditable true
/// @docsEditable true
@DomName('IDBVersionChangeEvent')
class UpgradeNeededEvent extends Event native "*IDBVersionChangeEvent" {
/// @domName IDBVersionChangeEvent.newVersion; @docsEditable true
/// @docsEditable true
@DomName('IDBUpgradeNeededEvent.newVersion')
final int newVersion;
/// @domName IDBVersionChangeEvent.oldVersion; @docsEditable true
/// @docsEditable true
@DomName('IDBUpgradeNeededEvent.oldVersion')
final int oldVersion;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -985,10 +1070,12 @@ class UpgradeNeededEvent extends Event native "*IDBVersionChangeEvent" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBVersionChangeEvent; @docsEditable true
/// @docsEditable true
@DomName('IDBVersionChangeEvent')
class VersionChangeEvent extends Event native "*IDBVersionChangeEvent" {
/// @domName IDBVersionChangeEvent.version; @docsEditable true
/// @docsEditable true
@DomName('IDBVersionChangeEvent.version')
final String version;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -996,12 +1083,14 @@ class VersionChangeEvent extends Event native "*IDBVersionChangeEvent" {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBVersionChangeRequest; @docsEditable true
/// @docsEditable true
@DomName('IDBVersionChangeRequest')
class VersionChangeRequest extends Request implements EventTarget native "*IDBVersionChangeRequest" {
static const EventStreamProvider<Event> blockedEvent = const EventStreamProvider<Event>('blocked');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
VersionChangeRequestEvents get on =>
new VersionChangeRequestEvents(this);
@ -1021,6 +1110,7 @@ class VersionChangeRequestEvents extends RequestEvents {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBAny; @docsEditable true
/// @docsEditable true
@DomName('IDBAny')
class _Any native "*IDBAny" {
}

View file

@ -40,28 +40,23 @@ class _KeyRangeFactoryProvider {
// WARNING: Do not edit - generated code.
/// @domName IDBCursor
@DomName('IDBCursor')
class Cursor extends NativeFieldWrapperClass1 {
Cursor.internal();
/** @domName IDBCursor.direction */
@DomName('IDBCursor.direction')
String get direction native "IDBCursor_direction_Getter";
/** @domName IDBCursor.key */
@DomName('IDBCursor.key')
Object get key native "IDBCursor_key_Getter";
/** @domName IDBCursor.primaryKey */
@DomName('IDBCursor.primaryKey')
Object get primaryKey native "IDBCursor_primaryKey_Getter";
/** @domName IDBCursor.source */
@DomName('IDBCursor.source')
dynamic get source native "IDBCursor_source_Getter";
/** @domName IDBCursor.advance */
@DomName('IDBCursor.advance')
void advance(int count) native "IDBCursor_advance_Callback";
void continueFunction([/*IDBKey*/ key]) {
@ -72,20 +67,16 @@ class Cursor extends NativeFieldWrapperClass1 {
_continue_2();
}
/** @domName IDBCursor.continue_1 */
@DomName('IDBCursor.continue_1')
void _continue_1(key) native "IDBCursor_continue_1_Callback";
/** @domName IDBCursor.continue_2 */
@DomName('IDBCursor.continue_2')
void _continue_2() native "IDBCursor_continue_2_Callback";
/** @domName IDBCursor.delete */
@DomName('IDBCursor.delete')
Request delete() native "IDBCursor_delete_Callback";
/** @domName IDBCursor.update */
@DomName('IDBCursor.update')
Request update(Object value) native "IDBCursor_update_Callback";
}
@ -96,12 +87,11 @@ class Cursor extends NativeFieldWrapperClass1 {
// WARNING: Do not edit - generated code.
/// @domName IDBCursorWithValue
@DomName('IDBCursorWithValue')
class CursorWithValue extends Cursor {
CursorWithValue.internal() : super.internal();
/** @domName IDBCursorWithValue.value */
@DomName('IDBCursorWithValue.value')
Object get value native "IDBCursorWithValue_value_Getter";
}
@ -112,7 +102,7 @@ class CursorWithValue extends Cursor {
// WARNING: Do not edit - generated code.
/// @domName IDBDatabase
@DomName('IDBDatabase')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
@ -126,44 +116,36 @@ class Database extends EventTarget {
static const EventStreamProvider<UpgradeNeededEvent> versionChangeEvent = const EventStreamProvider<UpgradeNeededEvent>('versionchange');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
DatabaseEvents get on =>
new DatabaseEvents(this);
/** @domName IDBDatabase.name */
@DomName('IDBDatabase.name')
String get name native "IDBDatabase_name_Getter";
/** @domName IDBDatabase.objectStoreNames */
@DomName('IDBDatabase.objectStoreNames')
List<String> get objectStoreNames native "IDBDatabase_objectStoreNames_Getter";
/** @domName IDBDatabase.version */
@DomName('IDBDatabase.version')
dynamic get version native "IDBDatabase_version_Getter";
/** @domName IDBDatabase.addEventListener */
@DomName('IDBDatabase.addEventListener')
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBDatabase_addEventListener_Callback";
/** @domName IDBDatabase.close */
@DomName('IDBDatabase.close')
void close() native "IDBDatabase_close_Callback";
/** @domName IDBDatabase.createObjectStore */
@DomName('IDBDatabase.createObjectStore')
ObjectStore createObjectStore(String name, [Map options]) native "IDBDatabase_createObjectStore_Callback";
/** @domName IDBDatabase.deleteObjectStore */
@DomName('IDBDatabase.deleteObjectStore')
void deleteObjectStore(String name) native "IDBDatabase_deleteObjectStore_Callback";
/** @domName IDBDatabase.dispatchEvent */
@DomName('IDBDatabase.dispatchEvent')
bool $dom_dispatchEvent(Event evt) native "IDBDatabase_dispatchEvent_Callback";
/** @domName IDBDatabase.removeEventListener */
@DomName('IDBDatabase.removeEventListener')
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "IDBDatabase_removeEventListener_Callback";
Transaction transaction(storeName_OR_storeNames, String mode) {
@ -179,16 +161,13 @@ class Database extends EventTarget {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBDatabase.transaction_1 */
@DomName('IDBDatabase.transaction_1')
Transaction _transaction_1(storeName_OR_storeNames, mode) native "IDBDatabase_transaction_1_Callback";
/** @domName IDBDatabase.transaction_2 */
@DomName('IDBDatabase.transaction_2')
Transaction _transaction_2(storeName_OR_storeNames, mode) native "IDBDatabase_transaction_2_Callback";
/** @domName IDBDatabase.transaction_3 */
@DomName('IDBDatabase.transaction_3')
Transaction _transaction_3(storeName_OR_storeNames, mode) native "IDBDatabase_transaction_3_Callback";
Stream<Event> get onAbort => abortEvent.forTarget(this);
@ -218,7 +197,7 @@ class DatabaseEvents extends Events {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBFactory
@DomName('IDBFactory')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
@ -233,12 +212,10 @@ class IdbFactory extends NativeFieldWrapperClass1 {
IdbFactory.internal();
/** @domName IDBFactory.cmp */
@DomName('IDBFactory.cmp')
int cmp(/*IDBKey*/ first, /*IDBKey*/ second) native "IDBFactory_cmp_Callback";
/** @domName IDBFactory.deleteDatabase */
@DomName('IDBFactory.deleteDatabase')
VersionChangeRequest deleteDatabase(String name) native "IDBFactory_deleteDatabase_Callback";
OpenDBRequest open(String name, [int version]) {
@ -248,16 +225,13 @@ class IdbFactory extends NativeFieldWrapperClass1 {
return _open_2(name);
}
/** @domName IDBFactory.open_1 */
@DomName('IDBFactory.open_1')
OpenDBRequest _open_1(name, version) native "IDBFactory_open_1_Callback";
/** @domName IDBFactory.open_2 */
@DomName('IDBFactory.open_2')
OpenDBRequest _open_2(name) native "IDBFactory_open_2_Callback";
/** @domName IDBFactory.webkitGetDatabaseNames */
@DomName('IDBFactory.webkitGetDatabaseNames')
Request webkitGetDatabaseNames() native "IDBFactory_webkitGetDatabaseNames_Callback";
}
@ -268,28 +242,23 @@ class IdbFactory extends NativeFieldWrapperClass1 {
// WARNING: Do not edit - generated code.
/// @domName IDBIndex
@DomName('IDBIndex')
class Index extends NativeFieldWrapperClass1 {
Index.internal();
/** @domName IDBIndex.keyPath */
@DomName('IDBIndex.keyPath')
dynamic get keyPath native "IDBIndex_keyPath_Getter";
/** @domName IDBIndex.multiEntry */
@DomName('IDBIndex.multiEntry')
bool get multiEntry native "IDBIndex_multiEntry_Getter";
/** @domName IDBIndex.name */
@DomName('IDBIndex.name')
String get name native "IDBIndex_name_Getter";
/** @domName IDBIndex.objectStore */
@DomName('IDBIndex.objectStore')
ObjectStore get objectStore native "IDBIndex_objectStore_Getter";
/** @domName IDBIndex.unique */
@DomName('IDBIndex.unique')
bool get unique native "IDBIndex_unique_Getter";
Request count([key_OR_range]) {
@ -305,16 +274,13 @@ class Index extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBIndex.count_1 */
@DomName('IDBIndex.count_1')
Request _count_1() native "IDBIndex_count_1_Callback";
/** @domName IDBIndex.count_2 */
@DomName('IDBIndex.count_2')
Request _count_2(key_OR_range) native "IDBIndex_count_2_Callback";
/** @domName IDBIndex.count_3 */
@DomName('IDBIndex.count_3')
Request _count_3(key_OR_range) native "IDBIndex_count_3_Callback";
Request get(key) {
@ -327,12 +293,10 @@ class Index extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBIndex.get_1 */
@DomName('IDBIndex.get_1')
Request _get_1(key) native "IDBIndex_get_1_Callback";
/** @domName IDBIndex.get_2 */
@DomName('IDBIndex.get_2')
Request _get_2(key) native "IDBIndex_get_2_Callback";
Request getKey(key) {
@ -345,12 +309,10 @@ class Index extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBIndex.getKey_1 */
@DomName('IDBIndex.getKey_1')
Request _getKey_1(key) native "IDBIndex_getKey_1_Callback";
/** @domName IDBIndex.getKey_2 */
@DomName('IDBIndex.getKey_2')
Request _getKey_2(key) native "IDBIndex_getKey_2_Callback";
Request openCursor([key_OR_range, String direction]) {
@ -372,24 +334,19 @@ class Index extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBIndex.openCursor_1 */
@DomName('IDBIndex.openCursor_1')
Request _openCursor_1() native "IDBIndex_openCursor_1_Callback";
/** @domName IDBIndex.openCursor_2 */
@DomName('IDBIndex.openCursor_2')
Request _openCursor_2(key_OR_range) native "IDBIndex_openCursor_2_Callback";
/** @domName IDBIndex.openCursor_3 */
@DomName('IDBIndex.openCursor_3')
Request _openCursor_3(key_OR_range, direction) native "IDBIndex_openCursor_3_Callback";
/** @domName IDBIndex.openCursor_4 */
@DomName('IDBIndex.openCursor_4')
Request _openCursor_4(key_OR_range) native "IDBIndex_openCursor_4_Callback";
/** @domName IDBIndex.openCursor_5 */
@DomName('IDBIndex.openCursor_5')
Request _openCursor_5(key_OR_range, direction) native "IDBIndex_openCursor_5_Callback";
Request openKeyCursor([key_OR_range, String direction]) {
@ -411,24 +368,19 @@ class Index extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBIndex.openKeyCursor_1 */
@DomName('IDBIndex.openKeyCursor_1')
Request _openKeyCursor_1() native "IDBIndex_openKeyCursor_1_Callback";
/** @domName IDBIndex.openKeyCursor_2 */
@DomName('IDBIndex.openKeyCursor_2')
Request _openKeyCursor_2(key_OR_range) native "IDBIndex_openKeyCursor_2_Callback";
/** @domName IDBIndex.openKeyCursor_3 */
@DomName('IDBIndex.openKeyCursor_3')
Request _openKeyCursor_3(key_OR_range, direction) native "IDBIndex_openKeyCursor_3_Callback";
/** @domName IDBIndex.openKeyCursor_4 */
@DomName('IDBIndex.openKeyCursor_4')
Request _openKeyCursor_4(key_OR_range) native "IDBIndex_openKeyCursor_4_Callback";
/** @domName IDBIndex.openKeyCursor_5 */
@DomName('IDBIndex.openKeyCursor_5')
Request _openKeyCursor_5(key_OR_range, direction) native "IDBIndex_openKeyCursor_5_Callback";
}
@ -439,7 +391,7 @@ class Index extends NativeFieldWrapperClass1 {
// WARNING: Do not edit - generated code.
/// @domName IDBKey
@DomName('IDBKey')
class Key extends NativeFieldWrapperClass1 {
Key.internal();
@ -449,29 +401,21 @@ class Key extends NativeFieldWrapperClass1 {
// BSD-style license that can be found in the LICENSE file.
/// @domName IDBKeyRange
@DomName('IDBKeyRange')
class KeyRange extends NativeFieldWrapperClass1 {
/**
* @domName IDBKeyRange.only
*/
@DomName('IDBKeyRange.only')
factory KeyRange.only(/*Key*/ value) =>
_KeyRangeFactoryProvider.createKeyRange_only(value);
/**
* @domName IDBKeyRange.lowerBound
*/
@DomName('IDBKeyRange.lowerBound')
factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) =>
_KeyRangeFactoryProvider.createKeyRange_lowerBound(bound, open);
/**
* @domName IDBKeyRange.upperBound
*/
@DomName('IDBKeyRange.upperBound')
factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) =>
_KeyRangeFactoryProvider.createKeyRange_upperBound(bound, open);
/**
* @domName KeyRange.bound
*/
@DomName('KeyRange.bound')
factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper,
[bool lowerOpen = false, bool upperOpen = false]) =>
_KeyRangeFactoryProvider.createKeyRange_bound(
@ -479,20 +423,16 @@ class KeyRange extends NativeFieldWrapperClass1 {
KeyRange.internal();
/** @domName IDBKeyRange.lower */
@DomName('IDBKeyRange.lower')
dynamic get lower native "IDBKeyRange_lower_Getter";
/** @domName IDBKeyRange.lowerOpen */
@DomName('IDBKeyRange.lowerOpen')
bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter";
/** @domName IDBKeyRange.upper */
@DomName('IDBKeyRange.upper')
dynamic get upper native "IDBKeyRange_upper_Getter";
/** @domName IDBKeyRange.upperOpen */
@DomName('IDBKeyRange.upperOpen')
bool get upperOpen native "IDBKeyRange_upperOpen_Getter";
static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]) {
@ -505,16 +445,13 @@ class KeyRange extends NativeFieldWrapperClass1 {
return _bound_3(lower, upper);
}
/** @domName IDBKeyRange.bound_1 */
@DomName('IDBKeyRange.bound_1')
static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRange_bound_1_Callback";
/** @domName IDBKeyRange.bound_2 */
@DomName('IDBKeyRange.bound_2')
static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange_bound_2_Callback";
/** @domName IDBKeyRange.bound_3 */
@DomName('IDBKeyRange.bound_3')
static KeyRange _bound_3(lower, upper) native "IDBKeyRange_bound_3_Callback";
static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) {
@ -524,16 +461,13 @@ class KeyRange extends NativeFieldWrapperClass1 {
return _lowerBound_2(bound);
}
/** @domName IDBKeyRange.lowerBound_1 */
@DomName('IDBKeyRange.lowerBound_1')
static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange_lowerBound_1_Callback";
/** @domName IDBKeyRange.lowerBound_2 */
@DomName('IDBKeyRange.lowerBound_2')
static KeyRange _lowerBound_2(bound) native "IDBKeyRange_lowerBound_2_Callback";
/** @domName IDBKeyRange.only_ */
@DomName('IDBKeyRange.only_')
static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback";
static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) {
@ -543,12 +477,10 @@ class KeyRange extends NativeFieldWrapperClass1 {
return _upperBound_2(bound);
}
/** @domName IDBKeyRange.upperBound_1 */
@DomName('IDBKeyRange.upperBound_1')
static KeyRange _upperBound_1(bound, open) native "IDBKeyRange_upperBound_1_Callback";
/** @domName IDBKeyRange.upperBound_2 */
@DomName('IDBKeyRange.upperBound_2')
static KeyRange _upperBound_2(bound) native "IDBKeyRange_upperBound_2_Callback";
}
@ -559,28 +491,23 @@ class KeyRange extends NativeFieldWrapperClass1 {
// WARNING: Do not edit - generated code.
/// @domName IDBObjectStore
@DomName('IDBObjectStore')
class ObjectStore extends NativeFieldWrapperClass1 {
ObjectStore.internal();
/** @domName IDBObjectStore.autoIncrement */
@DomName('IDBObjectStore.autoIncrement')
bool get autoIncrement native "IDBObjectStore_autoIncrement_Getter";
/** @domName IDBObjectStore.indexNames */
@DomName('IDBObjectStore.indexNames')
List<String> get indexNames native "IDBObjectStore_indexNames_Getter";
/** @domName IDBObjectStore.keyPath */
@DomName('IDBObjectStore.keyPath')
dynamic get keyPath native "IDBObjectStore_keyPath_Getter";
/** @domName IDBObjectStore.name */
@DomName('IDBObjectStore.name')
String get name native "IDBObjectStore_name_Getter";
/** @domName IDBObjectStore.transaction */
@DomName('IDBObjectStore.transaction')
Transaction get transaction native "IDBObjectStore_transaction_Getter";
Request add(Object value, [/*IDBKey*/ key]) {
@ -590,16 +517,13 @@ class ObjectStore extends NativeFieldWrapperClass1 {
return _add_2(value);
}
/** @domName IDBObjectStore.add_1 */
@DomName('IDBObjectStore.add_1')
Request _add_1(value, key) native "IDBObjectStore_add_1_Callback";
/** @domName IDBObjectStore.add_2 */
@DomName('IDBObjectStore.add_2')
Request _add_2(value) native "IDBObjectStore_add_2_Callback";
/** @domName IDBObjectStore.clear */
@DomName('IDBObjectStore.clear')
Request clear() native "IDBObjectStore_clear_Callback";
Request count([key_OR_range]) {
@ -615,16 +539,13 @@ class ObjectStore extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBObjectStore.count_1 */
@DomName('IDBObjectStore.count_1')
Request _count_1() native "IDBObjectStore_count_1_Callback";
/** @domName IDBObjectStore.count_2 */
@DomName('IDBObjectStore.count_2')
Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback";
/** @domName IDBObjectStore.count_3 */
@DomName('IDBObjectStore.count_3')
Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback";
Index createIndex(String name, keyPath, [Map options]) {
@ -637,12 +558,10 @@ class ObjectStore extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBObjectStore.createIndex_1 */
@DomName('IDBObjectStore.createIndex_1')
Index _createIndex_1(name, keyPath, options) native "IDBObjectStore_createIndex_1_Callback";
/** @domName IDBObjectStore.createIndex_2 */
@DomName('IDBObjectStore.createIndex_2')
Index _createIndex_2(name, keyPath, options) native "IDBObjectStore_createIndex_2_Callback";
Request delete(key_OR_keyRange) {
@ -655,16 +574,13 @@ class ObjectStore extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBObjectStore.delete_1 */
@DomName('IDBObjectStore.delete_1')
Request _delete_1(key_OR_keyRange) native "IDBObjectStore_delete_1_Callback";
/** @domName IDBObjectStore.delete_2 */
@DomName('IDBObjectStore.delete_2')
Request _delete_2(key_OR_keyRange) native "IDBObjectStore_delete_2_Callback";
/** @domName IDBObjectStore.deleteIndex */
@DomName('IDBObjectStore.deleteIndex')
void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback";
Request getObject(key) {
@ -677,16 +593,13 @@ class ObjectStore extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBObjectStore.get_1 */
@DomName('IDBObjectStore.get_1')
Request _get_1(key) native "IDBObjectStore_get_1_Callback";
/** @domName IDBObjectStore.get_2 */
@DomName('IDBObjectStore.get_2')
Request _get_2(key) native "IDBObjectStore_get_2_Callback";
/** @domName IDBObjectStore.index */
@DomName('IDBObjectStore.index')
Index index(String name) native "IDBObjectStore_index_Callback";
Request openCursor([key_OR_range, String direction]) {
@ -708,24 +621,19 @@ class ObjectStore extends NativeFieldWrapperClass1 {
throw new ArgumentError("Incorrect number or type of arguments");
}
/** @domName IDBObjectStore.openCursor_1 */
@DomName('IDBObjectStore.openCursor_1')
Request _openCursor_1() native "IDBObjectStore_openCursor_1_Callback";
/** @domName IDBObjectStore.openCursor_2 */
@DomName('IDBObjectStore.openCursor_2')
Request _openCursor_2(key_OR_range) native "IDBObjectStore_openCursor_2_Callback";
/** @domName IDBObjectStore.openCursor_3 */
@DomName('IDBObjectStore.openCursor_3')
Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore_openCursor_3_Callback";
/** @domName IDBObjectStore.openCursor_4 */
@DomName('IDBObjectStore.openCursor_4')
Request _openCursor_4(key_OR_range) native "IDBObjectStore_openCursor_4_Callback";
/** @domName IDBObjectStore.openCursor_5 */
@DomName('IDBObjectStore.openCursor_5')
Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore_openCursor_5_Callback";
Request put(Object value, [/*IDBKey*/ key]) {
@ -735,12 +643,10 @@ class ObjectStore extends NativeFieldWrapperClass1 {
return _put_2(value);
}
/** @domName IDBObjectStore.put_1 */
@DomName('IDBObjectStore.put_1')
Request _put_1(value, key) native "IDBObjectStore_put_1_Callback";
/** @domName IDBObjectStore.put_2 */
@DomName('IDBObjectStore.put_2')
Request _put_2(value) native "IDBObjectStore_put_2_Callback";
}
@ -751,7 +657,7 @@ class ObjectStore extends NativeFieldWrapperClass1 {
// WARNING: Do not edit - generated code.
/// @domName IDBOpenDBRequest
@DomName('IDBOpenDBRequest')
class OpenDBRequest extends Request implements EventTarget {
OpenDBRequest.internal() : super.internal();
@ -759,7 +665,8 @@ class OpenDBRequest extends Request implements EventTarget {
static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = const EventStreamProvider<VersionChangeEvent>('upgradeneeded');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
OpenDBRequestEvents get on =>
new OpenDBRequestEvents(this);
@ -787,7 +694,7 @@ class OpenDBRequestEvents extends RequestEvents {
// WARNING: Do not edit - generated code.
/// @domName IDBRequest
@DomName('IDBRequest')
class Request extends EventTarget {
Request.internal() : super.internal();
@ -795,44 +702,36 @@ class Request extends EventTarget {
static const EventStreamProvider<Event> successEvent = const EventStreamProvider<Event>('success');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
RequestEvents get on =>
new RequestEvents(this);
/** @domName IDBRequest.error */
@DomName('IDBRequest.error')
DomError get error native "IDBRequest_error_Getter";
/** @domName IDBRequest.readyState */
@DomName('IDBRequest.readyState')
String get readyState native "IDBRequest_readyState_Getter";
/** @domName IDBRequest.result */
@DomName('IDBRequest.result')
dynamic get result native "IDBRequest_result_Getter";
/** @domName IDBRequest.source */
@DomName('IDBRequest.source')
dynamic get source native "IDBRequest_source_Getter";
/** @domName IDBRequest.transaction */
@DomName('IDBRequest.transaction')
Transaction get transaction native "IDBRequest_transaction_Getter";
/** @domName IDBRequest.webkitErrorMessage */
@DomName('IDBRequest.webkitErrorMessage')
String get webkitErrorMessage native "IDBRequest_webkitErrorMessage_Getter";
/** @domName IDBRequest.addEventListener */
@DomName('IDBRequest.addEventListener')
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBRequest_addEventListener_Callback";
/** @domName IDBRequest.dispatchEvent */
@DomName('IDBRequest.dispatchEvent')
bool $dom_dispatchEvent(Event evt) native "IDBRequest_dispatchEvent_Callback";
/** @domName IDBRequest.removeEventListener */
@DomName('IDBRequest.removeEventListener')
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "IDBRequest_removeEventListener_Callback";
Stream<Event> get onError => errorEvent.forTarget(this);
@ -859,7 +758,7 @@ class RequestEvents extends Events {
// WARNING: Do not edit - generated code.
/// @domName IDBTransaction
@DomName('IDBTransaction')
class Transaction extends EventTarget {
Transaction.internal() : super.internal();
@ -869,44 +768,36 @@ class Transaction extends EventTarget {
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
TransactionEvents get on =>
new TransactionEvents(this);
/** @domName IDBTransaction.db */
@DomName('IDBTransaction.db')
Database get db native "IDBTransaction_db_Getter";
/** @domName IDBTransaction.error */
@DomName('IDBTransaction.error')
DomError get error native "IDBTransaction_error_Getter";
/** @domName IDBTransaction.mode */
@DomName('IDBTransaction.mode')
String get mode native "IDBTransaction_mode_Getter";
/** @domName IDBTransaction.webkitErrorMessage */
@DomName('IDBTransaction.webkitErrorMessage')
String get webkitErrorMessage native "IDBTransaction_webkitErrorMessage_Getter";
/** @domName IDBTransaction.abort */
@DomName('IDBTransaction.abort')
void abort() native "IDBTransaction_abort_Callback";
/** @domName IDBTransaction.addEventListener */
@DomName('IDBTransaction.addEventListener')
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBTransaction_addEventListener_Callback";
/** @domName IDBTransaction.dispatchEvent */
@DomName('IDBTransaction.dispatchEvent')
bool $dom_dispatchEvent(Event evt) native "IDBTransaction_dispatchEvent_Callback";
/** @domName IDBTransaction.objectStore */
@DomName('IDBTransaction.objectStore')
ObjectStore objectStore(String name) native "IDBTransaction_objectStore_Callback";
/** @domName IDBTransaction.removeEventListener */
@DomName('IDBTransaction.removeEventListener')
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "IDBTransaction_removeEventListener_Callback";
Stream<Event> get onAbort => abortEvent.forTarget(this);
@ -938,16 +829,14 @@ class TransactionEvents extends Events {
// WARNING: Do not edit - generated code.
/// @domName IDBVersionChangeEvent
@DomName('IDBVersionChangeEvent')
class UpgradeNeededEvent extends Event {
UpgradeNeededEvent.internal() : super.internal();
/** @domName IDBUpgradeNeededEvent.newVersion */
@DomName('IDBUpgradeNeededEvent.newVersion')
int get newVersion native "IDBUpgradeNeededEvent_newVersion_Getter";
/** @domName IDBUpgradeNeededEvent.oldVersion */
@DomName('IDBUpgradeNeededEvent.oldVersion')
int get oldVersion native "IDBUpgradeNeededEvent_oldVersion_Getter";
}
@ -958,12 +847,11 @@ class UpgradeNeededEvent extends Event {
// WARNING: Do not edit - generated code.
/// @domName IDBVersionChangeEvent
@DomName('IDBVersionChangeEvent')
class VersionChangeEvent extends Event {
VersionChangeEvent.internal() : super.internal();
/** @domName IDBVersionChangeEvent.version */
@DomName('IDBVersionChangeEvent.version')
String get version native "IDBVersionChangeEvent_version_Getter";
}
@ -974,13 +862,14 @@ class VersionChangeEvent extends Event {
// WARNING: Do not edit - generated code.
/// @domName IDBVersionChangeRequest
@DomName('IDBVersionChangeRequest')
class VersionChangeRequest extends Request implements EventTarget {
VersionChangeRequest.internal() : super.internal();
static const EventStreamProvider<Event> blockedEvent = const EventStreamProvider<Event>('blocked');
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
VersionChangeRequestEvents get on =>
new VersionChangeRequestEvents(this);
@ -1003,7 +892,7 @@ class VersionChangeRequestEvents extends RequestEvents {
// WARNING: Do not edit - generated code.
/// @domName IDBAny
@DomName('IDBAny')
class _Any extends NativeFieldWrapperClass1 {
_Any.internal();

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -2,6 +2,7 @@ library web_audio;
import 'dart:async';
import 'dart:html';
import 'dart:html_common';
// DO NOT EDIT
// Auto-generated dart:audio library.
@ -13,31 +14,40 @@ import 'dart:html';
// BSD-style license that can be found in the LICENSE file.
/// @domName AnalyserNode; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode')
class AnalyserNode extends AudioNode native "*AnalyserNode" {
/// @domName AnalyserNode.fftSize; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode.fftSize')
int fftSize;
/// @domName AnalyserNode.frequencyBinCount; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode.frequencyBinCount')
final int frequencyBinCount;
/// @domName AnalyserNode.maxDecibels; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode.maxDecibels')
num maxDecibels;
/// @domName AnalyserNode.minDecibels; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode.minDecibels')
num minDecibels;
/// @domName AnalyserNode.smoothingTimeConstant; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode.smoothingTimeConstant')
num smoothingTimeConstant;
/// @domName AnalyserNode.getByteFrequencyData; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode.getByteFrequencyData')
void getByteFrequencyData(Uint8Array array) native;
/// @domName AnalyserNode.getByteTimeDomainData; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode.getByteTimeDomainData')
void getByteTimeDomainData(Uint8Array array) native;
/// @domName AnalyserNode.getFloatFrequencyData; @docsEditable true
/// @docsEditable true
@DomName('AnalyserNode.getFloatFrequencyData')
void getFloatFrequencyData(Float32Array array) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -45,25 +55,32 @@ class AnalyserNode extends AudioNode native "*AnalyserNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioBuffer; @docsEditable true
/// @docsEditable true
@DomName('AudioBuffer')
class AudioBuffer native "*AudioBuffer" {
/// @domName AudioBuffer.duration; @docsEditable true
/// @docsEditable true
@DomName('AudioBuffer.duration')
final num duration;
/// @domName AudioBuffer.gain; @docsEditable true
/// @docsEditable true
@DomName('AudioBuffer.gain')
num gain;
/// @domName AudioBuffer.length; @docsEditable true
/// @docsEditable true
@DomName('AudioBuffer.length')
final int length;
/// @domName AudioBuffer.numberOfChannels; @docsEditable true
/// @docsEditable true
@DomName('AudioBuffer.numberOfChannels')
final int numberOfChannels;
/// @domName AudioBuffer.sampleRate; @docsEditable true
/// @docsEditable true
@DomName('AudioBuffer.sampleRate')
final num sampleRate;
/// @domName AudioBuffer.getChannelData; @docsEditable true
/// @docsEditable true
@DomName('AudioBuffer.getChannelData')
Float32Array getChannelData(int channelIndex) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -79,7 +96,7 @@ typedef void AudioBufferCallback(AudioBuffer audioBuffer);
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioBufferSourceNode
@DomName('AudioBufferSourceNode')
class AudioBufferSourceNode extends AudioSourceNode native "*AudioBufferSourceNode" {
// TODO(efortuna): Remove these methods when Chrome stable also uses start
@ -120,25 +137,32 @@ class AudioBufferSourceNode extends AudioSourceNode native "*AudioBufferSourceNo
static const int UNSCHEDULED_STATE = 0;
/// @domName AudioBufferSourceNode.buffer; @docsEditable true
/// @docsEditable true
@DomName('AudioBufferSourceNode.buffer')
AudioBuffer buffer;
/// @domName AudioBufferSourceNode.gain; @docsEditable true
/// @docsEditable true
@DomName('AudioBufferSourceNode.gain')
final AudioGain gain;
/// @domName AudioBufferSourceNode.loop; @docsEditable true
/// @docsEditable true
@DomName('AudioBufferSourceNode.loop')
bool loop;
/// @domName AudioBufferSourceNode.loopEnd; @docsEditable true
/// @docsEditable true
@DomName('AudioBufferSourceNode.loopEnd')
num loopEnd;
/// @domName AudioBufferSourceNode.loopStart; @docsEditable true
/// @docsEditable true
@DomName('AudioBufferSourceNode.loopStart')
num loopStart;
/// @domName AudioBufferSourceNode.playbackRate; @docsEditable true
/// @docsEditable true
@DomName('AudioBufferSourceNode.playbackRate')
final AudioParam playbackRate;
/// @domName AudioBufferSourceNode.playbackState; @docsEditable true
/// @docsEditable true
@DomName('AudioBufferSourceNode.playbackState')
final int playbackState;
}
@ -147,85 +171,109 @@ class AudioBufferSourceNode extends AudioSourceNode native "*AudioBufferSourceNo
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioContext
@DomName('AudioContext')
class AudioContext extends EventTarget native "*AudioContext" {
static const EventStreamProvider<Event> completeEvent = const EventStreamProvider<Event>('complete');
///@docsEditable true
/// @docsEditable true
factory AudioContext() => AudioContext._create();
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
/// @docsEditable true
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
AudioContextEvents get on =>
new AudioContextEvents(this);
/// @domName AudioContext.activeSourceCount; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.activeSourceCount')
final int activeSourceCount;
/// @domName AudioContext.currentTime; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.currentTime')
final num currentTime;
/// @domName AudioContext.destination; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.destination')
final AudioDestinationNode destination;
/// @domName AudioContext.listener; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.listener')
final AudioListener listener;
/// @domName AudioContext.sampleRate; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.sampleRate')
final num sampleRate;
/// @domName AudioContext.createAnalyser; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createAnalyser')
AnalyserNode createAnalyser() native;
/// @domName AudioContext.createBiquadFilter; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createBiquadFilter')
BiquadFilterNode createBiquadFilter() native;
/// @domName AudioContext.createBuffer; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createBuffer')
AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate]) native;
/// @domName AudioContext.createBufferSource; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createBufferSource')
AudioBufferSourceNode createBufferSource() native;
/// @domName AudioContext.createChannelMerger; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createChannelMerger')
ChannelMergerNode createChannelMerger([int numberOfInputs]) native;
/// @domName AudioContext.createChannelSplitter; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createChannelSplitter')
ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) native;
/// @domName AudioContext.createConvolver; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createConvolver')
ConvolverNode createConvolver() native;
/// @domName AudioContext.createDelay; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createDelay')
DelayNode createDelay([num maxDelayTime]) native;
/// @domName AudioContext.createDynamicsCompressor; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createDynamicsCompressor')
DynamicsCompressorNode createDynamicsCompressor() native;
/// @domName AudioContext.createMediaElementSource; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createMediaElementSource')
MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement) native;
/// @domName AudioContext.createMediaStreamDestination; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createMediaStreamDestination')
MediaStreamAudioDestinationNode createMediaStreamDestination() native;
/// @domName AudioContext.createMediaStreamSource; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createMediaStreamSource')
MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) native;
/// @domName AudioContext.createOscillator; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createOscillator')
OscillatorNode createOscillator() native;
/// @domName AudioContext.createPanner; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createPanner')
PannerNode createPanner() native;
/// @domName AudioContext.createWaveShaper; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createWaveShaper')
WaveShaperNode createWaveShaper() native;
/// @domName AudioContext.createWaveTable; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.createWaveTable')
WaveTable createWaveTable(Float32Array real, Float32Array imag) native;
/// @domName AudioContext.decodeAudioData; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.decodeAudioData')
void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native;
/// @domName AudioContext.startRendering; @docsEditable true
/// @docsEditable true
@DomName('AudioContext.startRendering')
void startRendering() native;
Stream<Event> get onComplete => completeEvent.forTarget(this);
@ -271,10 +319,12 @@ class AudioContextEvents extends Events {
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioDestinationNode; @docsEditable true
/// @docsEditable true
@DomName('AudioDestinationNode')
class AudioDestinationNode extends AudioNode native "*AudioDestinationNode" {
/// @domName AudioDestinationNode.numberOfChannels; @docsEditable true
/// @docsEditable true
@DomName('AudioDestinationNode.numberOfChannels')
final int numberOfChannels;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -282,7 +332,8 @@ class AudioDestinationNode extends AudioNode native "*AudioDestinationNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioGain; @docsEditable true
/// @docsEditable true
@DomName('AudioGain')
class AudioGain extends AudioParam native "*AudioGain" {
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -290,22 +341,28 @@ class AudioGain extends AudioParam native "*AudioGain" {
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioListener; @docsEditable true
/// @docsEditable true
@DomName('AudioListener')
class AudioListener native "*AudioListener" {
/// @domName AudioListener.dopplerFactor; @docsEditable true
/// @docsEditable true
@DomName('AudioListener.dopplerFactor')
num dopplerFactor;
/// @domName AudioListener.speedOfSound; @docsEditable true
/// @docsEditable true
@DomName('AudioListener.speedOfSound')
num speedOfSound;
/// @domName AudioListener.setOrientation; @docsEditable true
/// @docsEditable true
@DomName('AudioListener.setOrientation')
void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native;
/// @domName AudioListener.setPosition; @docsEditable true
/// @docsEditable true
@DomName('AudioListener.setPosition')
void setPosition(num x, num y, num z) native;
/// @domName AudioListener.setVelocity; @docsEditable true
/// @docsEditable true
@DomName('AudioListener.setVelocity')
void setVelocity(num x, num y, num z) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -313,22 +370,28 @@ class AudioListener native "*AudioListener" {
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioNode; @docsEditable true
/// @docsEditable true
@DomName('AudioNode')
class AudioNode native "*AudioNode" {
/// @domName AudioNode.context; @docsEditable true
/// @docsEditable true
@DomName('AudioNode.context')
final AudioContext context;
/// @domName AudioNode.numberOfInputs; @docsEditable true
/// @docsEditable true
@DomName('AudioNode.numberOfInputs')
final int numberOfInputs;
/// @domName AudioNode.numberOfOutputs; @docsEditable true
/// @docsEditable true
@DomName('AudioNode.numberOfOutputs')
final int numberOfOutputs;
/// @domName AudioNode.connect; @docsEditable true
/// @docsEditable true
@DomName('AudioNode.connect')
void connect(destination, int output, [int input]) native;
/// @domName AudioNode.disconnect; @docsEditable true
/// @docsEditable true
@DomName('AudioNode.disconnect')
void disconnect(int output) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -336,43 +399,56 @@ class AudioNode native "*AudioNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioParam; @docsEditable true
/// @docsEditable true
@DomName('AudioParam')
class AudioParam native "*AudioParam" {
/// @domName AudioParam.defaultValue; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.defaultValue')
final num defaultValue;
/// @domName AudioParam.maxValue; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.maxValue')
final num maxValue;
/// @domName AudioParam.minValue; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.minValue')
final num minValue;
/// @domName AudioParam.name; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.name')
final String name;
/// @domName AudioParam.units; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.units')
final int units;
/// @domName AudioParam.value; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.value')
num value;
/// @domName AudioParam.cancelScheduledValues; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.cancelScheduledValues')
void cancelScheduledValues(num startTime) native;
/// @domName AudioParam.exponentialRampToValueAtTime; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.exponentialRampToValueAtTime')
void exponentialRampToValueAtTime(num value, num time) native;
/// @domName AudioParam.linearRampToValueAtTime; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.linearRampToValueAtTime')
void linearRampToValueAtTime(num value, num time) native;
/// @domName AudioParam.setTargetAtTime; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.setTargetAtTime')
void setTargetAtTime(num target, num time, num timeConstant) native;
/// @domName AudioParam.setValueAtTime; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.setValueAtTime')
void setValueAtTime(num value, num time) native;
/// @domName AudioParam.setValueCurveAtTime; @docsEditable true
/// @docsEditable true
@DomName('AudioParam.setValueCurveAtTime')
void setValueCurveAtTime(Float32Array values, num time, num duration) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -380,13 +456,16 @@ class AudioParam native "*AudioParam" {
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioProcessingEvent; @docsEditable true
/// @docsEditable true
@DomName('AudioProcessingEvent')
class AudioProcessingEvent extends Event native "*AudioProcessingEvent" {
/// @domName AudioProcessingEvent.inputBuffer; @docsEditable true
/// @docsEditable true
@DomName('AudioProcessingEvent.inputBuffer')
final AudioBuffer inputBuffer;
/// @domName AudioProcessingEvent.outputBuffer; @docsEditable true
/// @docsEditable true
@DomName('AudioProcessingEvent.outputBuffer')
final AudioBuffer outputBuffer;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -394,7 +473,8 @@ class AudioProcessingEvent extends Event native "*AudioProcessingEvent" {
// BSD-style license that can be found in the LICENSE file.
/// @domName AudioSourceNode; @docsEditable true
/// @docsEditable true
@DomName('AudioSourceNode')
class AudioSourceNode extends AudioNode native "*AudioSourceNode" {
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -402,7 +482,8 @@ class AudioSourceNode extends AudioNode native "*AudioSourceNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName BiquadFilterNode; @docsEditable true
/// @docsEditable true
@DomName('BiquadFilterNode')
class BiquadFilterNode extends AudioNode native "*BiquadFilterNode" {
static const int ALLPASS = 7;
@ -421,22 +502,28 @@ class BiquadFilterNode extends AudioNode native "*BiquadFilterNode" {
static const int PEAKING = 5;
/// @domName BiquadFilterNode.Q; @docsEditable true
/// @docsEditable true
@DomName('BiquadFilterNode.Q')
final AudioParam Q;
/// @domName BiquadFilterNode.detune; @docsEditable true
/// @docsEditable true
@DomName('BiquadFilterNode.detune')
final AudioParam detune;
/// @domName BiquadFilterNode.frequency; @docsEditable true
/// @docsEditable true
@DomName('BiquadFilterNode.frequency')
final AudioParam frequency;
/// @domName BiquadFilterNode.gain; @docsEditable true
/// @docsEditable true
@DomName('BiquadFilterNode.gain')
final AudioParam gain;
/// @domName BiquadFilterNode.type; @docsEditable true
/// @docsEditable true
@DomName('BiquadFilterNode.type')
int type;
/// @domName BiquadFilterNode.getFrequencyResponse; @docsEditable true
/// @docsEditable true
@DomName('BiquadFilterNode.getFrequencyResponse')
void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -444,7 +531,8 @@ class BiquadFilterNode extends AudioNode native "*BiquadFilterNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName ChannelMergerNode; @docsEditable true
/// @docsEditable true
@DomName('ChannelMergerNode')
class ChannelMergerNode extends AudioNode native "*ChannelMergerNode" {
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -452,7 +540,8 @@ class ChannelMergerNode extends AudioNode native "*ChannelMergerNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName ChannelSplitterNode; @docsEditable true
/// @docsEditable true
@DomName('ChannelSplitterNode')
class ChannelSplitterNode extends AudioNode native "*ChannelSplitterNode" {
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -460,13 +549,16 @@ class ChannelSplitterNode extends AudioNode native "*ChannelSplitterNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName ConvolverNode; @docsEditable true
/// @docsEditable true
@DomName('ConvolverNode')
class ConvolverNode extends AudioNode native "*ConvolverNode" {
/// @domName ConvolverNode.buffer; @docsEditable true
/// @docsEditable true
@DomName('ConvolverNode.buffer')
AudioBuffer buffer;
/// @domName ConvolverNode.normalize; @docsEditable true
/// @docsEditable true
@DomName('ConvolverNode.normalize')
bool normalize;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -474,10 +566,12 @@ class ConvolverNode extends AudioNode native "*ConvolverNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName DelayNode; @docsEditable true
/// @docsEditable true
@DomName('DelayNode')
class DelayNode extends AudioNode native "*DelayNode" {
/// @domName DelayNode.delayTime; @docsEditable true
/// @docsEditable true
@DomName('DelayNode.delayTime')
final AudioParam delayTime;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -485,25 +579,32 @@ class DelayNode extends AudioNode native "*DelayNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName DynamicsCompressorNode; @docsEditable true
/// @docsEditable true
@DomName('DynamicsCompressorNode')
class DynamicsCompressorNode extends AudioNode native "*DynamicsCompressorNode" {
/// @domName DynamicsCompressorNode.attack; @docsEditable true
/// @docsEditable true
@DomName('DynamicsCompressorNode.attack')
final AudioParam attack;
/// @domName DynamicsCompressorNode.knee; @docsEditable true
/// @docsEditable true
@DomName('DynamicsCompressorNode.knee')
final AudioParam knee;
/// @domName DynamicsCompressorNode.ratio; @docsEditable true
/// @docsEditable true
@DomName('DynamicsCompressorNode.ratio')
final AudioParam ratio;
/// @domName DynamicsCompressorNode.reduction; @docsEditable true
/// @docsEditable true
@DomName('DynamicsCompressorNode.reduction')
final AudioParam reduction;
/// @domName DynamicsCompressorNode.release; @docsEditable true
/// @docsEditable true
@DomName('DynamicsCompressorNode.release')
final AudioParam release;
/// @domName DynamicsCompressorNode.threshold; @docsEditable true
/// @docsEditable true
@DomName('DynamicsCompressorNode.threshold')
final AudioParam threshold;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -511,10 +612,12 @@ class DynamicsCompressorNode extends AudioNode native "*DynamicsCompressorNode"
// BSD-style license that can be found in the LICENSE file.
/// @domName GainNode; @docsEditable true
/// @docsEditable true
@DomName('GainNode')
class GainNode extends AudioNode native "*GainNode" {
/// @domName GainNode.gain; @docsEditable true
/// @docsEditable true
@DomName('GainNode.gain')
final AudioGain gain;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -522,10 +625,12 @@ class GainNode extends AudioNode native "*GainNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName MediaElementAudioSourceNode; @docsEditable true
/// @docsEditable true
@DomName('MediaElementAudioSourceNode')
class MediaElementAudioSourceNode extends AudioSourceNode native "*MediaElementAudioSourceNode" {
/// @domName MediaElementAudioSourceNode.mediaElement; @docsEditable true
/// @docsEditable true
@DomName('MediaElementAudioSourceNode.mediaElement')
final MediaElement mediaElement;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -533,10 +638,12 @@ class MediaElementAudioSourceNode extends AudioSourceNode native "*MediaElementA
// BSD-style license that can be found in the LICENSE file.
/// @domName MediaStreamAudioDestinationNode; @docsEditable true
/// @docsEditable true
@DomName('MediaStreamAudioDestinationNode')
class MediaStreamAudioDestinationNode extends AudioSourceNode native "*MediaStreamAudioDestinationNode" {
/// @domName MediaStreamAudioDestinationNode.stream; @docsEditable true
/// @docsEditable true
@DomName('MediaStreamAudioDestinationNode.stream')
final MediaStream stream;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -544,10 +651,12 @@ class MediaStreamAudioDestinationNode extends AudioSourceNode native "*MediaStre
// BSD-style license that can be found in the LICENSE file.
/// @domName MediaStreamAudioSourceNode; @docsEditable true
/// @docsEditable true
@DomName('MediaStreamAudioSourceNode')
class MediaStreamAudioSourceNode extends AudioSourceNode native "*MediaStreamAudioSourceNode" {
/// @domName MediaStreamAudioSourceNode.mediaStream; @docsEditable true
/// @docsEditable true
@DomName('MediaStreamAudioSourceNode.mediaStream')
final MediaStream mediaStream;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -555,10 +664,12 @@ class MediaStreamAudioSourceNode extends AudioSourceNode native "*MediaStreamAud
// BSD-style license that can be found in the LICENSE file.
/// @domName OfflineAudioCompletionEvent; @docsEditable true
/// @docsEditable true
@DomName('OfflineAudioCompletionEvent')
class OfflineAudioCompletionEvent extends Event native "*OfflineAudioCompletionEvent" {
/// @domName OfflineAudioCompletionEvent.renderedBuffer; @docsEditable true
/// @docsEditable true
@DomName('OfflineAudioCompletionEvent.renderedBuffer')
final AudioBuffer renderedBuffer;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -566,10 +677,11 @@ class OfflineAudioCompletionEvent extends Event native "*OfflineAudioCompletionE
// BSD-style license that can be found in the LICENSE file.
/// @domName OfflineAudioContext; @docsEditable true
/// @docsEditable true
@DomName('OfflineAudioContext')
class OfflineAudioContext extends AudioContext implements EventTarget native "*OfflineAudioContext" {
///@docsEditable true
/// @docsEditable true
factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num sampleRate) => OfflineAudioContext._create(numberOfChannels, numberOfFrames, sampleRate);
static OfflineAudioContext _create(int numberOfChannels, int numberOfFrames, num sampleRate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChannels, numberOfFrames, sampleRate);
}
@ -578,7 +690,8 @@ class OfflineAudioContext extends AudioContext implements EventTarget native "*O
// BSD-style license that can be found in the LICENSE file.
/// @domName OscillatorNode; @docsEditable true
/// @docsEditable true
@DomName('OscillatorNode')
class OscillatorNode extends AudioSourceNode native "*OscillatorNode" {
static const int CUSTOM = 4;
@ -599,25 +712,32 @@ class OscillatorNode extends AudioSourceNode native "*OscillatorNode" {
static const int UNSCHEDULED_STATE = 0;
/// @domName OscillatorNode.detune; @docsEditable true
/// @docsEditable true
@DomName('OscillatorNode.detune')
final AudioParam detune;
/// @domName OscillatorNode.frequency; @docsEditable true
/// @docsEditable true
@DomName('OscillatorNode.frequency')
final AudioParam frequency;
/// @domName OscillatorNode.playbackState; @docsEditable true
/// @docsEditable true
@DomName('OscillatorNode.playbackState')
final int playbackState;
/// @domName OscillatorNode.type; @docsEditable true
/// @docsEditable true
@DomName('OscillatorNode.type')
int type;
/// @domName OscillatorNode.setWaveTable; @docsEditable true
/// @docsEditable true
@DomName('OscillatorNode.setWaveTable')
void setWaveTable(WaveTable waveTable) native;
/// @domName OscillatorNode.start; @docsEditable true
/// @docsEditable true
@DomName('OscillatorNode.start')
void start(num when) native;
/// @domName OscillatorNode.stop; @docsEditable true
/// @docsEditable true
@DomName('OscillatorNode.stop')
void stop(num when) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -625,7 +745,8 @@ class OscillatorNode extends AudioSourceNode native "*OscillatorNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName PannerNode; @docsEditable true
/// @docsEditable true
@DomName('PannerNode')
class PannerNode extends AudioNode native "*PannerNode" {
static const int EQUALPOWER = 0;
@ -640,37 +761,48 @@ class PannerNode extends AudioNode native "*PannerNode" {
static const int SOUNDFIELD = 2;
/// @domName PannerNode.coneInnerAngle; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.coneInnerAngle')
num coneInnerAngle;
/// @domName PannerNode.coneOuterAngle; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.coneOuterAngle')
num coneOuterAngle;
/// @domName PannerNode.coneOuterGain; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.coneOuterGain')
num coneOuterGain;
/// @domName PannerNode.distanceModel; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.distanceModel')
int distanceModel;
/// @domName PannerNode.maxDistance; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.maxDistance')
num maxDistance;
/// @domName PannerNode.panningModel; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.panningModel')
int panningModel;
/// @domName PannerNode.refDistance; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.refDistance')
num refDistance;
/// @domName PannerNode.rolloffFactor; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.rolloffFactor')
num rolloffFactor;
/// @domName PannerNode.setOrientation; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.setOrientation')
void setOrientation(num x, num y, num z) native;
/// @domName PannerNode.setPosition; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.setPosition')
void setPosition(num x, num y, num z) native;
/// @domName PannerNode.setVelocity; @docsEditable true
/// @docsEditable true
@DomName('PannerNode.setVelocity')
void setVelocity(num x, num y, num z) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -678,10 +810,12 @@ class PannerNode extends AudioNode native "*PannerNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName ScriptProcessorNode; @docsEditable true
/// @docsEditable true
@DomName('ScriptProcessorNode')
class ScriptProcessorNode extends AudioNode implements EventTarget native "*ScriptProcessorNode" {
/// @domName ScriptProcessorNode.bufferSize; @docsEditable true
/// @docsEditable true
@DomName('ScriptProcessorNode.bufferSize')
final int bufferSize;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -689,10 +823,12 @@ class ScriptProcessorNode extends AudioNode implements EventTarget native "*Scri
// BSD-style license that can be found in the LICENSE file.
/// @domName WaveShaperNode; @docsEditable true
/// @docsEditable true
@DomName('WaveShaperNode')
class WaveShaperNode extends AudioNode native "*WaveShaperNode" {
/// @domName WaveShaperNode.curve; @docsEditable true
/// @docsEditable true
@DomName('WaveShaperNode.curve')
Float32Array curve;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@ -700,6 +836,7 @@ class WaveShaperNode extends AudioNode native "*WaveShaperNode" {
// BSD-style license that can be found in the LICENSE file.
/// @domName WaveTable; @docsEditable true
/// @docsEditable true
@DomName('WaveTable')
class WaveTable native "*WaveTable" {
}

File diff suppressed because it is too large Load diff

View file

@ -738,9 +738,15 @@ def FindCommonAnnotations(interface_name, member_name=None):
""" Finds annotations common between dart2js and dartium.
"""
if member_name:
return dart_annotations.get('%s.%s' % (interface_name, member_name))
key = '%s.%s' % (interface_name, member_name)
else:
return dart_annotations.get(interface_name)
key = interface_name
annotations = ["@DomName('" + key + "')"]
if (dart_annotations.get(key) != None):
annotations.extend(dart_annotations.get(key))
return annotations
def FindDart2JSAnnotations(idl_type, interface_name, member_name):
""" Finds all annotations for Dart2JS members- including annotations for
@ -758,6 +764,13 @@ def FindDart2JSAnnotations(idl_type, interface_name, member_name):
annotations = ann2
return annotations
def AnyConversionAnnotations(idl_type, interface_name, member_name):
if (dart_annotations.get('%s.%s' % (interface_name, member_name)) or
_FindDart2JSSpecificAnnotations(idl_type, interface_name, member_name)):
return True
else:
return False
def _FindDart2JSSpecificAnnotations(idl_type, interface_name, member_name):
""" Finds dart2js-specific annotations. This does not include ones shared with
dartium.

View file

@ -8,7 +8,7 @@ dart:html APIs from the IDL database."""
from generator import AnalyzeOperation, ConstantOutputOrder, \
DartDomNameOfAttribute, FindMatchingAttribute, IsDartCollectionType, \
IsPureInterface, TypeOrNothing
IsPureInterface, TypeOrNothing, FindCommonAnnotations
# Types that are accessible cross-frame in a limited fashion.
# In these cases, the base type (e.g., WindowBase) provides restricted access
@ -40,26 +40,35 @@ class HtmlDartGenerator(object):
def EmitAttributeDocumentation(self, attribute):
""" Emits the MDN dartdoc comment for an attribute.
"""
dom_name = DartDomNameOfAttribute(attribute)
self._members_emitter.Emit('\n /// @domName $DOMINTERFACE.$DOMNAME;'
' @docsEditable true',
annotations = FindCommonAnnotations(dom_name)
annotations_str = ''
if annotations:
annotations_str = '\n' + '\n'.join(annotations)
self._members_emitter.Emit('\n /// @docsEditable true',
DOMINTERFACE=attribute.doc_js_interface_name,
DOMNAME=dom_name)
ANNOTATIONS=annotations)
def EmitOperationDocumentation(self, operation):
""" Emits the MDN dartdoc comment for an operation.
"""
self._members_emitter.Emit('\n /// @domName $DOMINTERFACE.$DOMNAME;'
' @docsEditable true',
annotations = FindCommonAnnotations(operation.name)
annotations_str = ''
if annotations:
annotations_str = '\n' + '\n'.join(annotations)
self._members_emitter.Emit('\n /// @docsEditable true',
DOMINTERFACE=operation.overloads[0].doc_js_interface_name,
DOMNAME=operation.name)
ANNOTATIONS=annotations)
def EmitEventGetter(self, events_class_name):
self._members_emitter.Emit(
'\n /// @domName EventTarget.addEventListener, '
'EventTarget.removeEventListener, EventTarget.dispatchEvent;'
' @docsEditable true'
'\n $TYPE get on =>\n new $TYPE(this);\n',
"\n /// @docsEditable true"
"\n @DomName('EventTarget.addEventListener, "
"EventTarget.removeEventListener, EventTarget.dispatchEvent')"
"\n $TYPE get on =>\n new $TYPE(this);\n",
TYPE=events_class_name)
def AddMembers(self, interface, declare_only=False):
@ -293,7 +302,7 @@ class HtmlDartGenerator(object):
def _AddConstructor(self,
constructor_info, factory_name, factory_constructor_name):
self._members_emitter.Emit('\n ///@docsEditable true');
self._members_emitter.Emit('\n /// @docsEditable true');
if not factory_constructor_name:
factory_constructor_name = '_create'

View file

@ -932,16 +932,18 @@ class Dart2JSBackend(HtmlDartGenerator):
return ''
def _Annotations(self, idl_type, idl_member_name):
out = ''
annotations = FindDart2JSAnnotations(idl_type, self._interface.id,
idl_member_name)
if annotations:
return '%s\n ' % annotations
return_type = self.SecureOutputType(idl_type)
native_type = self._NarrowToImplementationType(idl_type)
if native_type != return_type:
return "@Returns('%s') @Creates('%s')\n " % (native_type, native_type)
else:
return ''
out = '%s\n ' % annotations
if not AnyConversionAnnotations(idl_type, self._interface.id,
idl_member_name):
return_type = self.SecureOutputType(idl_type)
native_type = self._NarrowToImplementationType(idl_type)
if native_type != return_type:
out += "@Returns('%s') @Creates('%s')\n " % (native_type, native_type)
return out
def CustomJSMembers(self):
return _js_custom_members

View file

@ -757,12 +757,9 @@ class DartiumBackend(HtmlDartGenerator):
native_binding = '%s_%s_%s' % (self._interface.id, idl_name, native_suffix)
self._members_emitter.Emit(
'\n'
'\n /** @domName $DOMINTERFACE.$DOMNAME */'
'$ANNOTATIONS'
'\n $DART_DECLARATION native "$NATIVE_BINDING";\n',
DOMINTERFACE=self._interface.id,
DOMNAME=idl_name,
ANNOTATIONS=annotation_str,
DART_DECLARATION=dart_declaration,
NATIVE_BINDING=native_binding)

View file

@ -49,7 +49,7 @@ class _CssStyleDeclarationFactoryProvider {
}
class _DocumentFragmentFactoryProvider {
/** @domName Document.createDocumentFragment */
@DomName('Document.createDocumentFragment')
static DocumentFragment createDocumentFragment() =>
document.createDocumentFragment();

View file

@ -4,6 +4,6 @@
part of $LIBRARYNAME;
/// @domName $DOMNAME; @docsEditable true$ANNOTATIONS
/// @docsEditable true$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS}

View file

@ -3,11 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
/// @domName $DOMNAME$ANNOTATIONS
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
/// @domName ArrayBuffer.slice;
@DomName('ArrayBuffer.slice')
ArrayBuffer slice(int begin, [int end]) {
// IE10 supports ArrayBuffers but does not have the slice method.
if (JS('bool', '!!#.slice', this)) {

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of web_audio;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// TODO(efortuna): Remove these methods when Chrome stable also uses start

View file

@ -3,95 +3,115 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class Console {
static Console safeConsole = new Console();
bool get _isConsoleDefined => JS('bool', "typeof console != 'undefined'");
/// @domName Console.memory; @docsEditable true
/// @docsEditable true
@DomName('Console.memory')
MemoryInfo get memory => _isConsoleDefined ?
JS('MemoryInfo', 'console.memory') : null;
/// @domName Console.profiles; @docsEditable true
/// @docsEditable true
@DomName('Console.profiles')
List<ScriptProfile> get profiles => _isConsoleDefined ?
JS('List<ScriptProfile>', 'console.profiles') : null;
/// @domName Console.assertCondition; @docsEditable true
/// @docsEditable true
@DomName('Console.assertCondition')
void assertCondition(bool condition, Object arg) => _isConsoleDefined ?
JS('void', 'console.assertCondition(#, #)', condition, arg) : null;
/// @domName Console.count; @docsEditable true
/// @docsEditable true
@DomName('Console.count')
void count(Object arg) => _isConsoleDefined ?
JS('void', 'console.count(#)', arg) : null;
/// @domName Console.debug; @docsEditable true
/// @docsEditable true
@DomName('Console.debug')
void debug(Object arg) => _isConsoleDefined ?
JS('void', 'console.debug(#)', arg) : null;
/// @domName Console.dir; @docsEditable true
/// @docsEditable true
@DomName('Console.dir')
void dir(Object arg) => _isConsoleDefined ?
JS('void', 'console.debug(#)', arg) : null;
/// @domName Console.dirxml; @docsEditable true
/// @docsEditable true
@DomName('Console.dirxml')
void dirxml(Object arg) => _isConsoleDefined ?
JS('void', 'console.dirxml(#)', arg) : null;
/// @domName Console.error; @docsEditable true
/// @docsEditable true
@DomName('Console.error')
void error(Object arg) => _isConsoleDefined ?
JS('void', 'console.error(#)', arg) : null;
/// @domName Console.group; @docsEditable true
/// @docsEditable true
@DomName('Console.group')
void group(Object arg) => _isConsoleDefined ?
JS('void', 'console.group(#)', arg) : null;
/// @domName Console.groupCollapsed; @docsEditable true
/// @docsEditable true
@DomName('Console.groupCollapsed')
void groupCollapsed(Object arg) => _isConsoleDefined ?
JS('void', 'console.groupCollapsed(#)', arg) : null;
/// @domName Console.groupEnd; @docsEditable true
/// @docsEditable true
@DomName('Console.groupEnd')
void groupEnd() => _isConsoleDefined ?
JS('void', 'console.groupEnd()') : null;
/// @domName Console.info; @docsEditable true
/// @docsEditable true
@DomName('Console.info')
void info(Object arg) => _isConsoleDefined ?
JS('void', 'console.info(#)', arg) : null;
/// @domName Console.log; @docsEditable true
/// @docsEditable true
@DomName('Console.log')
void log(Object arg) => _isConsoleDefined ?
JS('void', 'console.log(#)', arg) : null;
/// @domName Console.markTimeline; @docsEditable true
/// @docsEditable true
@DomName('Console.markTimeline')
void markTimeline(Object arg) => _isConsoleDefined ?
JS('void', 'console.markTimeline(#)', arg) : null;
/// @domName Console.profile; @docsEditable true
/// @docsEditable true
@DomName('Console.profile')
void profile(String title) => _isConsoleDefined ?
JS('void', 'console.profile(#)', title) : null;
/// @domName Console.profileEnd; @docsEditable true
/// @docsEditable true
@DomName('Console.profileEnd')
void profileEnd(String title) => _isConsoleDefined ?
JS('void', 'console.profileEnd(#)', title) : null;
/// @domName Console.time; @docsEditable true
/// @docsEditable true
@DomName('Console.time')
void time(String title) => _isConsoleDefined ?
JS('void', 'console.time(#)', title) : null;
/// @domName Console.timeEnd; @docsEditable true
/// @docsEditable true
@DomName('Console.timeEnd')
void timeEnd(String title, Object arg) => _isConsoleDefined ?
JS('void', 'console.timeEnd(#, #)', title, arg) : null;
/// @domName Console.timeStamp; @docsEditable true
/// @docsEditable true
@DomName('Console.timeStamp')
void timeStamp(Object arg) => _isConsoleDefined ?
JS('void', 'console.timeStamp(#)', arg) : null;
/// @domName Console.trace; @docsEditable true
/// @docsEditable true
@DomName('Console.trace')
void trace(Object arg) => _isConsoleDefined ?
JS('void', 'console.trace(#)', arg) : null;
/// @domName Console.warn; @docsEditable true
/// @docsEditable true
@DomName('Console.warn')
void warn(Object arg) => _isConsoleDefined ?
JS('void', 'console.warn(#)', arg) : null;
$!MEMBERS

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of indexed_db;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
Transaction transaction(storeName_OR_storeNames, String mode) {

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
/// @domName KeyboardEvent; @docsEditable true
@DomName('KeyboardEvent')
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(String type, Window view,
@ -17,7 +17,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
return e;
}
/** @domName KeyboardEvent.initKeyboardEvent */
@DomName('KeyboardEvent.initKeyboardEvent')
void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable,
Window view, String keyIdentifier, int keyLocation, bool ctrlKey,
bool altKey, bool shiftKey, bool metaKey, bool altGraphKey) {
@ -37,10 +37,10 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
}
}
/** @domName KeyboardEvent.keyCode */
@DomName('KeyboardEvent.keyCode')
int get keyCode => $dom_keyCode;
/** @domName KeyboardEvent.charCode */
@DomName('KeyboardEvent.charCode')
int get charCode => $dom_charCode;
$!MEMBERS
}

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(String type, Window view, int detail, int screenX,
int screenY, int clientX, int clientY, int button, [bool canBubble = true,

View file

@ -3,11 +3,11 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
/// @domName $DOMNAME; @docsEditable true
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/// @domName Navigator.language; @docsEditable true
/// @docsEditable true
@DomName('Navigator.language')
String get language => JS('String', '#.language || #.userLanguage', this,
this);
$!MEMBERS

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
static String createObjectUrl(blob_OR_source_OR_stream) =>

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
Document get document => JS('Document', '#.document', this);
@ -80,7 +79,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
_addMeasurementFrameCallback(callback);
}
/** @domName DOMWindow.requestAnimationFrame */
@DomName('DOMWindow.requestAnimationFrame')
int requestAnimationFrame(RequestAnimationFrameCallback callback) {
_ensureRequestAnimationFrame();
return _requestAnimationFrame(callback);
@ -157,7 +156,8 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
document.documentElement.attributes['dart-port:$name'] = json.stringify(serialized);
}
/// @domName Window.console; @docsEditable true
/// @docsEditable true
@DomName('Window.console')
Console get console => Console.safeConsole;
$!MEMBERS

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS

View file

@ -5,5 +5,6 @@ library web_audio;
import 'dart:async';
import 'dart:html';
import 'dart:html_common';
$!GENERATED_DART_FILES

View file

@ -5,8 +5,7 @@
// WARNING: Do not edit - generated code.
part of $LIBRARYNAME;
/// @domName $DOMNAME$ANNOTATIONS
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS {
$!MEMBERS
}

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
/// @domName KeyboardEvent; @docsEditable true
@DomName('KeyboardEvent')
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(String type, Window view,
@ -17,10 +17,10 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
return e;
}
/** @domName KeyboardEvent.keyCode */
@DomName('KeyboardEvent.keyCode')
int get keyCode => $dom_keyCode;
/** @domName KeyboardEvent.charCode */
@DomName('KeyboardEvent.charCode')
int get charCode => $dom_charCode;
$!MEMBERS
}

View file

@ -5,8 +5,7 @@
// WARNING: Do not edit - generated code.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(String type, Window view, int detail, int screenX,
int screenY, int clientX, int clientY, int button, [bool canBubble = true,

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of web_audio;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
$if DART2JS

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
$if DART2JS

View file

@ -20,8 +20,7 @@ String get _browserPrefix {
}
return _cachedBrowserPrefix;
}
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.create$CLASSNAME();
factory $CLASSNAME.css(String css) =>

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS

View file

@ -5,8 +5,7 @@
// WARNING: Do not edit - generated code.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(String type, [bool canBubble = true, bool cancelable = true,
Object detail]) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
/**
* The base class for all documents.
*

View file

@ -18,8 +18,7 @@ class _FrozenCssClassSet extends CssClassSet {
bool get frozen => true;
}
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.createDocumentFragment();

View file

@ -874,7 +874,7 @@ class _ElementFactoryProvider {
'tr': null,
};
/** @domName Document.createElement */
@DomName('Document.createElement')
static Element createElement_html(String html) {
// TODO(jacobr): this method can be made more robust and performant.
// 1) Cache the dummy parent elements required to use innerHTML rather than
@ -970,7 +970,7 @@ class _ElementFactoryProvider {
'top level elements but 1 expected');
}
/** @domName Document.createElement */
@DomName('Document.createElement')
$if DART2JS
// Optimization to improve performance until the dart2js compiler inlines this
// method.

View file

@ -5,8 +5,7 @@
// WARNING: Do not edit - generated code.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// In JS, canBubble and cancelable are technically required parameters to
// init*Event. In practice, though, if they aren't provided they simply

View file

@ -64,8 +64,7 @@ class EventListenerList {
_ptr.$dom_removeEventListener(_type, listener, useCapture);
}
}
/// @domName $DOMNAME
$ANNOTATIONS
/**
* Base class for all browser objects that support events.
*
@ -76,7 +75,7 @@ class EventListenerList {
*/
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/** @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent */
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
Events get on => new Events(this);
$!MEMBERS
}

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS

View file

@ -5,24 +5,23 @@
// WARNING: Do not edit - generated code.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
/** @domName Document.body */
@DomName('Document.body')
BodyElement get body => document.$dom_body;
/** @domName Document.body */
@DomName('Document.body')
void set body(BodyElement value) {
document.$dom_body = value;
}
/** @domName Document.caretRangeFromPoint */
@DomName('Document.caretRangeFromPoint')
Range caretRangeFromPoint(int x, int y) {
return document.$dom_caretRangeFromPoint(x, y);
}
/** @domName Document.elementFromPoint */
@DomName('Document.elementFromPoint')
Element elementFromPoint(int x, int y) {
return document.$dom_elementFromPoint(x, y);
}
@ -65,71 +64,72 @@ $endif
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental()
@DomName('Document.getCSSCanvasContext')
CanvasRenderingContext getCssCanvasContext(String contextId, String name,
int width, int height) {
return document.$dom_getCssCanvasContext(contextId, name, width, height);
}
/** @domName Document.head */
@DomName('Document.head')
HeadElement get head => document.$dom_head;
/** @domName Document.lastModified */
@DomName('Document.lastModified')
String get lastModified => document.$dom_lastModified;
/** @domName Document.preferredStylesheetSet */
@DomName('Document.preferredStylesheetSet')
String get preferredStylesheetSet => document.$dom_preferredStylesheetSet;
/** @domName Document.referrer */
@DomName('Document.referrer')
String get referrer => document.$dom_referrer;
/** @domName Document.selectedStylesheetSet */
@DomName('Document.selectedStylesheetSet')
String get selectedStylesheetSet => document.$dom_selectedStylesheetSet;
void set selectedStylesheetSet(String value) {
document.$dom_selectedStylesheetSet = value;
}
/** @domName Document.styleSheets */
@DomName('Document.styleSheets')
List<StyleSheet> get styleSheets => document.$dom_styleSheets;
/** @domName Document.title */
@DomName('Document.title')
String get title => document.$dom_title;
/** @domName Document.title */
@DomName('Document.title')
void set title(String value) {
document.$dom_title = value;
}
/** @domName Document.webkitCancelFullScreen */
@DomName('Document.webkitCancelFullScreen')
void webkitCancelFullScreen() {
document.$dom_webkitCancelFullScreen();
}
/** @domName Document.webkitExitFullscreen */
@DomName('Document.webkitExitFullscreen')
void webkitExitFullscreen() {
document.$dom_webkitExitFullscreen();
}
/** @domName Document.webkitExitPointerLock */
@DomName('Document.webkitExitPointerLock')
void webkitExitPointerLock() {
document.$dom_webkitExitPointerLock();
}
/** @domName Document.webkitFullscreenElement */
@DomName('Document.webkitFullscreenElement')
Element get webkitFullscreenElement => document.$dom_webkitFullscreenElement;
/** @domName Document.webkitFullscreenEnabled */
@DomName('Document.webkitFullscreenEnabled')
bool get webkitFullscreenEnabled => document.$dom_webkitFullscreenEnabled;
/** @domName Document.webkitHidden */
@DomName('Document.webkitHidden')
bool get webkitHidden => document.$dom_webkitHidden;
/** @domName Document.webkitIsFullScreen */
@DomName('Document.webkitIsFullScreen')
bool get webkitIsFullScreen => document.$dom_webkitIsFullScreen;
/** @domName Document.webkitPointerLockElement */
@DomName('Document.webkitPointerLockElement')
Element get webkitPointerLockElement =>
document.$dom_webkitPointerLockElement;
/** @domName Document.webkitVisibilityState */
@DomName('Document.webkitVisibilityState')
String get webkitVisibilityState => document.$dom_webkitVisibilityState;
}

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS implements
HiddenInputElement,
SearchInputElement,
@ -30,7 +29,7 @@ class $CLASSNAME$EXTENDS implements
ButtonInputElement
$NATIVESPEC {
///@docsEditable true
/// @docsEditable true
factory InputElement({String type}) {
var e = document.$dom_createElement("input");
if (type != null) {
@ -53,40 +52,40 @@ $!MEMBERS
* Exposes the functionality common between all InputElement types.
*/
abstract class InputElementBase implements Element {
/// @domName HTMLInputElement.autofocus
@DomName('HTMLInputElement.autofocus')
bool autofocus;
/// @domName HTMLInputElement.disabled
@DomName('HTMLInputElement.disabled')
bool disabled;
/// @domName HTMLInputElement.incremental
@DomName('HTMLInputElement.incremental')
bool incremental;
/// @domName HTMLInputElement.indeterminate
@DomName('HTMLInputElement.indeterminate')
bool indeterminate;
/// @domName HTMLInputElement.labels
@DomName('HTMLInputElement.labels')
List<Node> get labels;
/// @domName HTMLInputElement.name
@DomName('HTMLInputElement.name')
String name;
/// @domName HTMLInputElement.validationMessage
@DomName('HTMLInputElement.validationMessage')
String get validationMessage;
/// @domName HTMLInputElement.validity
@DomName('HTMLInputElement.validity')
ValidityState get validity;
/// @domName HTMLInputElement.value
@DomName('HTMLInputElement.value')
String value;
/// @domName HTMLInputElement.willValidate
@DomName('HTMLInputElement.willValidate')
bool get willValidate;
/// @domName HTMLInputElement.checkValidity
@DomName('HTMLInputElement.checkValidity')
bool checkValidity();
/// @domName HTMLInputElement.setCustomValidity
@DomName('HTMLInputElement.setCustomValidity')
void setCustomValidity(String error);
}
@ -102,40 +101,40 @@ abstract class HiddenInputElement implements Element {
* Base interface for all inputs which involve text editing.
*/
abstract class TextInputElementBase implements InputElementBase {
/// @domName HTMLInputElement.autocomplete
@DomName('HTMLInputElement.autocomplete')
String autocomplete;
/// @domName HTMLInputElement.maxLength
@DomName('HTMLInputElement.maxLength')
int maxLength;
/// @domName HTMLInputElement.pattern
@DomName('HTMLInputElement.pattern')
String pattern;
/// @domName HTMLInputElement.placeholder
@DomName('HTMLInputElement.placeholder')
String placeholder;
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// @domName HTMLInputElement.size
@DomName('HTMLInputElement.size')
int size;
/// @domName HTMLInputElement.select
@DomName('HTMLInputElement.select')
void select();
/// @domName HTMLInputElement.selectionDirection
@DomName('HTMLInputElement.selectionDirection')
String selectionDirection;
/// @domName HTMLInputElement.selectionEnd
@DomName('HTMLInputElement.selectionEnd')
int selectionEnd;
/// @domName HTMLInputElement.selectionStart
@DomName('HTMLInputElement.selectionStart')
int selectionStart;
/// @domName HTMLInputElement.setSelectionRange
@DomName('HTMLInputElement.setSelectionRange')
void setSelectionRange(int start, int end, [String direction]);
}
@ -152,10 +151,10 @@ abstract class TextInputElementBase implements InputElementBase {
abstract class SearchInputElement implements TextInputElementBase {
factory SearchInputElement() => new InputElement(type: 'search');
/// @domName HTMLInputElement.dirName;
@DomName('HTMLInputElement.dirName')
String dirName;
/// @domName HTMLInputElement.list;
@DomName('HTMLInputElement.list')
Element get list;
/// Returns true if this input type is supported on the current platform.
@ -170,10 +169,10 @@ abstract class SearchInputElement implements TextInputElementBase {
abstract class TextInputElement implements TextInputElementBase {
factory TextInputElement() => new InputElement(type: 'text');
/// @domName HTMLInputElement.dirName;
@DomName('HTMLInputElement.dirName')
String dirName;
/// @domName HTMLInputElement.list;
@DomName('HTMLInputElement.list')
Element get list;
}
@ -189,7 +188,7 @@ abstract class TextInputElement implements TextInputElementBase {
abstract class UrlInputElement implements TextInputElementBase {
factory UrlInputElement() => new InputElement(type: 'url');
/// @domName HTMLInputElement.list;
@DomName('HTMLInputElement.list')
Element get list;
/// Returns true if this input type is supported on the current platform.
@ -213,7 +212,7 @@ abstract class UrlInputElement implements TextInputElementBase {
abstract class TelephoneInputElement implements TextInputElementBase {
factory TelephoneInputElement() => new InputElement(type: 'tel');
/// @domName HTMLInputElement.list;
@DomName('HTMLInputElement.list')
Element get list;
/// Returns true if this input type is supported on the current platform.
@ -234,34 +233,34 @@ abstract class TelephoneInputElement implements TextInputElementBase {
abstract class EmailInputElement implements TextInputElementBase {
factory EmailInputElement() => new InputElement(type: 'email');
/// @domName HTMLInputElement.autocomplete
@DomName('HTMLInputElement.autocomplete')
String autocomplete;
/// @domName HTMLInputElement.autofocus
@DomName('HTMLInputElement.autofocus')
bool autofocus;
/// @domName HTMLInputElement.list;
@DomName('HTMLInputElement.list')
Element get list;
/// @domName HTMLInputElement.maxLength
@DomName('HTMLInputElement.maxLength')
int maxLength;
/// @domName HTMLInputElement.multiple;
@DomName('HTMLInputElement.multiple')
bool multiple;
/// @domName HTMLInputElement.pattern
@DomName('HTMLInputElement.pattern')
String pattern;
/// @domName HTMLInputElement.placeholder
@DomName('HTMLInputElement.placeholder')
String placeholder;
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// @domName HTMLInputElement.size
@DomName('HTMLInputElement.size')
int size;
/// Returns true if this input type is supported on the current platform.
@ -282,25 +281,25 @@ abstract class PasswordInputElement implements TextInputElementBase {
*/
abstract class RangeInputElementBase implements InputElementBase {
/// @domName HTMLInputElement.list
@DomName('HTMLInputElement.list')
Element get list;
/// @domName HTMLInputElement.max
@DomName('HTMLInputElement.max')
String max;
/// @domName HTMLInputElement.min
@DomName('HTMLInputElement.min')
String min;
/// @domName HTMLInputElement.step
@DomName('HTMLInputElement.step')
String step;
/// @domName HTMLInputElement.valueAsNumber
@DomName('HTMLInputElement.valueAsNumber')
num valueAsNumber;
/// @domName HTMLInputElement.stepDown
@DomName('HTMLInputElement.stepDown')
void stepDown([int n]);
/// @domName HTMLInputElement.stepUp
@DomName('HTMLInputElement.stepUp')
void stepUp([int n]);
}
@ -315,13 +314,13 @@ abstract class RangeInputElementBase implements InputElementBase {
abstract class DateTimeInputElement implements RangeInputElementBase {
factory DateTimeInputElement() => new InputElement(type: 'datetime');
/// @domName HTMLInputElement.valueAsDate
@DomName('HTMLInputElement.valueAsDate')
Date valueAsDate;
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// Returns true if this input type is supported on the current platform.
@ -340,13 +339,13 @@ abstract class DateTimeInputElement implements RangeInputElementBase {
abstract class DateInputElement implements RangeInputElementBase {
factory DateInputElement() => new InputElement(type: 'date');
/// @domName HTMLInputElement.valueAsDate
@DomName('HTMLInputElement.valueAsDate')
Date valueAsDate;
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// Returns true if this input type is supported on the current platform.
@ -365,13 +364,13 @@ abstract class DateInputElement implements RangeInputElementBase {
abstract class MonthInputElement implements RangeInputElementBase {
factory MonthInputElement() => new InputElement(type: 'month');
/// @domName HTMLInputElement.valueAsDate
@DomName('HTMLInputElement.valueAsDate')
Date valueAsDate;
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// Returns true if this input type is supported on the current platform.
@ -390,13 +389,13 @@ abstract class MonthInputElement implements RangeInputElementBase {
abstract class WeekInputElement implements RangeInputElementBase {
factory WeekInputElement() => new InputElement(type: 'week');
/// @domName HTMLInputElement.valueAsDate
@DomName('HTMLInputElement.valueAsDate')
Date valueAsDate;
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// Returns true if this input type is supported on the current platform.
@ -415,13 +414,13 @@ abstract class WeekInputElement implements RangeInputElementBase {
abstract class TimeInputElement implements RangeInputElementBase {
factory TimeInputElement() => new InputElement(type: 'time');
/// @domName HTMLInputElement.valueAsDate
@DomName('HTMLInputElement.valueAsDate')
Date valueAsDate;
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// Returns true if this input type is supported on the current platform.
@ -442,10 +441,10 @@ abstract class LocalDateTimeInputElement implements RangeInputElementBase {
factory LocalDateTimeInputElement() =>
new InputElement(type: 'datetime-local');
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// Returns true if this input type is supported on the current platform.
@ -464,13 +463,13 @@ abstract class LocalDateTimeInputElement implements RangeInputElementBase {
abstract class NumberInputElement implements RangeInputElementBase {
factory NumberInputElement() => new InputElement(type: 'number');
/// @domName HTMLInputElement.placeholder
@DomName('HTMLInputElement.placeholder')
String placeholder;
/// @domName HTMLInputElement.readOnly
@DomName('HTMLInputElement.readOnly')
bool readOnly;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// Returns true if this input type is supported on the current platform.
@ -506,10 +505,10 @@ abstract class RangeInputElement implements RangeInputElementBase {
abstract class CheckboxInputElement implements InputElementBase {
factory CheckboxInputElement() => new InputElement(type: 'checkbox');
/// @domName HTMLInputElement.checked
@DomName('HTMLInputElement.checked')
bool checked;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
}
@ -528,10 +527,10 @@ abstract class CheckboxInputElement implements InputElementBase {
abstract class RadioButtonInputElement implements InputElementBase {
factory RadioButtonInputElement() => new InputElement(type: 'radio');
/// @domName HTMLInputElement.checked
@DomName('HTMLInputElement.checked')
bool checked;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
}
@ -541,16 +540,16 @@ abstract class RadioButtonInputElement implements InputElementBase {
abstract class FileUploadInputElement implements InputElementBase {
factory FileUploadInputElement() => new InputElement(type: 'file');
/// @domName HTMLInputElement.accept
@DomName('HTMLInputElement.accept')
String accept;
/// @domName HTMLInputElement.multiple
@DomName('HTMLInputElement.multiple')
bool multiple;
/// @domName HTMLInputElement.required
@DomName('HTMLInputElement.required')
bool required;
/// @domName HTMLInputElement.files
@DomName('HTMLInputElement.files')
List<File> files;
}
@ -560,19 +559,19 @@ abstract class FileUploadInputElement implements InputElementBase {
abstract class SubmitButtonInputElement implements InputElementBase {
factory SubmitButtonInputElement() => new InputElement(type: 'submit');
/// @domName HTMLInputElement.formAction
@DomName('HTMLInputElement.formAction')
String formAction;
/// @domName HTMLInputElement.formEnctype
@DomName('HTMLInputElement.formEnctype')
String formEnctype;
/// @domName HTMLInputElement.formMethod
@DomName('HTMLInputElement.formMethod')
String formMethod;
/// @domName HTMLInputElement.formNoValidate
@DomName('HTMLInputElement.formNoValidate')
bool formNoValidate;
/// @domName HTMLInputElement.formTarget
@DomName('HTMLInputElement.formTarget')
String formTarget;
}
@ -583,31 +582,31 @@ abstract class SubmitButtonInputElement implements InputElementBase {
abstract class ImageButtonInputElement implements InputElementBase {
factory ImageButtonInputElement() => new InputElement(type: 'image');
/// @domName HTMLInputElement.alt
@DomName('HTMLInputElement.alt')
String alt;
/// @domName HTMLInputElement.formAction
@DomName('HTMLInputElement.formAction')
String formAction;
/// @domName HTMLInputElement.formEnctype
@DomName('HTMLInputElement.formEnctype')
String formEnctype;
/// @domName HTMLInputElement.formMethod
@DomName('HTMLInputElement.formMethod')
String formMethod;
/// @domName HTMLInputElement.formNoValidate
@DomName('HTMLInputElement.formNoValidate')
bool formNoValidate;
/// @domName HTMLInputElement.formTarget
@DomName('HTMLInputElement.formTarget')
String formTarget;
/// @domName HTMLInputElement.height
@DomName('HTMLInputElement.height')
int height;
/// @domName HTMLInputElement.src
@DomName('HTMLInputElement.src')
String src;
/// @domName HTMLInputElement.width
@DomName('HTMLInputElement.width')
int width;
}

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS

View file

@ -4,7 +4,7 @@
part of $LIBRARYNAME;
/// @domName $DOMNAME; @docsEditable true$ANNOTATIONS
/// @docsEditable true$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
/// @domName $DOMNAME$ANNOTATIONS
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Checks to see if Indexed DB is supported on the current platform.

View file

@ -3,30 +3,21 @@
// BSD-style license that can be found in the LICENSE file.
part of indexed_db;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* @domName IDBKeyRange.only
*/
@DomName('IDBKeyRange.only')
factory KeyRange.only(/*Key*/ value) =>
_KeyRangeFactoryProvider.create$(CLASSNAME)_only(value);
/**
* @domName IDBKeyRange.lowerBound
*/
@DomName('IDBKeyRange.lowerBound')
factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) =>
_KeyRangeFactoryProvider.create$(CLASSNAME)_lowerBound(bound, open);
/**
* @domName IDBKeyRange.upperBound
*/
@DomName('IDBKeyRange.upperBound')
factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) =>
_KeyRangeFactoryProvider.create$(CLASSNAME)_upperBound(bound, open);
/**
* @domName KeyRange.bound
*/
@DomName('KeyRange.bound')
factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper,
[bool lowerOpen = false, bool upperOpen = false]) =>
_KeyRangeFactoryProvider.create$(CLASSNAME)_bound(

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@SupportedBrowser(SupportedBrowser.SAFARI)

View file

@ -205,8 +205,7 @@ $endif
Node operator[](int index) => _this.$dom_childNodes[index];
}
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
List<Node> get nodes {
return new _ChildNodeListLazy(this);
@ -224,8 +223,8 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Removes this node from the DOM.
* @domName Node.removeChild
*/
@DomName('Node.removeChild')
void remove() {
// TODO(jacobr): should we throw an exception if parent is already null?
// TODO(vsm): Use the native remove when available.
@ -237,8 +236,8 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Replaces this node with another node.
* @domName Node.replaceChild
*/
@DomName('Node.replaceChild')
Node replaceWith(Node otherNode) {
try {
final Node parent = this.parentNode;

View file

@ -5,8 +5,7 @@
// WARNING: Do not edit - generated code.
part of $LIBRARYNAME;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME() => document.$dom_createRange();

View file

@ -30,8 +30,7 @@ class _AttributeClassSet extends CssClassSet {
_element.attributes['class'] = Strings.join(list, ' ');
}
}
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME.tag(String tag) =>
_$(CLASSNAME)FactoryProvider.create$(CLASSNAME)_tag(tag);
@ -88,17 +87,17 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// Unsupported methods inherited from Element.
/** @domName Element.insertAdjacentText */
@DomName('Element.insertAdjacentText')
void insertAdjacentText(String where, String text) {
throw new UnsupportedError("Cannot invoke insertAdjacentText on SVG.");
}
/** @domName Element.insertAdjacentHTML */
@DomName('Element.insertAdjacentHTML')
void insertAdjacentHtml(String where, String text) {
throw new UnsupportedError("Cannot invoke insertAdjacentHtml on SVG.");
}
/** @domName Element.insertAdjacentHTML */
@DomName('Element.insertAdjacentHTML')
Element insertAdjacentElement(String where, Element element) {
throw new UnsupportedError("Cannot invoke insertAdjacentElement on SVG.");
}

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of svg;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.createSvgSvgElement();

View file

@ -5,8 +5,7 @@
// WARNING: Do not edit - generated code.
part of html;
/// @domName $DOMNAME$ANNOTATIONS
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
$if DART2JS

View file

@ -3,8 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS implements Map<String, String> $NATIVESPEC {
// TODO(nweiz): update this when maps support lazy iteration

View file

@ -5,8 +5,7 @@
// WARNING: Do not edit - generated code.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(String data) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(data);
$!MEMBERS

View file

@ -5,8 +5,7 @@
// WARNING: Do not edit - generated code.
part of html;
/// @domName $DOMNAME; @docsEditable true
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// In JS, canBubble and cancelable are technically required parameters to
// init*Event. In practice, though, if they aren't provided they simply

View file

@ -3,13 +3,12 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
/// @domName $DOMNAME
$ANNOTATIONS
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
$if DART2JS
/** @domName WheelEvent.deltaY */
@DomName('WheelEvent.deltaY')
num get deltaY {
if (JS('bool', '#.deltaY !== undefined', this)) {
// W3C WheelEvent
@ -37,7 +36,7 @@ $if DART2JS
'deltaY is not supported');
}
/** @domName WheelEvent.deltaX */
@DomName('WheelEvent.deltaX')
num get deltaX {
if (JS('bool', '#.deltaX !== undefined', this)) {
// W3C WheelEvent
@ -82,11 +81,11 @@ $if DART2JS
int get _deltaMode => JS('int', '#.deltaMode', this);
$else
/** @domName WheelEvent.deltaX */
@DomName('WheelEvent.deltaX')
num get deltaX => $dom_wheelDeltaX;
/** @domName WheelEvent.deltaY */
@DomName('WheelEvent.deltaY')
num get deltaY => $dom_wheelDeltaY;
/** @domName WheelEvent.deltaMode */
@DomName('WheelEvent.deltaMode')
int get deltaMode => 0;
$endif

View file

@ -29,7 +29,7 @@ part of html;
* * [JS XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest)
* * [Using XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest)
*/
/// @domName XMLHttpRequest
@DomName('XMLHttpRequest')
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Creates a URL get request for the specified `url`.

View file

@ -4,6 +4,6 @@
part of $LIBRARYNAME;
/// @domName $DOMNAME
/// @docsEditable true$ANNOTATIONS
abstract class $CLASSNAME$EXTENDS$IMPLEMENTS {
$!MEMBERS}

View file

@ -9,6 +9,8 @@
library html_diff;
import 'dart:io';
import 'dart:async';
import '../../sdk/lib/html/html_common/metadata.dart';
// TODO(rnystrom): Use "package:" URL (#4968).
import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart';
@ -33,34 +35,34 @@ const List<String> HTML_DECLARED_NAMES = const [
* based on two indicators:
*
* 1. Auto-detected wrappers. Most `dart:html` types correspond
* straightforwardly to a single `@domName` type, and
* straightforwardly to a single `@DomName` type, and
* have the same name. In addition, most `dart:html` methods
* just call a single `@domName` method. This class
* just call a single `@DomName` method. This class
* detects these simple correspondences automatically.
*
* 2. Manual annotations. When it's not clear which
* `@domName` items a given `dart:html` item
* `@DomName` items a given `dart:html` item
* corresponds to, the `dart:html` item can be annotated in the
* documentation comments using the `@domName` annotation.
* documentation comments using the `@DomName` annotation.
*
* The `@domName` annotations for types and members are of the form
* `@domName NAME(, NAME)*`, where the `NAME`s refer to the
* `@domName` types/members that correspond to the
* The `@DomName` annotations for types and members are of the form
* `@DomName NAME(, NAME)*`, where the `NAME`s refer to the
* `@DomName` types/members that correspond to the
* annotated `dart:html` type/member. `NAME`s on member annotations
* can refer to either fully-qualified member names (e.g.
* `Document.createElement`) or unqualified member names
* (e.g. `createElement`). Unqualified member names are assumed to
* refer to members of one of the corresponding `@domName`
* refer to members of one of the corresponding `@DomName`
* types.
*/
class HtmlDiff {
/**
* A map from `dart:html` members to the corresponding fully qualified
* `@domName` member(s).
* `@DomName` member(s).
*/
final Map<String, Set<String>> htmlToDom;
/** A map from `dart:html` types to corresponding `@domName` types. */
/** A map from `dart:html` types to corresponding `@DomName` types. */
final Map<String, Set<String>> htmlTypesToDom;
final CommentMap comments;
@ -98,7 +100,7 @@ class HtmlDiff {
}
/**
* Computes the `@domName` to `dart:html` mapping, and
* Computes the `@DomName` to `dart:html` mapping, and
* places it in [htmlToDom] and [htmlTypesToDom]. Before this is run, dart2js
* should be initialized (via [parseOptions] and [initializeWorld]) and
* [HtmlDiff.initialize] should be called.
@ -124,9 +126,9 @@ class HtmlDiff {
}
/**
* Records the `@domName` to `dart:html` mapping for
* Records the `@DomName` to `dart:html` mapping for
* [htmlMember] (from `dart:html`). [domTypes] are the
* `@domName` type values that correspond to [htmlMember]'s
* `@DomName` type values that correspond to [htmlMember]'s
* defining type.
*/
void _addMemberDiff(MemberMirror htmlMember, List<String> domTypes,
@ -146,18 +148,21 @@ class HtmlDiff {
}
/**
* Returns the `@domName` type values that correspond to
* Returns the `@DomName` type values that correspond to
* [htmlType] from `dart:html`. This can be the empty list if no
* correspondence is found.
*/
List<String> htmlToDomTypes(ClassMirror htmlType) {
if (htmlType.simpleName == null) return [];
final tags = _getTags(comments.find(htmlType.location));
if (tags.containsKey('domName')) {
if (htmlType.simpleName == null) return <String>[];
final domNameMetadata = _findMetadata(htmlType.metadata, 'DomName');
if (domNameMetadata != null) {
var domNames = <String>[];
for (var s in tags['domName'].split(',')) {
var tags = deprecatedFutureValue(domNameMetadata.getField('name'));
for (var s in tags.reflectee.split(',')) {
domNames.add(s.trim());
}
if (domNames.length == 1 && domNames[0] == 'none') return <String>[];
return domNames;
}
@ -165,20 +170,23 @@ class HtmlDiff {
}
/**
* Returns the `@domName` member values that correspond to
* Returns the `@DomName` member values that correspond to
* [htmlMember] from `dart:html`. This can be the empty set if no
* correspondence is found. [domTypes] are the
* `@domName` type values that correspond to [htmlMember]'s
* `@DomName` type values that correspond to [htmlMember]'s
* defining type.
*/
Set<String> htmlToDomMembers(MemberMirror htmlMember, List<String> domTypes) {
if (htmlMember.isPrivate) return new Set();
final tags = _getTags(comments.find(htmlMember.location));
if (tags.containsKey('domName')) {
final domNameMetadata = _findMetadata(htmlMember.metadata, 'DomName');
if (domNameMetadata != null) {
var domNames = <String>[];
for (var s in tags['domName'].split(',')) {
var tags = deprecatedFutureValue(domNameMetadata.getField('name'));
for (var s in tags.reflectee.split(',')) {
domNames.add(s.trim());
}
if (domNames.length == 1 && domNames[0] == 'none') return new Set();
final members = new Set();
domNames.forEach((name) {
@ -204,12 +212,12 @@ class HtmlDiff {
}
/**
* Returns the `@domName` strings that are indicated by
* Returns the `@DomName` strings that are indicated by
* [name]. [name] can be either an unqualified member name
* (e.g. `createElement`), in which case it's treated as the name of
* a member of one of [defaultTypes], or a fully-qualified member
* name (e.g. `Document.createElement`), in which case it's treated as a
* member of the @domName element (`Document` in this case).
* member of the @DomName element (`Document` in this case).
*/
Set<String> _membersFromName(String name, List<String> defaultTypes) {
if (!name.contains('.', 0)) {
@ -229,21 +237,11 @@ class HtmlDiff {
return new Set.from([name]);
}
/**
* Extracts a [Map] from tag names to values from [comment], which is parsed
* from a Dart source file via dartdoc. Tags are of the form `@NAME VALUE`,
* where `NAME` is alphabetic and `VALUE` can contain any character other than
* `;`. Multiple tags can be separated by semicolons.
*
* At time of writing, the only tag that's used is `@domName`.
*/
Map<String, String> _getTags(String comment) {
if (comment == null) return const <String, String>{};
final re = new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)");
final tags = <String, String>{};
for (var m in re.allMatches(comment.trim())) {
tags[m[1]] = m[2];
}
return tags;
}
}
/// Returns the metadata for the given string or null if not found.
InstanceMirror _findMetadata(List<InstanceMirror> metadataList, String find) {
return metadataList.firstMatching(
(metadata) => metadata.type.simpleName == find,
orElse: () => null);
}