blob: 6d84226de82586655c9f7a3df4df51566f9711e0 [file] [log] [blame]
/**
* HTML elements and other resources for web-based applications that need to
* interact with the browser and the DOM (Document Object Model).
*
* This library includes DOM element types, CSS styling, local storage,
* media, speech, events, and more.
* To get started,
* check out the [Element] class, the base class for many of the HTML
* DOM types.
*
* ## Other resources
*
* * If you've never written a web app before, try our
* tutorials—[A Game of Darts](http://dartlang.org/docs/tutorials).
*
* * To see some web-based Dart apps in action and to play with the code,
* download
* [Dart Editor](http://www.dartlang.org/#get-started)
* and run its built-in examples.
*
* * For even more examples, see
* [Dart HTML5 Samples](https://github.com/dart-lang/dart-html5-samples)
* on Github.
*/
library dart.dom.html;
import 'dart:async';
import 'dart:collection';
import 'dart:_internal' hide Symbol;
import 'dart:html_common';
import 'dart:indexed_db';
import 'dart:indexed_db' show indexed_dbBlinkMap;
import 'dart:indexed_db' show indexed_dbBlinkFunctionMap;
import 'dart:isolate';
import 'dart:js' as js;
import "dart:convert";
import 'dart:math';
import 'dart:mirrors';
import 'dart:nativewrappers';
import 'dart:typed_data';
import 'dart:web_gl' as gl;
import 'dart:web_gl' show web_glBlinkMap;
import 'dart:web_gl' show web_glBlinkFunctionMap;
import 'dart:web_sql';
import 'dart:svg' as svg;
import 'dart:svg' show svgBlinkMap;
import 'dart:svg' show svgBlinkFunctionMap;
import 'dart:svg' show Matrix;
import 'dart:svg' show SvgSvgElement;
import 'dart:web_audio' as web_audio;
import 'dart:web_audio' show web_audioBlinkMap;
import 'dart:web_audio' show web_audioBlinkFunctionMap;
import 'dart:_blink' as _blink;
import 'dart:developer';
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// DO NOT EDIT
// Auto-generated dart:html library.
// TODO(vsm): Remove this when we can do the proper checking in
// native code for custom elements.
// Not actually used, but imported since dart:html can generate these objects.
export 'dart:math' show Rectangle, Point;
// Issue 14721, order important for WrappedEvent.
Window _window;
/**
* Top-level container for a web page, which is usually a browser tab or window.
*
* Each web page loaded in the browser has its own [Window], which is a
* container for the web page.
*
* If the web page has any `<iframe>` elements, then each `<iframe>` has its own
* [Window] object, which is accessible only to that `<iframe>`.
*
* See also:
*
* * [Window](https://developer.mozilla.org/en-US/docs/Web/API/window) from MDN.
*/
Window get window {
if (_window != null) {
return _window;
}
_window = wrap_jso(js.JsNative.getProperty(js.context, 'window'));
return _window;
}
HtmlDocument _document;
/**
* Root node for all content in a web page.
*/
HtmlDocument get document {
if (_document != null) {
return _document;
}
_document = window.document;
return _document;
}
/**
* Spawn a DOM isolate using the given URI in the same window.
* This isolate is not concurrent. It runs on the browser thread
* with full access to the DOM.
* Note: this API is still evolving and may move to dart:isolate.
*/
@Experimental()
Future<Isolate> spawnDomUri(Uri uri, List<String> args, message) {
// TODO(17738): Plumb arguments and return value through.
return _Utils.spawnDomUri(uri.toString());
}
// FIXME: Can we make this private?
final htmlBlinkMap = {
'_HistoryCrossFrame': () => _HistoryCrossFrame,
'_LocationCrossFrame': () => _LocationCrossFrame,
'_DOMWindowCrossFrame': () => _DOMWindowCrossFrame,
// FIXME: Move these to better locations.
'DateTime': () => DateTime,
'JsObject': () => js.JsObjectImpl,
'JsFunction': () => js.JsFunctionImpl,
'JsArray': () => js.JsArrayImpl,
'AbstractWorker': () => AbstractWorker,
'Animation': () => Animation,
'AnimationEffect': () => AnimationEffect,
'AnimationNode': () => AnimationNode,
'AnimationPlayer': () => AnimationPlayer,
'AnimationPlayerEvent': () => AnimationPlayerEvent,
'AnimationTimeline': () => AnimationTimeline,
'ApplicationCache': () => ApplicationCache,
'ApplicationCacheErrorEvent': () => ApplicationCacheErrorEvent,
'Attr': () => _Attr,
'AudioTrack': () => AudioTrack,
'AudioTrackList': () => AudioTrackList,
'AutocompleteErrorEvent': () => AutocompleteErrorEvent,
'BarProp': () => BarProp,
'BatteryManager': () => BatteryManager,
'BeforeUnloadEvent': () => BeforeUnloadEvent,
'Blob': () => Blob,
'Body': () => Body,
'CDATASection': () => CDataSection,
'CSS': () => Css,
'CSSCharsetRule': () => CssCharsetRule,
'CSSFontFaceRule': () => CssFontFaceRule,
'CSSImportRule': () => CssImportRule,
'CSSKeyframeRule': () => CssKeyframeRule,
'CSSKeyframesRule': () => CssKeyframesRule,
'CSSMediaRule': () => CssMediaRule,
'CSSPageRule': () => CssPageRule,
'CSSPrimitiveValue': () => _CSSPrimitiveValue,
'CSSRule': () => CssRule,
'CSSRuleList': () => _CssRuleList,
'CSSStyleDeclaration': () => CssStyleDeclaration,
'CSSStyleRule': () => CssStyleRule,
'CSSStyleSheet': () => CssStyleSheet,
'CSSSupportsRule': () => CssSupportsRule,
'CSSUnknownRule': () => _CSSUnknownRule,
'CSSValue': () => _CSSValue,
'CSSValueList': () => _CssValueList,
'CSSViewportRule': () => CssViewportRule,
'Cache': () => _Cache,
'CacheStorage': () => CacheStorage,
'Canvas2DContextAttributes': () => Canvas2DContextAttributes,
'CanvasGradient': () => CanvasGradient,
'CanvasPathMethods': () => _CanvasPathMethods,
'CanvasPattern': () => CanvasPattern,
'CanvasRenderingContext2D': () => CanvasRenderingContext2D,
'CharacterData': () => CharacterData,
'ChildNode': () => ChildNode,
'CircularGeofencingRegion': () => CircularGeofencingRegion,
'ClientRect': () => _ClientRect,
'ClientRectList': () => _ClientRectList,
'CloseEvent': () => CloseEvent,
'Comment': () => Comment,
'CompositionEvent': () => CompositionEvent,
'Console': () => Console,
'ConsoleBase': () => ConsoleBase,
'Coordinates': () => Coordinates,
'Counter': () => _Counter,
'Credential': () => Credential,
'CredentialsContainer': () => CredentialsContainer,
'Crypto': () => Crypto,
'CryptoKey': () => CryptoKey,
'CustomEvent': () => CustomEvent,
'DOMError': () => DomError,
'DOMException': () => DomException,
'DOMFileSystem': () => FileSystem,
'DOMFileSystemSync': () => _DOMFileSystemSync,
'DOMImplementation': () => DomImplementation,
'DOMMatrix': () => DomMatrix,
'DOMMatrixReadOnly': () => DomMatrixReadOnly,
'DOMParser': () => DomParser,
'DOMPoint': () => DomPoint,
'DOMPointReadOnly': () => DomPointReadOnly,
'DOMRect': () => _DomRect,
'DOMRectReadOnly': () => DomRectReadOnly,
'DOMSettableTokenList': () => DomSettableTokenList,
'DOMStringList': () => DomStringList,
'DOMStringMap': () => DomStringMap,
'DOMTokenList': () => DomTokenList,
'DataTransfer': () => DataTransfer,
'DataTransferItem': () => DataTransferItem,
'DataTransferItemList': () => DataTransferItemList,
'DedicatedWorkerGlobalScope': () => DedicatedWorkerGlobalScope,
'DeprecatedStorageInfo': () => DeprecatedStorageInfo,
'DeprecatedStorageQuota': () => DeprecatedStorageQuota,
'DeviceAcceleration': () => DeviceAcceleration,
'DeviceLightEvent': () => DeviceLightEvent,
'DeviceMotionEvent': () => DeviceMotionEvent,
'DeviceOrientationEvent': () => DeviceOrientationEvent,
'DeviceRotationRate': () => DeviceRotationRate,
'DirectoryEntry': () => DirectoryEntry,
'DirectoryEntrySync': () => _DirectoryEntrySync,
'DirectoryReader': () => DirectoryReader,
'DirectoryReaderSync': () => _DirectoryReaderSync,
'Document': () => Document,
'DocumentFragment': () => DocumentFragment,
'DocumentType': () => _DocumentType,
'Element': () => Element,
'Entry': () => Entry,
'EntrySync': () => _EntrySync,
'ErrorEvent': () => ErrorEvent,
'Event': () => Event,
'EventSource': () => EventSource,
'EventTarget': () => EventTarget,
'ExtendableEvent': () => ExtendableEvent,
'FederatedCredential': () => FederatedCredential,
'FetchEvent': () => FetchEvent,
'File': () => File,
'FileEntry': () => FileEntry,
'FileEntrySync': () => _FileEntrySync,
'FileError': () => FileError,
'FileList': () => FileList,
'FileReader': () => FileReader,
'FileReaderSync': () => _FileReaderSync,
'FileWriter': () => FileWriter,
'FileWriterSync': () => _FileWriterSync,
'FocusEvent': () => FocusEvent,
'FontFace': () => FontFace,
'FontFaceSet': () => FontFaceSet,
'FontFaceSetLoadEvent': () => FontFaceSetLoadEvent,
'FormData': () => FormData,
'Gamepad': () => Gamepad,
'GamepadButton': () => GamepadButton,
'GamepadEvent': () => GamepadEvent,
'GamepadList': () => _GamepadList,
'Geofencing': () => Geofencing,
'GeofencingRegion': () => GeofencingRegion,
'Geolocation': () => Geolocation,
'Geoposition': () => Geoposition,
'GlobalEventHandlers': () => GlobalEventHandlers,
'HTMLAllCollection': () => _HTMLAllCollection,
'HTMLAnchorElement': () => AnchorElement,
'HTMLAppletElement': () => _HTMLAppletElement,
'HTMLAreaElement': () => AreaElement,
'HTMLAudioElement': () => AudioElement,
'HTMLBRElement': () => BRElement,
'HTMLBaseElement': () => BaseElement,
'HTMLBodyElement': () => BodyElement,
'HTMLButtonElement': () => ButtonElement,
'HTMLCanvasElement': () => CanvasElement,
'HTMLCollection': () => HtmlCollection,
'HTMLContentElement': () => ContentElement,
'HTMLDListElement': () => DListElement,
'HTMLDataListElement': () => DataListElement,
'HTMLDetailsElement': () => DetailsElement,
'HTMLDialogElement': () => DialogElement,
'HTMLDirectoryElement': () => _HTMLDirectoryElement,
'HTMLDivElement': () => DivElement,
'HTMLDocument': () => HtmlDocument,
'HTMLElement': () => HtmlElement,
'HTMLEmbedElement': () => EmbedElement,
'HTMLFieldSetElement': () => FieldSetElement,
'HTMLFontElement': () => _HTMLFontElement,
'HTMLFormControlsCollection': () => HtmlFormControlsCollection,
'HTMLFormElement': () => FormElement,
'HTMLFrameElement': () => _HTMLFrameElement,
'HTMLFrameSetElement': () => _HTMLFrameSetElement,
'HTMLHRElement': () => HRElement,
'HTMLHeadElement': () => HeadElement,
'HTMLHeadingElement': () => HeadingElement,
'HTMLHtmlElement': () => HtmlHtmlElement,
'HTMLIFrameElement': () => IFrameElement,
'HTMLImageElement': () => ImageElement,
'HTMLInputElement': () => InputElement,
'HTMLKeygenElement': () => KeygenElement,
'HTMLLIElement': () => LIElement,
'HTMLLabelElement': () => LabelElement,
'HTMLLegendElement': () => LegendElement,
'HTMLLinkElement': () => LinkElement,
'HTMLMapElement': () => MapElement,
'HTMLMarqueeElement': () => _HTMLMarqueeElement,
'HTMLMediaElement': () => MediaElement,
'HTMLMenuElement': () => MenuElement,
'HTMLMenuItemElement': () => MenuItemElement,
'HTMLMetaElement': () => MetaElement,
'HTMLMeterElement': () => MeterElement,
'HTMLModElement': () => ModElement,
'HTMLOListElement': () => OListElement,
'HTMLObjectElement': () => ObjectElement,
'HTMLOptGroupElement': () => OptGroupElement,
'HTMLOptionElement': () => OptionElement,
'HTMLOptionsCollection': () => HtmlOptionsCollection,
'HTMLOutputElement': () => OutputElement,
'HTMLParagraphElement': () => ParagraphElement,
'HTMLParamElement': () => ParamElement,
'HTMLPictureElement': () => PictureElement,
'HTMLPreElement': () => PreElement,
'HTMLProgressElement': () => ProgressElement,
'HTMLQuoteElement': () => QuoteElement,
'HTMLScriptElement': () => ScriptElement,
'HTMLSelectElement': () => SelectElement,
'HTMLShadowElement': () => ShadowElement,
'HTMLSourceElement': () => SourceElement,
'HTMLSpanElement': () => SpanElement,
'HTMLStyleElement': () => StyleElement,
'HTMLTableCaptionElement': () => TableCaptionElement,
'HTMLTableCellElement': () => TableCellElement,
'HTMLTableColElement': () => TableColElement,
'HTMLTableElement': () => TableElement,
'HTMLTableRowElement': () => TableRowElement,
'HTMLTableSectionElement': () => TableSectionElement,
'HTMLTemplateElement': () => TemplateElement,
'HTMLTextAreaElement': () => TextAreaElement,
'HTMLTitleElement': () => TitleElement,
'HTMLTrackElement': () => TrackElement,
'HTMLUListElement': () => UListElement,
'HTMLUnknownElement': () => UnknownElement,
'HTMLVideoElement': () => VideoElement,
'HashChangeEvent': () => HashChangeEvent,
'Headers': () => Headers,
'History': () => History,
'ImageBitmap': () => ImageBitmap,
'ImageData': () => ImageData,
'InjectedScriptHost': () => InjectedScriptHost,
'InputMethodContext': () => InputMethodContext,
'InstallEvent': () => InstallEvent,
'Iterator': () => DomIterator,
'KeyboardEvent': () => KeyboardEvent,
'LocalCredential': () => LocalCredential,
'Location': () => Location,
'MIDIAccess': () => MidiAccess,
'MIDIConnectionEvent': () => MidiConnectionEvent,
'MIDIInput': () => MidiInput,
'MIDIInputMap': () => MidiInputMap,
'MIDIMessageEvent': () => MidiMessageEvent,
'MIDIOutput': () => MidiOutput,
'MIDIOutputMap': () => MidiOutputMap,
'MIDIPort': () => MidiPort,
'MediaController': () => MediaController,
'MediaDeviceInfo': () => MediaDeviceInfo,
'MediaError': () => MediaError,
'MediaKeyError': () => MediaKeyError,
'MediaKeyEvent': () => MediaKeyEvent,
'MediaKeyMessageEvent': () => MediaKeyMessageEvent,
'MediaKeyNeededEvent': () => MediaKeyNeededEvent,
'MediaKeySession': () => MediaKeySession,
'MediaKeys': () => MediaKeys,
'MediaList': () => MediaList,
'MediaQueryList': () => MediaQueryList,
'MediaQueryListEvent': () => MediaQueryListEvent,
'MediaSource': () => MediaSource,
'MediaStream': () => MediaStream,
'MediaStreamEvent': () => MediaStreamEvent,
'MediaStreamTrack': () => MediaStreamTrack,
'MediaStreamTrackEvent': () => MediaStreamTrackEvent,
'MemoryInfo': () => MemoryInfo,
'MessageChannel': () => MessageChannel,
'MessageEvent': () => MessageEvent,
'MessagePort': () => MessagePort,
'Metadata': () => Metadata,
'MimeType': () => MimeType,
'MimeTypeArray': () => MimeTypeArray,
'MouseEvent': () => MouseEvent,
'MutationEvent': () => _MutationEvent,
'MutationObserver': () => MutationObserver,
'MutationRecord': () => MutationRecord,
'NamedNodeMap': () => _NamedNodeMap,
'Navigator': () => Navigator,
'NavigatorCPU': () => NavigatorCpu,
'NavigatorID': () => NavigatorID,
'NavigatorLanguage': () => NavigatorLanguage,
'NavigatorOnLine': () => NavigatorOnLine,
'NavigatorUserMediaError': () => NavigatorUserMediaError,
'NetworkInformation': () => NetworkInformation,
'Node': () => Node,
'NodeFilter': () => NodeFilter,
'NodeIterator': () => NodeIterator,
'NodeList': () => NodeList,
'Notification': () => Notification,
'OverflowEvent': () => OverflowEvent,
'PagePopupController': () => _PagePopupController,
'PageTransitionEvent': () => PageTransitionEvent,
'ParentNode': () => ParentNode,
'Path2D': () => Path2D,
'Performance': () => Performance,
'PerformanceEntry': () => PerformanceEntry,
'PerformanceMark': () => PerformanceMark,
'PerformanceMeasure': () => PerformanceMeasure,
'PerformanceNavigation': () => PerformanceNavigation,
'PerformanceResourceTiming': () => PerformanceResourceTiming,
'PerformanceTiming': () => PerformanceTiming,
'Plugin': () => Plugin,
'PluginArray': () => PluginArray,
'PluginPlaceholderElement': () => PluginPlaceholderElement,
'PopStateEvent': () => PopStateEvent,
'PositionError': () => PositionError,
'Presentation': () => Presentation,
'ProcessingInstruction': () => ProcessingInstruction,
'ProgressEvent': () => ProgressEvent,
'PushEvent': () => PushEvent,
'PushManager': () => PushManager,
'PushRegistration': () => PushRegistration,
'RGBColor': () => _RGBColor,
'RTCDTMFSender': () => RtcDtmfSender,
'RTCDTMFToneChangeEvent': () => RtcDtmfToneChangeEvent,
'RTCDataChannel': () => RtcDataChannel,
'RTCDataChannelEvent': () => RtcDataChannelEvent,
'RTCIceCandidate': () => RtcIceCandidate,
'RTCIceCandidateEvent': () => RtcIceCandidateEvent,
'RTCPeerConnection': () => RtcPeerConnection,
'RTCSessionDescription': () => RtcSessionDescription,
'RTCStatsReport': () => RtcStatsReport,
'RTCStatsResponse': () => RtcStatsResponse,
'RadioNodeList': () => _RadioNodeList,
'Range': () => Range,
'ReadableStream': () => ReadableStream,
'Rect': () => _Rect,
'RelatedEvent': () => RelatedEvent,
'Request': () => _Request,
'ResourceProgressEvent': () => ResourceProgressEvent,
'Response': () => _Response,
'Screen': () => Screen,
'ScreenOrientation': () => ScreenOrientation,
'SecurityPolicyViolationEvent': () => SecurityPolicyViolationEvent,
'Selection': () => Selection,
'ServiceWorker': () => _ServiceWorker,
'ServiceWorkerClient': () => ServiceWorkerClient,
'ServiceWorkerClients': () => ServiceWorkerClients,
'ServiceWorkerContainer': () => ServiceWorkerContainer,
'ServiceWorkerGlobalScope': () => ServiceWorkerGlobalScope,
'ServiceWorkerRegistration': () => ServiceWorkerRegistration,
'ShadowRoot': () => ShadowRoot,
'SharedWorker': () => SharedWorker,
'SharedWorkerGlobalScope': () => SharedWorkerGlobalScope,
'SourceBuffer': () => SourceBuffer,
'SourceBufferList': () => SourceBufferList,
'SourceInfo': () => SourceInfo,
'SpeechGrammar': () => SpeechGrammar,
'SpeechGrammarList': () => SpeechGrammarList,
'SpeechRecognition': () => SpeechRecognition,
'SpeechRecognitionAlternative': () => SpeechRecognitionAlternative,
'SpeechRecognitionError': () => SpeechRecognitionError,
'SpeechRecognitionEvent': () => SpeechRecognitionEvent,
'SpeechRecognitionResult': () => SpeechRecognitionResult,
'SpeechRecognitionResultList': () => _SpeechRecognitionResultList,
'SpeechSynthesis': () => SpeechSynthesis,
'SpeechSynthesisEvent': () => SpeechSynthesisEvent,
'SpeechSynthesisUtterance': () => SpeechSynthesisUtterance,
'SpeechSynthesisVoice': () => SpeechSynthesisVoice,
'Storage': () => Storage,
'StorageEvent': () => StorageEvent,
'StorageInfo': () => StorageInfo,
'StorageQuota': () => StorageQuota,
'Stream': () => FileStream,
'StyleMedia': () => StyleMedia,
'StyleSheet': () => StyleSheet,
'StyleSheetList': () => _StyleSheetList,
'SubtleCrypto': () => _SubtleCrypto,
'Text': () => Text,
'TextEvent': () => TextEvent,
'TextMetrics': () => TextMetrics,
'TextTrack': () => TextTrack,
'TextTrackCue': () => TextTrackCue,
'TextTrackCueList': () => TextTrackCueList,
'TextTrackList': () => TextTrackList,
'TimeRanges': () => TimeRanges,
'Timing': () => Timing,
'Touch': () => Touch,
'TouchEvent': () => TouchEvent,
'TouchList': () => TouchList,
'TrackEvent': () => TrackEvent,
'TransitionEvent': () => TransitionEvent,
'TreeWalker': () => TreeWalker,
'UIEvent': () => UIEvent,
'URL': () => Url,
'URLUtils': () => UrlUtils,
'URLUtilsReadOnly': () => UrlUtilsReadOnly,
'VTTCue': () => VttCue,
'VTTRegion': () => VttRegion,
'VTTRegionList': () => VttRegionList,
'ValidityState': () => ValidityState,
'VideoPlaybackQuality': () => VideoPlaybackQuality,
'VideoTrack': () => VideoTrack,
'VideoTrackList': () => VideoTrackList,
'WebKitAnimationEvent': () => AnimationEvent,
'WebKitCSSFilterRule': () => CssFilterRule,
'WebKitCSSFilterValue': () => _WebKitCSSFilterValue,
'WebKitCSSMatrix': () => _WebKitCSSMatrix,
'WebKitCSSTransformValue': () => _WebKitCSSTransformValue,
'WebSocket': () => WebSocket,
'WheelEvent': () => WheelEvent,
'Window': () => Window,
'WindowBase64': () => WindowBase64,
'WindowEventHandlers': () => WindowEventHandlers,
'WindowTimers': () => _WindowTimers,
'Worker': () => Worker,
'WorkerConsole': () => WorkerConsole,
'WorkerGlobalScope': () => WorkerGlobalScope,
'WorkerLocation': () => _WorkerLocation,
'WorkerNavigator': () => _WorkerNavigator,
'WorkerPerformance': () => WorkerPerformance,
'XMLDocument': () => XmlDocument,
'XMLHttpRequest': () => HttpRequest,
'XMLHttpRequestEventTarget': () => HttpRequestEventTarget,
'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent,
'XMLHttpRequestUpload': () => HttpRequestUpload,
'XMLSerializer': () => XmlSerializer,
'XPathEvaluator': () => XPathEvaluator,
'XPathExpression': () => XPathExpression,
'XPathNSResolver': () => XPathNSResolver,
'XPathResult': () => XPathResult,
'XSLTProcessor': () => XsltProcessor,
};
// TODO(leafp): We may want to move this elsewhere if html becomes
// a package to avoid dartium depending on pkg:html.
Type _getType(String key) {
var result;
// TODO(vsm): Add Cross Frame and JS types here as well.
// Check the html library.
result = _getHtmlType(key);
if (result != null) {
return result;
}
// Check the web gl library.
result = _getWebGlType(key);
if (result != null) {
return result;
}
// Check the indexed db library.
result = _getIndexDbType(key);
if (result != null) {
return result;
}
// Check the web audio library.
result = _getWebAudioType(key);
if (result != null) {
return result;
}
// Check the web sql library.
result = _getWebSqlType(key);
if (result != null) {
return result;
}
// Check the svg library.
result = _getSvgType(key);
if (result != null) {
return result;
}
return null;
}
Type _getHtmlType(String key) {
if (htmlBlinkMap.containsKey(key)) {
return htmlBlinkMap[key]();
}
return null;
}
Type _getWebGlType(String key) {
if (web_glBlinkMap.containsKey(key)) {
return web_glBlinkMap[key]();
}
return null;
}
Type _getIndexDbType(String key) {
if (indexed_dbBlinkMap.containsKey(key)) {
return indexed_dbBlinkMap[key]();
}
return null;
}
Type _getWebAudioType(String key) {
if (web_audioBlinkMap.containsKey(key)) {
return web_audioBlinkMap[key]();
}
return null;
}
Type _getWebSqlType(String key) {
if (web_sqlBlinkMap.containsKey(key)) {
return web_sqlBlinkMap[key]();
}
return null;
}
Type _getSvgType(String key) {
if (svgBlinkMap.containsKey(key)) {
return svgBlinkMap[key]();
}
return null;
}
// FIXME: Can we make this private?
final htmlBlinkFunctionMap = {
'Animation': () => Animation.internalCreateAnimation,
'AnimationEffect': () => AnimationEffect.internalCreateAnimationEffect,
'AnimationNode': () => AnimationNode.internalCreateAnimationNode,
'AnimationPlayer': () => AnimationPlayer.internalCreateAnimationPlayer,
'AnimationPlayerEvent': () => AnimationPlayerEvent.internalCreateAnimationPlayerEvent,
'AnimationTimeline': () => AnimationTimeline.internalCreateAnimationTimeline,
'ApplicationCache': () => ApplicationCache.internalCreateApplicationCache,
'ApplicationCacheErrorEvent': () => ApplicationCacheErrorEvent.internalCreateApplicationCacheErrorEvent,
'Attr': () => _Attr.internalCreate_Attr,
'AudioTrack': () => AudioTrack.internalCreateAudioTrack,
'AudioTrackList': () => AudioTrackList.internalCreateAudioTrackList,
'AutocompleteErrorEvent': () => AutocompleteErrorEvent.internalCreateAutocompleteErrorEvent,
'BarProp': () => BarProp.internalCreateBarProp,
'BatteryManager': () => BatteryManager.internalCreateBatteryManager,
'BeforeUnloadEvent': () => BeforeUnloadEvent.internalCreateBeforeUnloadEvent,
'Blob': () => Blob.internalCreateBlob,
'Body': () => Body.internalCreateBody,
'CDATASection': () => CDataSection.internalCreateCDataSection,
'CSS': () => Css.internalCreateCss,
'CSSCharsetRule': () => CssCharsetRule.internalCreateCssCharsetRule,
'CSSFontFaceRule': () => CssFontFaceRule.internalCreateCssFontFaceRule,
'CSSImportRule': () => CssImportRule.internalCreateCssImportRule,
'CSSKeyframeRule': () => CssKeyframeRule.internalCreateCssKeyframeRule,
'CSSKeyframesRule': () => CssKeyframesRule.internalCreateCssKeyframesRule,
'CSSMediaRule': () => CssMediaRule.internalCreateCssMediaRule,
'CSSPageRule': () => CssPageRule.internalCreateCssPageRule,
'CSSPrimitiveValue': () => _CSSPrimitiveValue.internalCreate_CSSPrimitiveValue,
'CSSRule': () => CssRule.internalCreateCssRule,
'CSSRuleList': () => _CssRuleList.internalCreate_CssRuleList,
'CSSStyleDeclaration': () => CssStyleDeclaration.internalCreateCssStyleDeclaration,
'CSSStyleRule': () => CssStyleRule.internalCreateCssStyleRule,
'CSSStyleSheet': () => CssStyleSheet.internalCreateCssStyleSheet,
'CSSSupportsRule': () => CssSupportsRule.internalCreateCssSupportsRule,
'CSSUnknownRule': () => _CSSUnknownRule.internalCreate_CSSUnknownRule,
'CSSValue': () => _CSSValue.internalCreate_CSSValue,
'CSSValueList': () => _CssValueList.internalCreate_CssValueList,
'CSSViewportRule': () => CssViewportRule.internalCreateCssViewportRule,
'Cache': () => _Cache.internalCreate_Cache,
'CacheStorage': () => CacheStorage.internalCreateCacheStorage,
'Canvas2DContextAttributes': () => Canvas2DContextAttributes.internalCreateCanvas2DContextAttributes,
'CanvasGradient': () => CanvasGradient.internalCreateCanvasGradient,
'CanvasPattern': () => CanvasPattern.internalCreateCanvasPattern,
'CanvasRenderingContext2D': () => CanvasRenderingContext2D.internalCreateCanvasRenderingContext2D,
'CharacterData': () => CharacterData.internalCreateCharacterData,
'CircularGeofencingRegion': () => CircularGeofencingRegion.internalCreateCircularGeofencingRegion,
'ClientRect': () => _ClientRect.internalCreate_ClientRect,
'ClientRectList': () => _ClientRectList.internalCreate_ClientRectList,
'CloseEvent': () => CloseEvent.internalCreateCloseEvent,
'Comment': () => Comment.internalCreateComment,
'CompositionEvent': () => CompositionEvent.internalCreateCompositionEvent,
'Console': () => Console.internalCreateConsole,
'ConsoleBase': () => ConsoleBase.internalCreateConsoleBase,
'Coordinates': () => Coordinates.internalCreateCoordinates,
'Counter': () => _Counter.internalCreate_Counter,
'Credential': () => Credential.internalCreateCredential,
'CredentialsContainer': () => CredentialsContainer.internalCreateCredentialsContainer,
'Crypto': () => Crypto.internalCreateCrypto,
'CryptoKey': () => CryptoKey.internalCreateCryptoKey,
'CustomEvent': () => CustomEvent.internalCreateCustomEvent,
'DOMError': () => DomError.internalCreateDomError,
'DOMException': () => DomException.internalCreateDomException,
'DOMFileSystem': () => FileSystem.internalCreateFileSystem,
'DOMFileSystemSync': () => _DOMFileSystemSync.internalCreate_DOMFileSystemSync,
'DOMImplementation': () => DomImplementation.internalCreateDomImplementation,
'DOMMatrix': () => DomMatrix.internalCreateDomMatrix,
'DOMMatrixReadOnly': () => DomMatrixReadOnly.internalCreateDomMatrixReadOnly,
'DOMParser': () => DomParser.internalCreateDomParser,
'DOMPoint': () => DomPoint.internalCreateDomPoint,
'DOMPointReadOnly': () => DomPointReadOnly.internalCreateDomPointReadOnly,
'DOMRect': () => _DomRect.internalCreate_DomRect,
'DOMRectReadOnly': () => DomRectReadOnly.internalCreateDomRectReadOnly,
'DOMSettableTokenList': () => DomSettableTokenList.internalCreateDomSettableTokenList,
'DOMStringList': () => DomStringList.internalCreateDomStringList,
'DOMTokenList': () => DomTokenList.internalCreateDomTokenList,
'DataTransfer': () => DataTransfer.internalCreateDataTransfer,
'DataTransferItem': () => DataTransferItem.internalCreateDataTransferItem,
'DataTransferItemList': () => DataTransferItemList.internalCreateDataTransferItemList,
'DedicatedWorkerGlobalScope': () => DedicatedWorkerGlobalScope.internalCreateDedicatedWorkerGlobalScope,
'DeprecatedStorageInfo': () => DeprecatedStorageInfo.internalCreateDeprecatedStorageInfo,
'DeprecatedStorageQuota': () => DeprecatedStorageQuota.internalCreateDeprecatedStorageQuota,
'DeviceAcceleration': () => DeviceAcceleration.internalCreateDeviceAcceleration,
'DeviceLightEvent': () => DeviceLightEvent.internalCreateDeviceLightEvent,
'DeviceMotionEvent': () => DeviceMotionEvent.internalCreateDeviceMotionEvent,
'DeviceOrientationEvent': () => DeviceOrientationEvent.internalCreateDeviceOrientationEvent,
'DeviceRotationRate': () => DeviceRotationRate.internalCreateDeviceRotationRate,
'DirectoryEntry': () => DirectoryEntry.internalCreateDirectoryEntry,
'DirectoryEntrySync': () => _DirectoryEntrySync.internalCreate_DirectoryEntrySync,
'DirectoryReader': () => DirectoryReader.internalCreateDirectoryReader,
'DirectoryReaderSync': () => _DirectoryReaderSync.internalCreate_DirectoryReaderSync,
'Document': () => Document.internalCreateDocument,
'DocumentFragment': () => DocumentFragment.internalCreateDocumentFragment,
'DocumentType': () => _DocumentType.internalCreate_DocumentType,
'Element': () => Element.internalCreateElement,
'Entry': () => Entry.internalCreateEntry,
'EntrySync': () => _EntrySync.internalCreate_EntrySync,
'ErrorEvent': () => ErrorEvent.internalCreateErrorEvent,
'Event': () => Event.internalCreateEvent,
'EventSource': () => EventSource.internalCreateEventSource,
'EventTarget': () => EventTarget.internalCreateEventTarget,
'ExtendableEvent': () => ExtendableEvent.internalCreateExtendableEvent,
'FederatedCredential': () => FederatedCredential.internalCreateFederatedCredential,
'FetchEvent': () => FetchEvent.internalCreateFetchEvent,
'File': () => File.internalCreateFile,
'FileEntry': () => FileEntry.internalCreateFileEntry,
'FileEntrySync': () => _FileEntrySync.internalCreate_FileEntrySync,
'FileError': () => FileError.internalCreateFileError,
'FileList': () => FileList.internalCreateFileList,
'FileReader': () => FileReader.internalCreateFileReader,
'FileReaderSync': () => _FileReaderSync.internalCreate_FileReaderSync,
'FileWriter': () => FileWriter.internalCreateFileWriter,
'FileWriterSync': () => _FileWriterSync.internalCreate_FileWriterSync,
'FocusEvent': () => FocusEvent.internalCreateFocusEvent,
'FontFace': () => FontFace.internalCreateFontFace,
'FontFaceSet': () => FontFaceSet.internalCreateFontFaceSet,
'FontFaceSetLoadEvent': () => FontFaceSetLoadEvent.internalCreateFontFaceSetLoadEvent,
'FormData': () => FormData.internalCreateFormData,
'Gamepad': () => Gamepad.internalCreateGamepad,
'GamepadButton': () => GamepadButton.internalCreateGamepadButton,
'GamepadEvent': () => GamepadEvent.internalCreateGamepadEvent,
'GamepadList': () => _GamepadList.internalCreate_GamepadList,
'Geofencing': () => Geofencing.internalCreateGeofencing,
'GeofencingRegion': () => GeofencingRegion.internalCreateGeofencingRegion,
'Geolocation': () => Geolocation.internalCreateGeolocation,
'Geoposition': () => Geoposition.internalCreateGeoposition,
'HTMLAllCollection': () => _HTMLAllCollection.internalCreate_HTMLAllCollection,
'HTMLAnchorElement': () => AnchorElement.internalCreateAnchorElement,
'HTMLAppletElement': () => _HTMLAppletElement.internalCreate_HTMLAppletElement,
'HTMLAreaElement': () => AreaElement.internalCreateAreaElement,
'HTMLAudioElement': () => AudioElement.internalCreateAudioElement,
'HTMLBRElement': () => BRElement.internalCreateBRElement,
'HTMLBaseElement': () => BaseElement.internalCreateBaseElement,
'HTMLBodyElement': () => BodyElement.internalCreateBodyElement,
'HTMLButtonElement': () => ButtonElement.internalCreateButtonElement,
'HTMLCanvasElement': () => CanvasElement.internalCreateCanvasElement,
'HTMLCollection': () => HtmlCollection.internalCreateHtmlCollection,
'HTMLContentElement': () => ContentElement.internalCreateContentElement,
'HTMLDListElement': () => DListElement.internalCreateDListElement,
'HTMLDataListElement': () => DataListElement.internalCreateDataListElement,
'HTMLDetailsElement': () => DetailsElement.internalCreateDetailsElement,
'HTMLDialogElement': () => DialogElement.internalCreateDialogElement,
'HTMLDirectoryElement': () => _HTMLDirectoryElement.internalCreate_HTMLDirectoryElement,
'HTMLDivElement': () => DivElement.internalCreateDivElement,
'HTMLDocument': () => HtmlDocument.internalCreateHtmlDocument,
'HTMLElement': () => HtmlElement.internalCreateHtmlElement,
'HTMLEmbedElement': () => EmbedElement.internalCreateEmbedElement,
'HTMLFieldSetElement': () => FieldSetElement.internalCreateFieldSetElement,
'HTMLFontElement': () => _HTMLFontElement.internalCreate_HTMLFontElement,
'HTMLFormControlsCollection': () => HtmlFormControlsCollection.internalCreateHtmlFormControlsCollection,
'HTMLFormElement': () => FormElement.internalCreateFormElement,
'HTMLFrameElement': () => _HTMLFrameElement.internalCreate_HTMLFrameElement,
'HTMLFrameSetElement': () => _HTMLFrameSetElement.internalCreate_HTMLFrameSetElement,
'HTMLHRElement': () => HRElement.internalCreateHRElement,
'HTMLHeadElement': () => HeadElement.internalCreateHeadElement,
'HTMLHeadingElement': () => HeadingElement.internalCreateHeadingElement,
'HTMLHtmlElement': () => HtmlHtmlElement.internalCreateHtmlHtmlElement,
'HTMLIFrameElement': () => IFrameElement.internalCreateIFrameElement,
'HTMLImageElement': () => ImageElement.internalCreateImageElement,
'HTMLInputElement': () => InputElement.internalCreateInputElement,
'HTMLKeygenElement': () => KeygenElement.internalCreateKeygenElement,
'HTMLLIElement': () => LIElement.internalCreateLIElement,
'HTMLLabelElement': () => LabelElement.internalCreateLabelElement,
'HTMLLegendElement': () => LegendElement.internalCreateLegendElement,
'HTMLLinkElement': () => LinkElement.internalCreateLinkElement,
'HTMLMapElement': () => MapElement.internalCreateMapElement,
'HTMLMarqueeElement': () => _HTMLMarqueeElement.internalCreate_HTMLMarqueeElement,
'HTMLMediaElement': () => MediaElement.internalCreateMediaElement,
'HTMLMenuElement': () => MenuElement.internalCreateMenuElement,
'HTMLMenuItemElement': () => MenuItemElement.internalCreateMenuItemElement,
'HTMLMetaElement': () => MetaElement.internalCreateMetaElement,
'HTMLMeterElement': () => MeterElement.internalCreateMeterElement,
'HTMLModElement': () => ModElement.internalCreateModElement,
'HTMLOListElement': () => OListElement.internalCreateOListElement,
'HTMLObjectElement': () => ObjectElement.internalCreateObjectElement,
'HTMLOptGroupElement': () => OptGroupElement.internalCreateOptGroupElement,
'HTMLOptionElement': () => OptionElement.internalCreateOptionElement,
'HTMLOptionsCollection': () => HtmlOptionsCollection.internalCreateHtmlOptionsCollection,
'HTMLOutputElement': () => OutputElement.internalCreateOutputElement,
'HTMLParagraphElement': () => ParagraphElement.internalCreateParagraphElement,
'HTMLParamElement': () => ParamElement.internalCreateParamElement,
'HTMLPictureElement': () => PictureElement.internalCreatePictureElement,
'HTMLPreElement': () => PreElement.internalCreatePreElement,
'HTMLProgressElement': () => ProgressElement.internalCreateProgressElement,
'HTMLQuoteElement': () => QuoteElement.internalCreateQuoteElement,
'HTMLScriptElement': () => ScriptElement.internalCreateScriptElement,
'HTMLSelectElement': () => SelectElement.internalCreateSelectElement,
'HTMLShadowElement': () => ShadowElement.internalCreateShadowElement,
'HTMLSourceElement': () => SourceElement.internalCreateSourceElement,
'HTMLSpanElement': () => SpanElement.internalCreateSpanElement,
'HTMLStyleElement': () => StyleElement.internalCreateStyleElement,
'HTMLTableCaptionElement': () => TableCaptionElement.internalCreateTableCaptionElement,
'HTMLTableCellElement': () => TableCellElement.internalCreateTableCellElement,
'HTMLTableColElement': () => TableColElement.internalCreateTableColElement,
'HTMLTableElement': () => TableElement.internalCreateTableElement,
'HTMLTableRowElement': () => TableRowElement.internalCreateTableRowElement,
'HTMLTableSectionElement': () => TableSectionElement.internalCreateTableSectionElement,
'HTMLTemplateElement': () => TemplateElement.internalCreateTemplateElement,
'HTMLTextAreaElement': () => TextAreaElement.internalCreateTextAreaElement,
'HTMLTitleElement': () => TitleElement.internalCreateTitleElement,
'HTMLTrackElement': () => TrackElement.internalCreateTrackElement,
'HTMLUListElement': () => UListElement.internalCreateUListElement,
'HTMLUnknownElement': () => UnknownElement.internalCreateUnknownElement,
'HTMLVideoElement': () => VideoElement.internalCreateVideoElement,
'HashChangeEvent': () => HashChangeEvent.internalCreateHashChangeEvent,
'Headers': () => Headers.internalCreateHeaders,
'History': () => History.internalCreateHistory,
'ImageBitmap': () => ImageBitmap.internalCreateImageBitmap,
'ImageData': () => ImageData.internalCreateImageData,
'InjectedScriptHost': () => InjectedScriptHost.internalCreateInjectedScriptHost,
'InputMethodContext': () => InputMethodContext.internalCreateInputMethodContext,
'InstallEvent': () => InstallEvent.internalCreateInstallEvent,
'Iterator': () => DomIterator.internalCreateDomIterator,
'KeyboardEvent': () => KeyboardEvent.internalCreateKeyboardEvent,
'LocalCredential': () => LocalCredential.internalCreateLocalCredential,
'Location': () => Location.internalCreateLocation,
'MIDIAccess': () => MidiAccess.internalCreateMidiAccess,
'MIDIConnectionEvent': () => MidiConnectionEvent.internalCreateMidiConnectionEvent,
'MIDIInput': () => MidiInput.internalCreateMidiInput,
'MIDIInputMap': () => MidiInputMap.internalCreateMidiInputMap,
'MIDIMessageEvent': () => MidiMessageEvent.internalCreateMidiMessageEvent,
'MIDIOutput': () => MidiOutput.internalCreateMidiOutput,
'MIDIOutputMap': () => MidiOutputMap.internalCreateMidiOutputMap,
'MIDIPort': () => MidiPort.internalCreateMidiPort,
'MediaController': () => MediaController.internalCreateMediaController,
'MediaDeviceInfo': () => MediaDeviceInfo.internalCreateMediaDeviceInfo,
'MediaError': () => MediaError.internalCreateMediaError,
'MediaKeyError': () => MediaKeyError.internalCreateMediaKeyError,
'MediaKeyEvent': () => MediaKeyEvent.internalCreateMediaKeyEvent,
'MediaKeyMessageEvent': () => MediaKeyMessageEvent.internalCreateMediaKeyMessageEvent,
'MediaKeyNeededEvent': () => MediaKeyNeededEvent.internalCreateMediaKeyNeededEvent,
'MediaKeySession': () => MediaKeySession.internalCreateMediaKeySession,
'MediaKeys': () => MediaKeys.internalCreateMediaKeys,
'MediaList': () => MediaList.internalCreateMediaList,
'MediaQueryList': () => MediaQueryList.internalCreateMediaQueryList,
'MediaQueryListEvent': () => MediaQueryListEvent.internalCreateMediaQueryListEvent,
'MediaSource': () => MediaSource.internalCreateMediaSource,
'MediaStream': () => MediaStream.internalCreateMediaStream,
'MediaStreamEvent': () => MediaStreamEvent.internalCreateMediaStreamEvent,
'MediaStreamTrack': () => MediaStreamTrack.internalCreateMediaStreamTrack,
'MediaStreamTrackEvent': () => MediaStreamTrackEvent.internalCreateMediaStreamTrackEvent,
'MemoryInfo': () => MemoryInfo.internalCreateMemoryInfo,
'MessageChannel': () => MessageChannel.internalCreateMessageChannel,
'MessageEvent': () => MessageEvent.internalCreateMessageEvent,
'MessagePort': () => MessagePort.internalCreateMessagePort,
'Metadata': () => Metadata.internalCreateMetadata,
'MimeType': () => MimeType.internalCreateMimeType,
'MimeTypeArray': () => MimeTypeArray.internalCreateMimeTypeArray,
'MouseEvent': () => MouseEvent.internalCreateMouseEvent,
'MutationEvent': () => _MutationEvent.internalCreate_MutationEvent,
'MutationObserver': () => MutationObserver.internalCreateMutationObserver,
'MutationRecord': () => MutationRecord.internalCreateMutationRecord,
'NamedNodeMap': () => _NamedNodeMap.internalCreate_NamedNodeMap,
'Navigator': () => Navigator.internalCreateNavigator,
'NavigatorUserMediaError': () => NavigatorUserMediaError.internalCreateNavigatorUserMediaError,
'NetworkInformation': () => NetworkInformation.internalCreateNetworkInformation,
'Node': () => Node.internalCreateNode,
'NodeFilter': () => NodeFilter.internalCreateNodeFilter,
'NodeIterator': () => NodeIterator.internalCreateNodeIterator,
'NodeList': () => NodeList.internalCreateNodeList,
'Notification': () => Notification.internalCreateNotification,
'OverflowEvent': () => OverflowEvent.internalCreateOverflowEvent,
'PagePopupController': () => _PagePopupController.internalCreate_PagePopupController,
'PageTransitionEvent': () => PageTransitionEvent.internalCreatePageTransitionEvent,
'Path2D': () => Path2D.internalCreatePath2D,
'Performance': () => Performance.internalCreatePerformance,
'PerformanceEntry': () => PerformanceEntry.internalCreatePerformanceEntry,
'PerformanceMark': () => PerformanceMark.internalCreatePerformanceMark,
'PerformanceMeasure': () => PerformanceMeasure.internalCreatePerformanceMeasure,
'PerformanceNavigation': () => PerformanceNavigation.internalCreatePerformanceNavigation,
'PerformanceResourceTiming': () => PerformanceResourceTiming.internalCreatePerformanceResourceTiming,
'PerformanceTiming': () => PerformanceTiming.internalCreatePerformanceTiming,
'Plugin': () => Plugin.internalCreatePlugin,
'PluginArray': () => PluginArray.internalCreatePluginArray,
'PluginPlaceholderElement': () => PluginPlaceholderElement.internalCreatePluginPlaceholderElement,
'PopStateEvent': () => PopStateEvent.internalCreatePopStateEvent,
'PositionError': () => PositionError.internalCreatePositionError,
'Presentation': () => Presentation.internalCreatePresentation,
'ProcessingInstruction': () => ProcessingInstruction.internalCreateProcessingInstruction,
'ProgressEvent': () => ProgressEvent.internalCreateProgressEvent,
'PushEvent': () => PushEvent.internalCreatePushEvent,
'PushManager': () => PushManager.internalCreatePushManager,
'PushRegistration': () => PushRegistration.internalCreatePushRegistration,
'RGBColor': () => _RGBColor.internalCreate_RGBColor,
'RTCDTMFSender': () => RtcDtmfSender.internalCreateRtcDtmfSender,
'RTCDTMFToneChangeEvent': () => RtcDtmfToneChangeEvent.internalCreateRtcDtmfToneChangeEvent,
'RTCDataChannel': () => RtcDataChannel.internalCreateRtcDataChannel,
'RTCDataChannelEvent': () => RtcDataChannelEvent.internalCreateRtcDataChannelEvent,
'RTCIceCandidate': () => RtcIceCandidate.internalCreateRtcIceCandidate,
'RTCIceCandidateEvent': () => RtcIceCandidateEvent.internalCreateRtcIceCandidateEvent,
'RTCPeerConnection': () => RtcPeerConnection.internalCreateRtcPeerConnection,
'RTCSessionDescription': () => RtcSessionDescription.internalCreateRtcSessionDescription,
'RTCStatsReport': () => RtcStatsReport.internalCreateRtcStatsReport,
'RTCStatsResponse': () => RtcStatsResponse.internalCreateRtcStatsResponse,
'RadioNodeList': () => _RadioNodeList.internalCreate_RadioNodeList,
'Range': () => Range.internalCreateRange,
'ReadableStream': () => ReadableStream.internalCreateReadableStream,
'Rect': () => _Rect.internalCreate_Rect,
'RelatedEvent': () => RelatedEvent.internalCreateRelatedEvent,
'Request': () => _Request.internalCreate_Request,
'ResourceProgressEvent': () => ResourceProgressEvent.internalCreateResourceProgressEvent,
'Response': () => _Response.internalCreate_Response,
'Screen': () => Screen.internalCreateScreen,
'ScreenOrientation': () => ScreenOrientation.internalCreateScreenOrientation,
'SecurityPolicyViolationEvent': () => SecurityPolicyViolationEvent.internalCreateSecurityPolicyViolationEvent,
'Selection': () => Selection.internalCreateSelection,
'ServiceWorker': () => _ServiceWorker.internalCreate_ServiceWorker,
'ServiceWorkerClient': () => ServiceWorkerClient.internalCreateServiceWorkerClient,
'ServiceWorkerClients': () => ServiceWorkerClients.internalCreateServiceWorkerClients,
'ServiceWorkerContainer': () => ServiceWorkerContainer.internalCreateServiceWorkerContainer,
'ServiceWorkerGlobalScope': () => ServiceWorkerGlobalScope.internalCreateServiceWorkerGlobalScope,
'ServiceWorkerRegistration': () => ServiceWorkerRegistration.internalCreateServiceWorkerRegistration,
'ShadowRoot': () => ShadowRoot.internalCreateShadowRoot,
'SharedWorker': () => SharedWorker.internalCreateSharedWorker,
'SharedWorkerGlobalScope': () => SharedWorkerGlobalScope.internalCreateSharedWorkerGlobalScope,
'SourceBuffer': () => SourceBuffer.internalCreateSourceBuffer,
'SourceBufferList': () => SourceBufferList.internalCreateSourceBufferList,
'SourceInfo': () => SourceInfo.internalCreateSourceInfo,
'SpeechGrammar': () => SpeechGrammar.internalCreateSpeechGrammar,
'SpeechGrammarList': () => SpeechGrammarList.internalCreateSpeechGrammarList,
'SpeechRecognition': () => SpeechRecognition.internalCreateSpeechRecognition,
'SpeechRecognitionAlternative': () => SpeechRecognitionAlternative.internalCreateSpeechRecognitionAlternative,
'SpeechRecognitionError': () => SpeechRecognitionError.internalCreateSpeechRecognitionError,
'SpeechRecognitionEvent': () => SpeechRecognitionEvent.internalCreateSpeechRecognitionEvent,
'SpeechRecognitionResult': () => SpeechRecognitionResult.internalCreateSpeechRecognitionResult,
'SpeechRecognitionResultList': () => _SpeechRecognitionResultList.internalCreate_SpeechRecognitionResultList,
'SpeechSynthesis': () => SpeechSynthesis.internalCreateSpeechSynthesis,
'SpeechSynthesisEvent': () => SpeechSynthesisEvent.internalCreateSpeechSynthesisEvent,
'SpeechSynthesisUtterance': () => SpeechSynthesisUtterance.internalCreateSpeechSynthesisUtterance,
'SpeechSynthesisVoice': () => SpeechSynthesisVoice.internalCreateSpeechSynthesisVoice,
'Storage': () => Storage.internalCreateStorage,
'StorageEvent': () => StorageEvent.internalCreateStorageEvent,
'StorageInfo': () => StorageInfo.internalCreateStorageInfo,
'StorageQuota': () => StorageQuota.internalCreateStorageQuota,
'Stream': () => FileStream.internalCreateFileStream,
'StyleMedia': () => StyleMedia.internalCreateStyleMedia,
'StyleSheet': () => StyleSheet.internalCreateStyleSheet,
'StyleSheetList': () => _StyleSheetList.internalCreate_StyleSheetList,
'SubtleCrypto': () => _SubtleCrypto.internalCreate_SubtleCrypto,
'Text': () => Text.internalCreateText,
'TextEvent': () => TextEvent.internalCreateTextEvent,
'TextMetrics': () => TextMetrics.internalCreateTextMetrics,
'TextTrack': () => TextTrack.internalCreateTextTrack,
'TextTrackCue': () => TextTrackCue.internalCreateTextTrackCue,
'TextTrackCueList': () => TextTrackCueList.internalCreateTextTrackCueList,
'TextTrackList': () => TextTrackList.internalCreateTextTrackList,
'TimeRanges': () => TimeRanges.internalCreateTimeRanges,
'Timing': () => Timing.internalCreateTiming,
'Touch': () => Touch.internalCreateTouch,
'TouchEvent': () => TouchEvent.internalCreateTouchEvent,
'TouchList': () => TouchList.internalCreateTouchList,
'TrackEvent': () => TrackEvent.internalCreateTrackEvent,
'TransitionEvent': () => TransitionEvent.internalCreateTransitionEvent,
'TreeWalker': () => TreeWalker.internalCreateTreeWalker,
'UIEvent': () => UIEvent.internalCreateUIEvent,
'URL': () => Url.internalCreateUrl,
'VTTCue': () => VttCue.internalCreateVttCue,
'VTTRegion': () => VttRegion.internalCreateVttRegion,
'VTTRegionList': () => VttRegionList.internalCreateVttRegionList,
'ValidityState': () => ValidityState.internalCreateValidityState,
'VideoPlaybackQuality': () => VideoPlaybackQuality.internalCreateVideoPlaybackQuality,
'VideoTrack': () => VideoTrack.internalCreateVideoTrack,
'VideoTrackList': () => VideoTrackList.internalCreateVideoTrackList,
'WebKitAnimationEvent': () => AnimationEvent.internalCreateAnimationEvent,
'WebKitCSSFilterRule': () => CssFilterRule.internalCreateCssFilterRule,
'WebKitCSSFilterValue': () => _WebKitCSSFilterValue.internalCreate_WebKitCSSFilterValue,
'WebKitCSSMatrix': () => _WebKitCSSMatrix.internalCreate_WebKitCSSMatrix,
'WebKitCSSTransformValue': () => _WebKitCSSTransformValue.internalCreate_WebKitCSSTransformValue,
'WebSocket': () => WebSocket.internalCreateWebSocket,
'WheelEvent': () => WheelEvent.internalCreateWheelEvent,
'Window': () => Window.internalCreateWindow,
'Worker': () => Worker.internalCreateWorker,
'WorkerConsole': () => WorkerConsole.internalCreateWorkerConsole,
'WorkerGlobalScope': () => WorkerGlobalScope.internalCreateWorkerGlobalScope,
'WorkerLocation': () => _WorkerLocation.internalCreate_WorkerLocation,
'WorkerNavigator': () => _WorkerNavigator.internalCreate_WorkerNavigator,
'WorkerPerformance': () => WorkerPerformance.internalCreateWorkerPerformance,
'XMLDocument': () => XmlDocument.internalCreateXmlDocument,
'XMLHttpRequest': () => HttpRequest.internalCreateHttpRequest,
'XMLHttpRequestEventTarget': () => HttpRequestEventTarget.internalCreateHttpRequestEventTarget,
'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent.internalCreate_XMLHttpRequestProgressEvent,
'XMLHttpRequestUpload': () => HttpRequestUpload.internalCreateHttpRequestUpload,
'XMLSerializer': () => XmlSerializer.internalCreateXmlSerializer,
'XPathEvaluator': () => XPathEvaluator.internalCreateXPathEvaluator,
'XPathExpression': () => XPathExpression.internalCreateXPathExpression,
'XPathNSResolver': () => XPathNSResolver.internalCreateXPathNSResolver,
'XPathResult': () => XPathResult.internalCreateXPathResult,
'XSLTProcessor': () => XsltProcessor.internalCreateXsltProcessor,
'polymer-element': () => HtmlElement.internalCreateHtmlElement,
};
// TODO(terry): We may want to move this elsewhere if html becomes
// a package to avoid dartium depending on pkg:html.
getHtmlCreateFunction(String key) {
var result;
// TODO(vsm): Add Cross Frame and JS types here as well.
// Check the html library.
result = _getHtmlFunction(key);
if (result != null) {
return result;
}
// Check the web gl library.
result = _getWebGlFunction(key);
if (result != null) {
return result;
}
// Check the indexed db library.
result = _getIndexDbFunction(key);
if (result != null) {
return result;
}
// Check the web audio library.
result = _getWebAudioFunction(key);
if (result != null) {
return result;
}
// Check the web sql library.
result = _getWebSqlFunction(key);
if (result != null) {
return result;
}
// Check the svg library.
result = _getSvgFunction(key);
if (result != null) {
return result;
}
return null;
}
Function _getHtmlFunction(String key) {
if (htmlBlinkFunctionMap.containsKey(key)) {
return htmlBlinkFunctionMap[key]();
}
return null;
}
Function _getWebGlFunction(String key) {
if (web_glBlinkFunctionMap.containsKey(key)) {
return web_glBlinkFunctionMap[key]();
}
return null;
}
Function _getIndexDbFunction(String key) {
if (indexed_dbBlinkFunctionMap.containsKey(key)) {
return indexed_dbBlinkFunctionMap[key]();
}
return null;
}
Function _getWebAudioFunction(String key) {
if (web_audioBlinkFunctionMap.containsKey(key)) {
return web_audioBlinkFunctionMap[key]();
}
return null;
}
Function _getWebSqlFunction(String key) {
if (web_sqlBlinkFunctionMap.containsKey(key)) {
return web_sqlBlinkFunctionMap[key]();
}
return null;
}
Function _getSvgFunction(String key) {
if (svgBlinkFunctionMap.containsKey(key)) {
return svgBlinkFunctionMap[key]();
}
return null;
}
/******************************************************************************
********** **********
********** JS Interop Support **********
********** **********
******************************************************************************/
// List of known tagName to DartClass for custom elements, used for upgrade.
var _knownCustomElements = new Map<String, Map<Type, String>>();
void _addCustomElementType(String tagName, Type dartClass, [String extendTag]) {
_knownCustomElements[tagName] =
{'type': dartClass, 'extends': extendTag != null ? extendTag : "" };
}
Type _getCustomElementType(object) {
var entry = _knownCustomElements[_getCustomElementName(object)];
if (entry != null) {
return entry['type'];
}
return null;
}
String _getCustomElementExtends(object) {
var entry = _knownCustomElements[_getCustomElementName(object)];
if (entry != null) {
return entry['extends'];
}
return null;
}
_getCustomElement(object) => _knownCustomElements[_getCustomElementName(object)];
// Return the tag name or is attribute of the custom element or data binding.
String _getCustomElementName(element) {
var jsObject;
var tag = "";
var runtimeType = element.runtimeType;
if (runtimeType == HtmlElement) {
tag = element.localName;
} else if (runtimeType == TemplateElement) {
// Data binding with a Dart class.
tag = element.attributes['is'];
} else if (runtimeType == js.JsObjectImpl) {
// It's a Polymer core element (written in JS).
// Make sure it's an element anything else we can ignore.
if (element.hasProperty('nodeType') && element['nodeType'] == 1) {
if (js.JsNative.callMethod(element, 'hasAttribute', ['is'])) {
// It's data binding use the is attribute.
tag = js.JsNative.callMethod(element, 'getAttribute', ['is']);
} else {
// It's a custom element we want the local name.
tag = element['localName'];
}
}
} else {
throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, expected HtmlElement/HtmlTemplate/JsObjectImpl.');
}
return tag;
}
Rectangle make_dart_rectangle(r) =>
r == null ? null : new Rectangle(
js.JsNative.getProperty(r, 'left'),
js.JsNative.getProperty(r, 'top'),
js.JsNative.getProperty(r, 'width'),
js.JsNative.getProperty(r, 'height'));
/// An abstract class for all DOM objects we wrap in dart:html and related
/// libraries.
class DartHtmlDomObject {
/// The underlying JS DOM object.
js.JsObject blink_jsObject;
}
// Flag to disable JS interop asserts. Setting to false will speed up the
// wrap_jso calls.
bool __interop_checks = true;
/** Expando for JsObject, used by every Dart class associated with a Javascript
* class (e.g., DOM, WebAudio, etc.).
*/
/**
* Return the JsObject associated with a Dart class [dartClass_instance].
*/
unwrap_jso(dartClass_instance) => js.unwrap_jso(dartClass_instance);
/**
* Create Dart class that maps to the JS Type, add the JsObject as an expando
* on the Dart class and return the created Dart class.
*/
wrap_jso(jsObject) {
try {
if (jsObject is! js.JsObject || jsObject == null) {
// JS Interop converted the object to a Dart class e.g., Uint8ClampedList.
// or it's a simple type.
return jsObject;
}
var wrapper = js.getDartHtmlWrapperFor(jsObject);
// if we have a wrapper return the Dart instance.
if (wrapper != null) {
if (wrapper.runtimeType == HtmlElement && !wrapper._isBadUpgrade) {
// We're a Dart instance but we need to upgrade.
var customElementClass = _getCustomElementType(wrapper);
if (customElementClass != null) {
var dartClass_instance;
try {
dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
} finally {
dartClass_instance.blink_jsObject = jsObject;
jsObject['dart_class'] = dartClass_instance;
js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
return dartClass_instance;
}
}
}
return wrapper;
}
if (jsObject is js.JsArray) {
var wrappingList = new _DartHtmlWrappingList(jsObject);
js.setDartHtmlWrapperFor(jsObject, wrappingList);
return wrappingList;
}
// Try the most general type conversions on it.
// TODO(alanknight): We may be able to do better. This maintains identity,
// which is useful, but expensive. And if we nest something that only
// this conversion handles, how does that work? e.g. a list of maps of elements.
var converted = convertNativeToDart_SerializedScriptValue(jsObject);
if (!identical(converted, jsObject)) {
return converted;
}
var constructor = js.JsNative.getProperty(jsObject, 'constructor');
if (constructor == null) {
// Perfectly valid case for JavaScript objects where __proto__ has
// intentionally been set to null.
js.setDartHtmlWrapperFor(jsObject, jsObject);
return jsObject;
}
var jsTypeName = js.JsNative.getProperty(constructor, 'name');
if (jsTypeName is! String || jsTypeName.length == 0) {
// Not an html type.
js.setDartHtmlWrapperFor(jsObject, jsObject);
return jsObject;
}
var dartClass_instance;
if (jsObject.hasProperty('dart_class')) {
// Got a dart_class (it's a custom element) use it it's already set up
// make sure it's upgraded.
dartClass_instance = _upgradeHtmlElement(jsObject['dart_class']);
} else {
var customElementClass = null;
var extendsTag = "";
var custom = _getCustomElement(jsObject);
if (custom != null) {
customElementClass = custom['type'];
extendsTag = custom['extends'];
}
// Custom Element to upgrade.
if (jsTypeName == 'HTMLElement' && customElementClass != null && extendsTag == "") {
try {
dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
} finally {
dartClass_instance.blink_jsObject = jsObject;
jsObject['dart_class'] = dartClass_instance;
js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
}
} else {
// TODO(terry): Verify with jakemacd that this is right?
// If we every get an auto-binding we're matching previous non-JS Interop
// did to return a TemplateElement.
if (jsTypeName == 'auto-binding') {
jsTypeName = "HTMLTemplateElement";
}
var func = getHtmlCreateFunction(jsTypeName);
if (func == null) {
// One last ditch effort could be a JS custom element.
if (jsObject.toString() == "[object HTMLElement]") {
func = getHtmlCreateFunction("HTMLElement");
}
}
if (func != null) {
dartClass_instance = func();
dartClass_instance.blink_jsObject = jsObject;
js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
}
}
}
// TODO(jacobr): cache that this is not a dart:html JS class.
return dartClass_instance;
} catch(e, stacktrace){
if (__interop_checks) {
if (e is DebugAssertException)
window.console.log("${e.message}\n ${stacktrace}");
else
window.console.log("${stacktrace}");
}
}
return null;
}
/**
* Create Dart class that maps to the JS Type, add the JsObject as an expando
* on the Dart class and return the created Dart class.
*/
wrap_jso_no_SerializedScriptvalue(jsObject) {
try {
if (jsObject is! js.JsObject || jsObject == null) {
// JS Interop converted the object to a Dart class e.g., Uint8ClampedList.
// or it's a simple type.
return jsObject;
}
// TODO(alanknight): With upgraded custom elements this causes a failure because
// we need a new wrapper after the type changes. We could possibly invalidate this
// if the constructor name didn't match?
var wrapper = js.getDartHtmlWrapperFor(jsObject);
if (wrapper != null) {
return wrapper;
}
if (jsObject is js.JsArray) {
var wrappingList = new _DartHtmlWrappingList(jsObject);
js.setDartHtmlWrapperFor(jsObject, wrappingList);
return wrappingList;
}
var constructor = js.JsNative.getProperty(jsObject, 'constructor');
if (constructor == null) {
// Perfectly valid case for JavaScript objects where __proto__ has
// intentionally been set to null.
js.setDartHtmlWrapperFor(jsObject, jsObject);
return jsObject;
}
var jsTypeName = js.JsNative.getProperty(constructor, 'name');
if (jsTypeName is! String || jsTypeName.length == 0) {
// Not an html type.
js.setDartHtmlWrapperFor(jsObject, jsObject);
return jsObject;
}
var func = getHtmlCreateFunction(jsTypeName);
if (func != null) {
var dartClass_instance = func();
dartClass_instance.blink_jsObject = jsObject;
js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
return dartClass_instance;
}
return jsObject;
} catch(e, stacktrace){
if (__interop_checks) {
if (e is DebugAssertException)
window.console.log("${e.message}\n ${stacktrace}");
else
window.console.log("${stacktrace}");
}
}
return null;
}
/**
* Create Dart class that maps to the JS Type that is the JS type being
* extended using JS interop createCallback (we need the base type of the
* custom element) not the Dart created constructor.
*/
wrap_jso_custom_element(jsObject) {
try {
if (jsObject is! js.JsObject) {
// JS Interop converted the object to a Dart class e.g., Uint8ClampedList.
return jsObject;
}
// Find out what object we're extending.
var objectName = jsObject.toString();
// Expect to see something like '[object HTMLElement]'.
if (!objectName.startsWith('[object ')) {
return jsObject;
}
var extendsClass = objectName.substring(8, objectName.length - 1);
var func = getHtmlCreateFunction(extendsClass);
if (__interop_checks)
debug_or_assert("func != null name = ${extendsClass}", func != null);
var dartClass_instance = func();
dartClass_instance.blink_jsObject = jsObject;
return dartClass_instance;
} catch(e, stacktrace){
if (__interop_checks) {
if (e is DebugAssertException)
window.console.log("${e.message}\n ${stacktrace}");
else
window.console.log("${stacktrace}");
}
// Problem?
return null;
}
}
// Upgrade a Dart HtmlElement to the user's Dart custom element class.
_upgradeHtmlElement(dartInstance) {
// Only try upgrading HtmlElement (Dart class) if there is a failure then
// don't try it again - one failure is enough.
if (dartInstance.runtimeType == HtmlElement && !dartInstance._isBadUpgrade) {
// Must be exactly HtmlElement not something derived from it.
var customElementClass = _getCustomElementType(dartInstance);
// Custom Element to upgrade.
if (customElementClass != null) {
var jsObject = dartInstance.blink_jsObject;
try {
dartInstance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
} catch (e) {
dartInstance._badUpgrade();
} finally {
dartInstance.blink_jsObject = jsObject;
jsObject['dart_class'] = dartInstance;
js.setDartHtmlWrapperFor(jsObject, dartInstance);
}
}
}
return dartInstance;
}
class DebugAssertException implements Exception {
String message;
DebugAssertException(this.message);
}
debug_or_assert(message, expression) {
if (!expression) {
throw new DebugAssertException("$message");
}
}
// TODO(terry): Manage JS interop JsFunctions for each listener used for add/
// removeEventListener. These JsFunctions will leak look at
// fixing with weak-refs in C++. The key are the hashcodes of the
// user's this (this is needed for futures) and listener function.
Map<int, Map<int, js.JsFunction>> _knownListeners = {};
js.JsFunction wrap_event_listener(theObject, Function listener) {
var thisHashCode = theObject.hashCode;
var listenerHashCode = identityHashCode(listener);
_knownListeners.putIfAbsent(thisHashCode, () => new Map<int, js.JsFunction>());
_knownListeners[thisHashCode].putIfAbsent(listenerHashCode, () =>
new js.JsFunction.withThis((theObject, event) => listener(wrap_jso(event))));
return _knownListeners[thisHashCode][listenerHashCode];
}
Map<String, dynamic> convertNativeObjectToDartMap(js.JsObject jsObject) {
var result = new Map();
var keys = js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'Object'), 'keys', [jsObject]);
for (var key in keys) {
result[key] = wrap_jso(js.JsNative.getProperty(jsObject, key));
}
return result;
}
// Converts a flat Dart map into a JavaScript object with properties this is
// is the Dartium only version it uses dart:js.
// TODO(alanknight): This could probably be unified with the dart2js conversions
// code in html_common and be more general.
convertDartToNative_Dictionary(Map dict) {
if (dict == null) return null;
var jsObject = new js.JsObject(js.JsNative.getProperty(js.context, 'Object'));
dict.forEach((String key, value) {
if (value is List) {
var jsArray = new js.JsArray();
value.forEach((elem) {
jsArray.add(elem is Map ? convertDartToNative_Dictionary(elem): elem);
});
jsObject[key] = jsArray;
} else {
jsObject[key] = value;
}
});
return jsObject;
}
// Converts a Dart list into a JsArray. For the Dartium version only.
convertDartToNative_List(List input) => new js.JsArray()..addAll(input);
// Conversion function place holder (currently not used in dart2js or dartium).
List convertDartToNative_StringArray(List<String> input) => input;
/**
* Wraps a JsArray and will call wrap_jso on its entries.
*/
class _DartHtmlWrappingList extends ListBase implements NativeFieldWrapperClass2 {
_DartHtmlWrappingList(this.blink_jsObject);
final js.JsArray blink_jsObject;
operator [](int index) => wrap_jso(js.JsNative.getArrayIndex(blink_jsObject, index));
operator []=(int index, value) => blink_jsObject[index] = value;
int get length => blink_jsObject.length;
int set length(int newLength) => blink_jsObject.length = newLength;
}
/**
* Upgrade the JS HTMLElement to the Dart class. Used by Dart's Polymer.
*/
createCustomUpgrader(Type customElementClass, $this) {
var dartClass;
try {
dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
} catch (e) {
dartClass._badUpgrade();
throw e;
} finally {
// Need to remember the Dart class that was created for this custom so
// return it and setup the blink_jsObject to the $this that we'll be working
// with as we talk to blink.
js.setDartHtmlWrapperFor($this, dartClass);
}
return dartClass;
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@DocsEditable()
@DomName('AbstractWorker')
abstract class AbstractWorker extends DartHtmlDomObject implements EventTarget {
// To suppress missing implicit constructor warnings.
factory AbstractWorker._() { throw new UnsupportedError("Not supported"); }
/**
* Static factory designed to expose `error` events to event
* handlers that are not necessarily instances of [AbstractWorker].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('AbstractWorker.errorEvent')
@DocsEditable()
static const EventStreamProvider<ErrorEvent> errorEvent = const EventStreamProvider<ErrorEvent>('error');
/// Stream of `error` events handled by this [AbstractWorker].
@DomName('AbstractWorker.onerror')
@DocsEditable()
Stream<ErrorEvent> get onError => errorEvent.forTarget(this);
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('HTMLAnchorElement')
class AnchorElement extends HtmlElement implements UrlUtils {
// To suppress missing implicit constructor warnings.
factory AnchorElement._() { throw new UnsupportedError("Not supported"); }
@DomName('HTMLAnchorElement.HTMLAnchorElement')
@DocsEditable()
factory AnchorElement({String href}) {
var e = document.createElement("a");
if (href != null) e.href = href;
return e;
}
static AnchorElement internalCreateAnchorElement() {
return new AnchorElement._internalWrap();
}
factory AnchorElement._internalWrap() {
return new AnchorElement.internal_();
}
AnchorElement.internal_() : super.internal_();
/**
* Constructor instantiated by the DOM when a custom element has been created.
*
* This can only be called by subclasses from their created constructor.
*/
AnchorElement.created() : super.created();
@DomName('HTMLAnchorElement.download')
@DocsEditable()
String get download => _blink.BlinkHTMLAnchorElement.instance.download_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.download')
@DocsEditable()
set download(String value) => _blink.BlinkHTMLAnchorElement.instance.download_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.hreflang')
@DocsEditable()
String get hreflang => _blink.BlinkHTMLAnchorElement.instance.hreflang_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.hreflang')
@DocsEditable()
set hreflang(String value) => _blink.BlinkHTMLAnchorElement.instance.hreflang_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.integrity')
@DocsEditable()
@Experimental() // untriaged
String get integrity => _blink.BlinkHTMLAnchorElement.instance.integrity_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.integrity')
@DocsEditable()
@Experimental() // untriaged
set integrity(String value) => _blink.BlinkHTMLAnchorElement.instance.integrity_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.rel')
@DocsEditable()
String get rel => _blink.BlinkHTMLAnchorElement.instance.rel_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.rel')
@DocsEditable()
set rel(String value) => _blink.BlinkHTMLAnchorElement.instance.rel_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.target')
@DocsEditable()
String get target => _blink.BlinkHTMLAnchorElement.instance.target_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.target')
@DocsEditable()
set target(String value) => _blink.BlinkHTMLAnchorElement.instance.target_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.type')
@DocsEditable()
String get type => _blink.BlinkHTMLAnchorElement.instance.type_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.type')
@DocsEditable()
set type(String value) => _blink.BlinkHTMLAnchorElement.instance.type_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.hash')
@DocsEditable()
String get hash => _blink.BlinkHTMLAnchorElement.instance.hash_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.hash')
@DocsEditable()
set hash(String value) => _blink.BlinkHTMLAnchorElement.instance.hash_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.host')
@DocsEditable()
String get host => _blink.BlinkHTMLAnchorElement.instance.host_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.host')
@DocsEditable()
set host(String value) => _blink.BlinkHTMLAnchorElement.instance.host_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.hostname')
@DocsEditable()
String get hostname => _blink.BlinkHTMLAnchorElement.instance.hostname_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.hostname')
@DocsEditable()
set hostname(String value) => _blink.BlinkHTMLAnchorElement.instance.hostname_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.href')
@DocsEditable()
String get href => _blink.BlinkHTMLAnchorElement.instance.href_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.href')
@DocsEditable()
set href(String value) => _blink.BlinkHTMLAnchorElement.instance.href_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.origin')
@DocsEditable()
// WebKit only
@Experimental() // non-standard
String get origin => _blink.BlinkHTMLAnchorElement.instance.origin_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.password')
@DocsEditable()
@Experimental() // untriaged
String get password => _blink.BlinkHTMLAnchorElement.instance.password_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.password')
@DocsEditable()
@Experimental() // untriaged
set password(String value) => _blink.BlinkHTMLAnchorElement.instance.password_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.pathname')
@DocsEditable()
String get pathname => _blink.BlinkHTMLAnchorElement.instance.pathname_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.pathname')
@DocsEditable()
set pathname(String value) => _blink.BlinkHTMLAnchorElement.instance.pathname_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.port')
@DocsEditable()
String get port => _blink.BlinkHTMLAnchorElement.instance.port_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.port')
@DocsEditable()
set port(String value) => _blink.BlinkHTMLAnchorElement.instance.port_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.protocol')
@DocsEditable()
String get protocol => _blink.BlinkHTMLAnchorElement.instance.protocol_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.protocol')
@DocsEditable()
set protocol(String value) => _blink.BlinkHTMLAnchorElement.instance.protocol_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.search')
@DocsEditable()
String get search => _blink.BlinkHTMLAnchorElement.instance.search_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.search')
@DocsEditable()
set search(String value) => _blink.BlinkHTMLAnchorElement.instance.search_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.username')
@DocsEditable()
@Experimental() // untriaged
String get username => _blink.BlinkHTMLAnchorElement.instance.username_Getter_(unwrap_jso(this));
@DomName('HTMLAnchorElement.username')
@DocsEditable()
@Experimental() // untriaged
set username(String value) => _blink.BlinkHTMLAnchorElement.instance.username_Setter_(unwrap_jso(this), value);
@DomName('HTMLAnchorElement.toString')
@DocsEditable()
String toString() => _blink.BlinkHTMLAnchorElement.instance.toString_Callback_0_(unwrap_jso(this));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('Animation')
@Experimental() // untriaged
class Animation extends AnimationNode {
// To suppress missing implicit constructor warnings.
factory Animation._() { throw new UnsupportedError("Not supported"); }
@DomName('Animation.Animation')
@DocsEditable()
factory Animation(Element target, List<Map> keyframes, [timingInput]) {
if ((keyframes is List<Map> || keyframes == null) && (target is Element || target == null) && timingInput == null) {
return wrap_jso(_blink.BlinkAnimation.instance.constructorCallback_2_(target, keyframes));
}
if ((timingInput is num || timingInput == null) && (keyframes is List<Map> || keyframes == null) && (target is Element || target == null)) {
return wrap_jso(_blink.BlinkAnimation.instance.constructorCallback_3_(target, keyframes, timingInput));
}
if ((timingInput is Map || timingInput == null) && (keyframes is List<Map> || keyframes == null) && (target is Element || target == null)) {
var timingInput_1 = convertDartToNative_Dictionary(timingInput);
return wrap_jso(_blink.BlinkAnimation.instance.constructorCallback_3_(target, keyframes, timingInput_1));
}
throw new ArgumentError("Incorrect number or type of arguments");
}
static Animation internalCreateAnimation() {
return new Animation._internalWrap();
}
factory Animation._internalWrap() {
return new Animation.internal_();
}
Animation.internal_() : super.internal_();
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('AnimationEffect')
@Experimental() // untriaged
class AnimationEffect extends DartHtmlDomObject {
// To suppress missing implicit constructor warnings.
factory AnimationEffect._() { throw new UnsupportedError("Not supported"); }
static AnimationEffect internalCreateAnimationEffect() {
return new AnimationEffect._internalWrap();
}
factory AnimationEffect._internalWrap() {
return new AnimationEffect.internal_();
}
AnimationEffect.internal_() { }
bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
int get hashCode => unwrap_jso(this).hashCode;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('WebKitAnimationEvent')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental()
class AnimationEvent extends Event {
// To suppress missing implicit constructor warnings.
factory AnimationEvent._() { throw new UnsupportedError("Not supported"); }
static AnimationEvent internalCreateAnimationEvent() {
return new AnimationEvent._internalWrap();
}
factory AnimationEvent._internalWrap() {
return new AnimationEvent.internal_();
}
AnimationEvent.internal_() : super.internal_();
@DomName('WebKitAnimationEvent.animationName')
@DocsEditable()
String get animationName => _blink.BlinkWebKitAnimationEvent.instance.animationName_Getter_(unwrap_jso(this));
@DomName('WebKitAnimationEvent.elapsedTime')
@DocsEditable()
num get elapsedTime => _blink.BlinkWebKitAnimationEvent.instance.elapsedTime_Getter_(unwrap_jso(this));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('AnimationNode')
@Experimental() // untriaged
class AnimationNode extends DartHtmlDomObject {
// To suppress missing implicit constructor warnings.
factory AnimationNode._() { throw new UnsupportedError("Not supported"); }
static AnimationNode internalCreateAnimationNode() {
return new AnimationNode._internalWrap();
}
factory AnimationNode._internalWrap() {
return new AnimationNode.internal_();
}
AnimationNode.internal_() { }
bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
int get hashCode => unwrap_jso(this).hashCode;
@DomName('AnimationNode.activeDuration')
@DocsEditable()
@Experimental() // untriaged
num get activeDuration => _blink.BlinkAnimationNode.instance.activeDuration_Getter_(unwrap_jso(this));
@DomName('AnimationNode.currentIteration')
@DocsEditable()
@Experimental() // untriaged
int get currentIteration => _blink.BlinkAnimationNode.instance.currentIteration_Getter_(unwrap_jso(this));
@DomName('AnimationNode.duration')
@DocsEditable()
@Experimental() // untriaged
num get duration => _blink.BlinkAnimationNode.instance.duration_Getter_(unwrap_jso(this));
@DomName('AnimationNode.endTime')
@DocsEditable()
@Experimental() // untriaged
num get endTime => _blink.BlinkAnimationNode.instance.endTime_Getter_(unwrap_jso(this));
@DomName('AnimationNode.localTime')
@DocsEditable()
@Experimental() // untriaged
num get localTime => _blink.BlinkAnimationNode.instance.localTime_Getter_(unwrap_jso(this));
@DomName('AnimationNode.player')
@DocsEditable()
@Experimental() // untriaged
AnimationPlayer get player => wrap_jso(_blink.BlinkAnimationNode.instance.player_Getter_(unwrap_jso(this)));
@DomName('AnimationNode.startTime')
@DocsEditable()
@Experimental() // untriaged
num get startTime => _blink.BlinkAnimationNode.instance.startTime_Getter_(unwrap_jso(this));
@DomName('AnimationNode.timing')
@DocsEditable()
@Experimental() // untriaged
Timing get timing => wrap_jso(_blink.BlinkAnimationNode.instance.timing_Getter_(unwrap_jso(this)));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('AnimationPlayer')
@Experimental() // untriaged
class AnimationPlayer extends EventTarget {
// To suppress missing implicit constructor warnings.
factory AnimationPlayer._() { throw new UnsupportedError("Not supported"); }
static AnimationPlayer internalCreateAnimationPlayer() {
return new AnimationPlayer._internalWrap();
}
factory AnimationPlayer._internalWrap() {
return new AnimationPlayer.internal_();
}
AnimationPlayer.internal_() : super.internal_();
/// Checks if this type is supported on the current platform.
static bool get supported => true;
@DomName('AnimationPlayer.currentTime')
@DocsEditable()
@Experimental() // untriaged
num get currentTime => _blink.BlinkAnimationPlayer.instance.currentTime_Getter_(unwrap_jso(this));
@DomName('AnimationPlayer.currentTime')
@DocsEditable()
@Experimental() // untriaged
set currentTime(num value) => _blink.BlinkAnimationPlayer.instance.currentTime_Setter_(unwrap_jso(this), value);
@DomName('AnimationPlayer.playState')
@DocsEditable()
@Experimental() // untriaged
String get playState => _blink.BlinkAnimationPlayer.instance.playState_Getter_(unwrap_jso(this));
@DomName('AnimationPlayer.playbackRate')
@DocsEditable()
@Experimental() // untriaged
num get playbackRate => _blink.BlinkAnimationPlayer.instance.playbackRate_Getter_(unwrap_jso(this));
@DomName('AnimationPlayer.playbackRate')
@DocsEditable()
@Experimental() // untriaged
set playbackRate(num value) => _blink.BlinkAnimationPlayer.instance.playbackRate_Setter_(unwrap_jso(this), value);
@DomName('AnimationPlayer.source')
@DocsEditable()
@Experimental() // untriaged
AnimationNode get source => wrap_jso(_blink.BlinkAnimationPlayer.instance.source_Getter_(unwrap_jso(this)));
@DomName('AnimationPlayer.source')
@DocsEditable()
@Experimental() // untriaged
set source(AnimationNode value) => _blink.BlinkAnimationPlayer.instance.source_Setter_(unwrap_jso(this), unwrap_jso(value));
@DomName('AnimationPlayer.startTime')
@DocsEditable()
@Experimental() // untriaged
num get startTime => _blink.BlinkAnimationPlayer.instance.startTime_Getter_(unwrap_jso(this));
@DomName('AnimationPlayer.startTime')
@DocsEditable()
@Experimental() // untriaged
set startTime(num value) => _blink.BlinkAnimationPlayer.instance.startTime_Setter_(unwrap_jso(this), value);
@DomName('AnimationPlayer.cancel')
@DocsEditable()
@Experimental() // untriaged
void cancel() => _blink.BlinkAnimationPlayer.instance.cancel_Callback_0_(unwrap_jso(this));
@DomName('AnimationPlayer.finish')
@DocsEditable()
@Experimental() // untriaged
void finish() => _blink.BlinkAnimationPlayer.instance.finish_Callback_0_(unwrap_jso(this));
@DomName('AnimationPlayer.pause')
@DocsEditable()
@Experimental() // untriaged
void pause() => _blink.BlinkAnimationPlayer.instance.pause_Callback_0_(unwrap_jso(this));
@DomName('AnimationPlayer.play')
@DocsEditable()
@Experimental() // untriaged
void play() => _blink.BlinkAnimationPlayer.instance.play_Callback_0_(unwrap_jso(this));
@DomName('AnimationPlayer.reverse')
@DocsEditable()
@Experimental() // untriaged
void reverse() => _blink.BlinkAnimationPlayer.instance.reverse_Callback_0_(unwrap_jso(this));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('AnimationPlayerEvent')
@Experimental() // untriaged
class AnimationPlayerEvent extends Event {
// To suppress missing implicit constructor warnings.
factory AnimationPlayerEvent._() { throw new UnsupportedError("Not supported"); }
static AnimationPlayerEvent internalCreateAnimationPlayerEvent() {
return new AnimationPlayerEvent._internalWrap();
}
factory AnimationPlayerEvent._internalWrap() {
return new AnimationPlayerEvent.internal_();
}
AnimationPlayerEvent.internal_() : super.internal_();
@DomName('AnimationPlayerEvent.currentTime')
@DocsEditable()
@Experimental() // untriaged
num get currentTime => _blink.BlinkAnimationPlayerEvent.instance.currentTime_Getter_(unwrap_jso(this));
@DomName('AnimationPlayerEvent.timelineTime')
@DocsEditable()
@Experimental() // untriaged
num get timelineTime => _blink.BlinkAnimationPlayerEvent.instance.timelineTime_Getter_(unwrap_jso(this));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('AnimationTimeline')
@Experimental() // untriaged
class AnimationTimeline extends DartHtmlDomObject {
// To suppress missing implicit constructor warnings.
factory AnimationTimeline._() { throw new UnsupportedError("Not supported"); }
static AnimationTimeline internalCreateAnimationTimeline() {
return new AnimationTimeline._internalWrap();
}
factory AnimationTimeline._internalWrap() {
return new AnimationTimeline.internal_();
}
AnimationTimeline.internal_() { }
bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
int get hashCode => unwrap_jso(this).hashCode;
@DomName('AnimationTimeline.currentTime')
@DocsEditable()
@Experimental() // untriaged
num get currentTime => _blink.BlinkAnimationTimeline.instance.currentTime_Getter_(unwrap_jso(this));
@DomName('AnimationTimeline.getAnimationPlayers')
@DocsEditable()
@Experimental() // untriaged
List<AnimationPlayer> getAnimationPlayers() => wrap_jso(_blink.BlinkAnimationTimeline.instance.getAnimationPlayers_Callback_0_(unwrap_jso(this)));
@DomName('AnimationTimeline.play')
@DocsEditable()
@Experimental() // untriaged
AnimationPlayer play(AnimationNode source) => wrap_jso(_blink.BlinkAnimationTimeline.instance.play_Callback_1_(unwrap_jso(this), unwrap_jso(source)));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
/**
* ApplicationCache is accessed via [Window.applicationCache].
*/
@DomName('ApplicationCache')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@SupportedBrowser(SupportedBrowser.IE, '10')
@SupportedBrowser(SupportedBrowser.OPERA)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Unstable()
class ApplicationCache extends EventTarget {
// To suppress missing implicit constructor warnings.
factory ApplicationCache._() { throw new UnsupportedError("Not supported"); }
/**
* Static factory designed to expose `cached` events to event
* handlers that are not necessarily instances of [ApplicationCache].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('ApplicationCache.cachedEvent')
@DocsEditable()
static const EventStreamProvider<Event> cachedEvent = const EventStreamProvider<Event>('cached');
/**
* Static factory designed to expose `checking` events to event
* handlers that are not necessarily instances of [ApplicationCache].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('ApplicationCache.checkingEvent')
@DocsEditable()
static const EventStreamProvider<Event> checkingEvent = const EventStreamProvider<Event>('checking');
/**
* Static factory designed to expose `downloading` events to event
* handlers that are not necessarily instances of [ApplicationCache].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('ApplicationCache.downloadingEvent')
@DocsEditable()
static const EventStreamProvider<Event> downloadingEvent = const EventStreamProvider<Event>('downloading');
/**
* Static factory designed to expose `error` events to event
* handlers that are not necessarily instances of [ApplicationCache].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('ApplicationCache.errorEvent')
@DocsEditable()
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
/**
* Static factory designed to expose `noupdate` events to event
* handlers that are not necessarily instances of [ApplicationCache].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('ApplicationCache.noupdateEvent')
@DocsEditable()
static const EventStreamProvider<Event> noUpdateEvent = const EventStreamProvider<Event>('noupdate');
/**
* Static factory designed to expose `obsolete` events to event
* handlers that are not necessarily instances of [ApplicationCache].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('ApplicationCache.obsoleteEvent')
@DocsEditable()
static const EventStreamProvider<Event> obsoleteEvent = const EventStreamProvider<Event>('obsolete');
/**
* Static factory designed to expose `progress` events to event
* handlers that are not necessarily instances of [ApplicationCache].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('ApplicationCache.progressEvent')
@DocsEditable()
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
/**
* Static factory designed to expose `updateready` events to event
* handlers that are not necessarily instances of [ApplicationCache].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('ApplicationCache.updatereadyEvent')
@DocsEditable()
static const EventStreamProvider<Event> updateReadyEvent = const EventStreamProvider<Event>('updateready');
static ApplicationCache internalCreateApplicationCache() {
return new ApplicationCache._internalWrap();
}
factory ApplicationCache._internalWrap() {
return new ApplicationCache.internal_();
}
ApplicationCache.internal_() : super.internal_();
/// Checks if this type is supported on the current platform.
static bool get supported => true;
@DomName('ApplicationCache.CHECKING')
@DocsEditable()
static const int CHECKING = 2;
@DomName('ApplicationCache.DOWNLOADING')
@DocsEditable()
static const int DOWNLOADING = 3;
@DomName('ApplicationCache.IDLE')
@DocsEditable()
static const int IDLE = 1;
@DomName('ApplicationCache.OBSOLETE')
@DocsEditable()
static const int OBSOLETE = 5;
@DomName('ApplicationCache.UNCACHED')
@DocsEditable()
static const int UNCACHED = 0;
@DomName('ApplicationCache.UPDATEREADY')
@DocsEditable()
static const int UPDATEREADY = 4;
@DomName('ApplicationCache.status')
@DocsEditable()
int get status => _blink.BlinkApplicationCache.instance.status_Getter_(unwrap_jso(this));
@DomName('ApplicationCache.abort')
@DocsEditable()
void abort() => _blink.BlinkApplicationCache.instance.abort_Callback_0_(unwrap_jso(this));
@DomName('ApplicationCache.swapCache')
@DocsEditable()
void swapCache() => _blink.BlinkApplicationCache.instance.swapCache_Callback_0_(unwrap_jso(this));
@DomName('ApplicationCache.update')
@DocsEditable()
void update() => _blink.BlinkApplicationCache.instance.update_Callback_0_(unwrap_jso(this));
/// Stream of `cached` events handled by this [ApplicationCache].
@DomName('ApplicationCache.oncached')
@DocsEditable()
Stream<Event> get onCached => cachedEvent.forTarget(this);
/// Stream of `checking` events handled by this [ApplicationCache].
@DomName('ApplicationCache.onchecking')
@DocsEditable()
Stream<Event> get onChecking => checkingEvent.forTarget(this);
/// Stream of `downloading` events handled by this [ApplicationCache].
@DomName('ApplicationCache.ondownloading')
@DocsEditable()
Stream<Event> get onDownloading => downloadingEvent.forTarget(this);
/// Stream of `error` events handled by this [ApplicationCache].
@DomName('ApplicationCache.onerror')
@DocsEditable()
Stream<Event> get onError => errorEvent.forTarget(this);
/// Stream of `noupdate` events handled by this [ApplicationCache].
@DomName('ApplicationCache.onnoupdate')
@DocsEditable()
Stream<Event> get onNoUpdate => noUpdateEvent.forTarget(this);
/// Stream of `obsolete` events handled by this [ApplicationCache].
@DomName('ApplicationCache.onobsolete')
@DocsEditable()
Stream<Event> get onObsolete => obsoleteEvent.forTarget(this);
/// Stream of `progress` events handled by this [ApplicationCache].
@DomName('ApplicationCache.onprogress')
@DocsEditable()
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
/// Stream of `updateready` events handled by this [ApplicationCache].
@DomName('ApplicationCache.onupdateready')
@DocsEditable()
Stream<Event> get onUpdateReady => updateReadyEvent.forTarget(this);
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('ApplicationCacheErrorEvent')
@Experimental() // untriaged
class ApplicationCacheErrorEvent extends Event {
// To suppress missing implicit constructor warnings.
factory ApplicationCacheErrorEvent._() { throw new UnsupportedError("Not supported"); }
static ApplicationCacheErrorEvent internalCreateApplicationCacheErrorEvent() {
return new ApplicationCacheErrorEvent._internalWrap();
}
factory ApplicationCacheErrorEvent._internalWrap() {
return new ApplicationCacheErrorEvent.internal_();
}
ApplicationCacheErrorEvent.internal_() : super.internal_();
@DomName('ApplicationCacheErrorEvent.message')
@DocsEditable()
@Experimental() // untriaged
String get message => _blink.BlinkApplicationCacheErrorEvent.instance.message_Getter_(unwrap_jso(this));
@DomName('ApplicationCacheErrorEvent.reason')
@DocsEditable()
@Experimental() // untriaged
String get reason => _blink.BlinkApplicationCacheErrorEvent.instance.reason_Getter_(unwrap_jso(this));
@DomName('ApplicationCacheErrorEvent.status')
@DocsEditable()
@Experimental() // untriaged
int get status => _blink.BlinkApplicationCacheErrorEvent.instance.status_Getter_(unwrap_jso(this));
@DomName('ApplicationCacheErrorEvent.url')
@DocsEditable()
@Experimental() // untriaged
String get url => _blink.BlinkApplicationCacheErrorEvent.instance.url_Getter_(unwrap_jso(this));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
/**
* DOM Area Element, which links regions of an image map with a hyperlink.
*
* The element can also define an uninteractive region of the map.
*
* See also:
*
* * [<area>](https://developer.mozilla.org/en-US/docs/HTML/Element/area)
* on MDN.
*/
@DomName('HTMLAreaElement')
class AreaElement extends HtmlElement implements UrlUtils {
// To suppress missing implicit constructor warnings.
factory AreaElement._() { throw new UnsupportedError("Not supported"); }
@DomName('HTMLAreaElement.HTMLAreaElement')
@DocsEditable()
factory AreaElement() => document.createElement("area");
static AreaElement internalCreateAreaElement() {
return new AreaElement._internalWrap();
}
factory AreaElement._internalWrap() {
return new AreaElement.internal_();
}
AreaElement.internal_() : super.internal_();
/**
* Constructor instantiated by the DOM when a custom element has been created.
*
* This can only be called by subclasses from their created constructor.
*/
AreaElement.created() : super.created();
@DomName('HTMLAreaElement.alt')
@DocsEditable()
String get alt => _blink.BlinkHTMLAreaElement.instance.alt_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.alt')
@DocsEditable()
set alt(String value) => _blink.BlinkHTMLAreaElement.instance.alt_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.coords')
@DocsEditable()
String get coords => _blink.BlinkHTMLAreaElement.instance.coords_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.coords')
@DocsEditable()
set coords(String value) => _blink.BlinkHTMLAreaElement.instance.coords_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.shape')
@DocsEditable()
String get shape => _blink.BlinkHTMLAreaElement.instance.shape_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.shape')
@DocsEditable()
set shape(String value) => _blink.BlinkHTMLAreaElement.instance.shape_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.target')
@DocsEditable()
String get target => _blink.BlinkHTMLAreaElement.instance.target_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.target')
@DocsEditable()
set target(String value) => _blink.BlinkHTMLAreaElement.instance.target_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.hash')
@DocsEditable()
String get hash => _blink.BlinkHTMLAreaElement.instance.hash_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.hash')
@DocsEditable()
set hash(String value) => _blink.BlinkHTMLAreaElement.instance.hash_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.host')
@DocsEditable()
String get host => _blink.BlinkHTMLAreaElement.instance.host_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.host')
@DocsEditable()
set host(String value) => _blink.BlinkHTMLAreaElement.instance.host_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.hostname')
@DocsEditable()
String get hostname => _blink.BlinkHTMLAreaElement.instance.hostname_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.hostname')
@DocsEditable()
set hostname(String value) => _blink.BlinkHTMLAreaElement.instance.hostname_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.href')
@DocsEditable()
String get href => _blink.BlinkHTMLAreaElement.instance.href_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.href')
@DocsEditable()
set href(String value) => _blink.BlinkHTMLAreaElement.instance.href_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.origin')
@DocsEditable()
@Experimental() // untriaged
String get origin => _blink.BlinkHTMLAreaElement.instance.origin_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.password')
@DocsEditable()
@Experimental() // untriaged
String get password => _blink.BlinkHTMLAreaElement.instance.password_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.password')
@DocsEditable()
@Experimental() // untriaged
set password(String value) => _blink.BlinkHTMLAreaElement.instance.password_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.pathname')
@DocsEditable()
String get pathname => _blink.BlinkHTMLAreaElement.instance.pathname_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.pathname')
@DocsEditable()
set pathname(String value) => _blink.BlinkHTMLAreaElement.instance.pathname_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.port')
@DocsEditable()
String get port => _blink.BlinkHTMLAreaElement.instance.port_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.port')
@DocsEditable()
set port(String value) => _blink.BlinkHTMLAreaElement.instance.port_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.protocol')
@DocsEditable()
String get protocol => _blink.BlinkHTMLAreaElement.instance.protocol_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.protocol')
@DocsEditable()
set protocol(String value) => _blink.BlinkHTMLAreaElement.instance.protocol_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.search')
@DocsEditable()
String get search => _blink.BlinkHTMLAreaElement.instance.search_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.search')
@DocsEditable()
set search(String value) => _blink.BlinkHTMLAreaElement.instance.search_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.username')
@DocsEditable()
@Experimental() // untriaged
String get username => _blink.BlinkHTMLAreaElement.instance.username_Getter_(unwrap_jso(this));
@DomName('HTMLAreaElement.username')
@DocsEditable()
@Experimental() // untriaged
set username(String value) => _blink.BlinkHTMLAreaElement.instance.username_Setter_(unwrap_jso(this), value);
@DomName('HTMLAreaElement.toString')
@DocsEditable()
@Experimental() // untriaged
String toString() => _blink.BlinkHTMLAreaElement.instance.toString_Callback_0_(unwrap_jso(this));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@DocsEditable()
@DomName('HTMLAudioElement')
class AudioElement extends MediaElement {
@DomName('HTMLAudioElement.HTMLAudioElement')
@DocsEditable()
factory AudioElement._([String src]) {
return wrap_jso(_blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src));
}
static AudioElement internalCreateAudioElement() {
return new AudioElement._internalWrap();
}
factory AudioElement._internalWrap() {
return new AudioElement.internal_();
}
AudioElement.internal_() : super.internal_();
/**
* Constructor instantiated by the DOM when a custom element has been created.
*
* This can only be called by subclasses from their created constructor.
*/
AudioElement.created() : super.created();
factory AudioElement([String src]) {
if (src == null)
return wrap_jso(_blink.BlinkHTMLAudioElement.instance.constructorCallback_0_());
else
return wrap_jso(_blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src));
}
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('AudioTrack')
@Experimental() // untriaged
class AudioTrack extends DartHtmlDomObject {
// To suppress missing implicit constructor warnings.
factory AudioTrack._() { throw new UnsupportedError("Not supported"); }
static AudioTrack internalCreateAudioTrack() {
return new AudioTrack._internalWrap();
}
factory AudioTrack._internalWrap() {
return new AudioTrack.internal_();
}
AudioTrack.internal_() { }
bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
int get hashCode => unwrap_jso(this).hashCode;
@DomName('AudioTrack.enabled')
@DocsEditable()
@Experimental() // untriaged
bool get enabled => _blink.BlinkAudioTrack.instance.enabled_Getter_(unwrap_jso(this));
@DomName('AudioTrack.enabled')
@DocsEditable()
@Experimental() // untriaged
set enabled(bool value) => _blink.BlinkAudioTrack.instance.enabled_Setter_(unwrap_jso(this), value);
@DomName('AudioTrack.id')
@DocsEditable()
@Experimental() // untriaged
String get id => _blink.BlinkAudioTrack.instance.id_Getter_(unwrap_jso(this));
@DomName('AudioTrack.kind')
@DocsEditable()
@Experimental() // untriaged
String get kind => _blink.BlinkAudioTrack.instance.kind_Getter_(unwrap_jso(this));
@DomName('AudioTrack.label')
@DocsEditable()
@Experimental() // untriaged
String get label => _blink.BlinkAudioTrack.instance.label_Getter_(unwrap_jso(this));
@DomName('AudioTrack.language')
@DocsEditable()
@Experimental() // untriaged
String get language => _blink.BlinkAudioTrack.instance.language_Getter_(unwrap_jso(this));
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('AudioTrackList')
@Experimental() // untriaged
class AudioTrackList extends EventTarget {
// To suppress missing implicit constructor warnings.
factory AudioTrackList._() { throw new UnsupportedError("Not supported"); }
@DomName('AudioTrackList.changeEvent')
@DocsEditable()
@Experimental() // untriaged
static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
static AudioTrackList internalCreateAudioTrackList() {
return new AudioTrackList._internalWrap();
}
factory AudioTrackList._internalWrap() {
return new AudioTrackList.internal_();
}
AudioTrackList.internal_() : super.internal_();
@DomName('AudioTrackList.length')
@DocsEditable()
@Experimental() // untriaged
int get length => _blink.BlinkAudioTrackList.instance.length_Getter_(unwrap_jso(this));
@DomName('AudioTrackList.__getter__')
@DocsEditable()
@Experimental() // untriaged
AudioTrack __getter__(int index) => wrap_jso(_blink.BlinkAudioTrackList.instance.$__getter___Callback_1_(unwrap_jso(this), index));
@DomName('AudioTrackList.getTrackById')
@DocsEditable()
@Experimental() // untriaged
AudioTrack getTrackById(String id) => wrap_jso(_blink.BlinkAudioTrackList.instance.getTrackById_Callback_1_(unwrap_jso(this), id));
@DomName('AudioTrackList.onchange')
@DocsEditable()
@Experimental() // untriaged
Stream<Event> get onChange => changeEvent.forTarget(this);
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
@DocsEditable()
@DomName('AutocompleteErrorEvent')
// http://wiki.whatwg.org/wiki/RequestAutocomplete
@Experimental()