blob: 69073dd77143e64bd6d6856d7d74a4f8b6529540 [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, deprecated;
import 'dart:html_common';
import 'dart:indexed_db';
import 'dart:indexed_db' show indexed_dbBlinkMap;
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_sql';
import 'dart:svg' as svg;
import 'dart:svg' show svgBlinkMap;
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:_blink' as _blink;
// 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 = _Utils.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.JsObject,
'JsFunction': () => js.JsFunction,
'JsArray': () => js.JsArray,
'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;
}
// 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 NativeFieldWrapperClass2 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;
}
/**
* 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_(this);
@DomName('HTMLAnchorElement.download')
@DocsEditable()
void set download(String value) => _blink.BlinkHTMLAnchorElement.instance.download_Setter_(this, value);
@DomName('HTMLAnchorElement.hreflang')
@DocsEditable()
String get hreflang => _blink.BlinkHTMLAnchorElement.instance.hreflang_Getter_(this);
@DomName('HTMLAnchorElement.hreflang')
@DocsEditable()
void set hreflang(String value) => _blink.BlinkHTMLAnchorElement.instance.hreflang_Setter_(this, value);
@DomName('HTMLAnchorElement.integrity')
@DocsEditable()
@Experimental() // untriaged
String get integrity => _blink.BlinkHTMLAnchorElement.instance.integrity_Getter_(this);
@DomName('HTMLAnchorElement.integrity')
@DocsEditable()
@Experimental() // untriaged
void set integrity(String value) => _blink.BlinkHTMLAnchorElement.instance.integrity_Setter_(this, value);
@DomName('HTMLAnchorElement.rel')
@DocsEditable()
String get rel => _blink.BlinkHTMLAnchorElement.instance.rel_Getter_(this);
@DomName('HTMLAnchorElement.rel')
@DocsEditable()
void set rel(String value) => _blink.BlinkHTMLAnchorElement.instance.rel_Setter_(this, value);
@DomName('HTMLAnchorElement.target')
@DocsEditable()
String get target => _blink.BlinkHTMLAnchorElement.instance.target_Getter_(this);
@DomName('HTMLAnchorElement.target')
@DocsEditable()
void set target(String value) => _blink.BlinkHTMLAnchorElement.instance.target_Setter_(this, value);
@DomName('HTMLAnchorElement.type')
@DocsEditable()
String get type => _blink.BlinkHTMLAnchorElement.instance.type_Getter_(this);
@DomName('HTMLAnchorElement.type')
@DocsEditable()
void set type(String value) => _blink.BlinkHTMLAnchorElement.instance.type_Setter_(this, value);
@DomName('HTMLAnchorElement.hash')
@DocsEditable()
String get hash => _blink.BlinkHTMLAnchorElement.instance.hash_Getter_(this);
@DomName('HTMLAnchorElement.hash')
@DocsEditable()
void set hash(String value) => _blink.BlinkHTMLAnchorElement.instance.hash_Setter_(this, value);
@DomName('HTMLAnchorElement.host')
@DocsEditable()
String get host => _blink.BlinkHTMLAnchorElement.instance.host_Getter_(this);
@DomName('HTMLAnchorElement.host')
@DocsEditable()
void set host(String value) => _blink.BlinkHTMLAnchorElement.instance.host_Setter_(this, value);
@DomName('HTMLAnchorElement.hostname')
@DocsEditable()
String get hostname => _blink.BlinkHTMLAnchorElement.instance.hostname_Getter_(this);
@DomName('HTMLAnchorElement.hostname')
@DocsEditable()
void set hostname(String value) => _blink.BlinkHTMLAnchorElement.instance.hostname_Setter_(this, value);
@DomName('HTMLAnchorElement.href')
@DocsEditable()
String get href => _blink.BlinkHTMLAnchorElement.instance.href_Getter_(this);
@DomName('HTMLAnchorElement.href')
@DocsEditable()
void set href(String value) => _blink.BlinkHTMLAnchorElement.instance.href_Setter_(this, value);
@DomName('HTMLAnchorElement.origin')
@DocsEditable()
// WebKit only
@Experimental() // non-standard
String get origin => _blink.BlinkHTMLAnchorElement.instance.origin_Getter_(this);
@DomName('HTMLAnchorElement.password')
@DocsEditable()
@Experimental() // untriaged
String get password => _blink.BlinkHTMLAnchorElement.instance.password_Getter_(this);
@DomName('HTMLAnchorElement.password')
@DocsEditable()
@Experimental() // untriaged
void set password(String value) => _blink.BlinkHTMLAnchorElement.instance.password_Setter_(this, value);
@DomName('HTMLAnchorElement.pathname')
@DocsEditable()
String get pathname => _blink.BlinkHTMLAnchorElement.instance.pathname_Getter_(this);
@DomName('HTMLAnchorElement.pathname')
@DocsEditable()
void set pathname(String value) => _blink.BlinkHTMLAnchorElement.instance.pathname_Setter_(this, value);
@DomName('HTMLAnchorElement.port')
@DocsEditable()
String get port => _blink.BlinkHTMLAnchorElement.instance.port_Getter_(this);
@DomName('HTMLAnchorElement.port')
@DocsEditable()
void set port(String value) => _blink.BlinkHTMLAnchorElement.instance.port_Setter_(this, value);
@DomName('HTMLAnchorElement.protocol')
@DocsEditable()
String get protocol => _blink.BlinkHTMLAnchorElement.instance.protocol_Getter_(this);
@DomName('HTMLAnchorElement.protocol')
@DocsEditable()
void set protocol(String value) => _blink.BlinkHTMLAnchorElement.instance.protocol_Setter_(this, value);
@DomName('HTMLAnchorElement.search')
@DocsEditable()
String get search => _blink.BlinkHTMLAnchorElement.instance.search_Getter_(this);
@DomName('HTMLAnchorElement.search')
@DocsEditable()
void set search(String value) => _blink.BlinkHTMLAnchorElement.instance.search_Setter_(this, value);
@DomName('HTMLAnchorElement.username')
@DocsEditable()
@Experimental() // untriaged
String get username => _blink.BlinkHTMLAnchorElement.instance.username_Getter_(this);
@DomName('HTMLAnchorElement.username')
@DocsEditable()
@Experimental() // untriaged
void set username(String value) => _blink.BlinkHTMLAnchorElement.instance.username_Setter_(this, value);
@DomName('HTMLAnchorElement.toString')
@DocsEditable()
String toString() => _blink.BlinkHTMLAnchorElement.instance.toString_Callback_0_(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 _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 _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)) {
return _blink.BlinkAnimation.instance.constructorCallback_3_(target, keyframes, timingInput);
}
throw new ArgumentError("Incorrect number or type of arguments");
}
}
// 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 NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory AnimationEffect._() { throw new UnsupportedError("Not supported"); }
}
// 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"); }
@DomName('WebKitAnimationEvent.animationName')
@DocsEditable()
String get animationName => _blink.BlinkWebKitAnimationEvent.instance.animationName_Getter_(this);
@DomName('WebKitAnimationEvent.elapsedTime')
@DocsEditable()
double get elapsedTime => _blink.BlinkWebKitAnimationEvent.instance.elapsedTime_Getter_(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 NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory AnimationNode._() { throw new UnsupportedError("Not supported"); }
@DomName('AnimationNode.activeDuration')
@DocsEditable()
@Experimental() // untriaged
double get activeDuration => _blink.BlinkAnimationNode.instance.activeDuration_Getter_(this);
@DomName('AnimationNode.currentIteration')
@DocsEditable()
@Experimental() // untriaged
int get currentIteration => _blink.BlinkAnimationNode.instance.currentIteration_Getter_(this);
@DomName('AnimationNode.duration')
@DocsEditable()
@Experimental() // untriaged
double get duration => _blink.BlinkAnimationNode.instance.duration_Getter_(this);
@DomName('AnimationNode.endTime')
@DocsEditable()
@Experimental() // untriaged
double get endTime => _blink.BlinkAnimationNode.instance.endTime_Getter_(this);
@DomName('AnimationNode.localTime')
@DocsEditable()
@Experimental() // untriaged
double get localTime => _blink.BlinkAnimationNode.instance.localTime_Getter_(this);
@DomName('AnimationNode.player')
@DocsEditable()
@Experimental() // untriaged
AnimationPlayer get player => _blink.BlinkAnimationNode.instance.player_Getter_(this);
@DomName('AnimationNode.startTime')
@DocsEditable()
@Experimental() // untriaged
double get startTime => _blink.BlinkAnimationNode.instance.startTime_Getter_(this);
@DomName('AnimationNode.timing')
@DocsEditable()
@Experimental() // untriaged
Timing get timing => _blink.BlinkAnimationNode.instance.timing_Getter_(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"); }
/// 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_(this);
@DomName('AnimationPlayer.currentTime')
@DocsEditable()
@Experimental() // untriaged
void set currentTime(num value) => _blink.BlinkAnimationPlayer.instance.currentTime_Setter_(this, value);
@DomName('AnimationPlayer.playState')
@DocsEditable()
@Experimental() // untriaged
String get playState => _blink.BlinkAnimationPlayer.instance.playState_Getter_(this);
@DomName('AnimationPlayer.playbackRate')
@DocsEditable()
@Experimental() // untriaged
num get playbackRate => _blink.BlinkAnimationPlayer.instance.playbackRate_Getter_(this);
@DomName('AnimationPlayer.playbackRate')
@DocsEditable()
@Experimental() // untriaged
void set playbackRate(num value) => _blink.BlinkAnimationPlayer.instance.playbackRate_Setter_(this, value);
@DomName('AnimationPlayer.source')
@DocsEditable()
@Experimental() // untriaged
AnimationNode get source => _blink.BlinkAnimationPlayer.instance.source_Getter_(this);
@DomName('AnimationPlayer.source')
@DocsEditable()
@Experimental() // untriaged
void set source(AnimationNode value) => _blink.BlinkAnimationPlayer.instance.source_Setter_(this, value);
@DomName('AnimationPlayer.startTime')
@DocsEditable()
@Experimental() // untriaged
num get startTime => _blink.BlinkAnimationPlayer.instance.startTime_Getter_(this);
@DomName('AnimationPlayer.startTime')
@DocsEditable()
@Experimental() // untriaged
void set startTime(num value) => _blink.BlinkAnimationPlayer.instance.startTime_Setter_(this, value);
@DomName('AnimationPlayer.cancel')
@DocsEditable()
@Experimental() // untriaged
void cancel() => _blink.BlinkAnimationPlayer.instance.cancel_Callback_0_(this);
@DomName('AnimationPlayer.finish')
@DocsEditable()
@Experimental() // untriaged
void finish() => _blink.BlinkAnimationPlayer.instance.finish_Callback_0_(this);
@DomName('AnimationPlayer.pause')
@DocsEditable()
@Experimental() // untriaged
void pause() => _blink.BlinkAnimationPlayer.instance.pause_Callback_0_(this);
@DomName('AnimationPlayer.play')
@DocsEditable()
@Experimental() // untriaged
void play() => _blink.BlinkAnimationPlayer.instance.play_Callback_0_(this);
@DomName('AnimationPlayer.reverse')
@DocsEditable()
@Experimental() // untriaged
void reverse() => _blink.BlinkAnimationPlayer.instance.reverse_Callback_0_(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"); }
@DomName('AnimationPlayerEvent.currentTime')
@DocsEditable()
@Experimental() // untriaged
double get currentTime => _blink.BlinkAnimationPlayerEvent.instance.currentTime_Getter_(this);
@DomName('AnimationPlayerEvent.timelineTime')
@DocsEditable()
@Experimental() // untriaged
double get timelineTime => _blink.BlinkAnimationPlayerEvent.instance.timelineTime_Getter_(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 NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory AnimationTimeline._() { throw new UnsupportedError("Not supported"); }
@DomName('AnimationTimeline.currentTime')
@DocsEditable()
@Experimental() // untriaged
double get currentTime => _blink.BlinkAnimationTimeline.instance.currentTime_Getter_(this);
@DomName('AnimationTimeline.getAnimationPlayers')
@DocsEditable()
@Experimental() // untriaged
List<AnimationPlayer> getAnimationPlayers() => _blink.BlinkAnimationTimeline.instance.getAnimationPlayers_Callback_0_(this);
@DomName('AnimationTimeline.play')
@DocsEditable()
@Experimental() // untriaged
AnimationPlayer play(AnimationNode source) => _blink.BlinkAnimationTimeline.instance.play_Callback_1_(this, 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');
/// 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_(this);
@DomName('ApplicationCache.abort')
@DocsEditable()
void abort() => _blink.BlinkApplicationCache.instance.abort_Callback_0_(this);
@DomName('ApplicationCache.swapCache')
@DocsEditable()
void swapCache() => _blink.BlinkApplicationCache.instance.swapCache_Callback_0_(this);
@DomName('ApplicationCache.update')
@DocsEditable()
void update() => _blink.BlinkApplicationCache.instance.update_Callback_0_(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"); }
@DomName('ApplicationCacheErrorEvent.message')
@DocsEditable()
@Experimental() // untriaged
String get message => _blink.BlinkApplicationCacheErrorEvent.instance.message_Getter_(this);
@DomName('ApplicationCacheErrorEvent.reason')
@DocsEditable()
@Experimental() // untriaged
String get reason => _blink.BlinkApplicationCacheErrorEvent.instance.reason_Getter_(this);
@DomName('ApplicationCacheErrorEvent.status')
@DocsEditable()
@Experimental() // untriaged
int get status => _blink.BlinkApplicationCacheErrorEvent.instance.status_Getter_(this);
@DomName('ApplicationCacheErrorEvent.url')
@DocsEditable()
@Experimental() // untriaged
String get url => _blink.BlinkApplicationCacheErrorEvent.instance.url_Getter_(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");
/**
* 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_(this);
@DomName('HTMLAreaElement.alt')
@DocsEditable()
void set alt(String value) => _blink.BlinkHTMLAreaElement.instance.alt_Setter_(this, value);
@DomName('HTMLAreaElement.coords')
@DocsEditable()
String get coords => _blink.BlinkHTMLAreaElement.instance.coords_Getter_(this);
@DomName('HTMLAreaElement.coords')
@DocsEditable()
void set coords(String value) => _blink.BlinkHTMLAreaElement.instance.coords_Setter_(this, value);
@DomName('HTMLAreaElement.shape')
@DocsEditable()
String get shape => _blink.BlinkHTMLAreaElement.instance.shape_Getter_(this);
@DomName('HTMLAreaElement.shape')
@DocsEditable()
void set shape(String value) => _blink.BlinkHTMLAreaElement.instance.shape_Setter_(this, value);
@DomName('HTMLAreaElement.target')
@DocsEditable()
String get target => _blink.BlinkHTMLAreaElement.instance.target_Getter_(this);
@DomName('HTMLAreaElement.target')
@DocsEditable()
void set target(String value) => _blink.BlinkHTMLAreaElement.instance.target_Setter_(this, value);
@DomName('HTMLAreaElement.hash')
@DocsEditable()
String get hash => _blink.BlinkHTMLAreaElement.instance.hash_Getter_(this);
@DomName('HTMLAreaElement.hash')
@DocsEditable()
void set hash(String value) => _blink.BlinkHTMLAreaElement.instance.hash_Setter_(this, value);
@DomName('HTMLAreaElement.host')
@DocsEditable()
String get host => _blink.BlinkHTMLAreaElement.instance.host_Getter_(this);
@DomName('HTMLAreaElement.host')
@DocsEditable()
void set host(String value) => _blink.BlinkHTMLAreaElement.instance.host_Setter_(this, value);
@DomName('HTMLAreaElement.hostname')
@DocsEditable()
String get hostname => _blink.BlinkHTMLAreaElement.instance.hostname_Getter_(this);
@DomName('HTMLAreaElement.hostname')
@DocsEditable()
void set hostname(String value) => _blink.BlinkHTMLAreaElement.instance.hostname_Setter_(this, value);
@DomName('HTMLAreaElement.href')
@DocsEditable()
String get href => _blink.BlinkHTMLAreaElement.instance.href_Getter_(this);
@DomName('HTMLAreaElement.href')
@DocsEditable()
void set href(String value) => _blink.BlinkHTMLAreaElement.instance.href_Setter_(this, value);
@DomName('HTMLAreaElement.origin')
@DocsEditable()
@Experimental() // untriaged
String get origin => _blink.BlinkHTMLAreaElement.instance.origin_Getter_(this);
@DomName('HTMLAreaElement.password')
@DocsEditable()
@Experimental() // untriaged
String get password => _blink.BlinkHTMLAreaElement.instance.password_Getter_(this);
@DomName('HTMLAreaElement.password')
@DocsEditable()
@Experimental() // untriaged
void set password(String value) => _blink.BlinkHTMLAreaElement.instance.password_Setter_(this, value);
@DomName('HTMLAreaElement.pathname')
@DocsEditable()
String get pathname => _blink.BlinkHTMLAreaElement.instance.pathname_Getter_(this);
@DomName('HTMLAreaElement.pathname')
@DocsEditable()
void set pathname(String value) => _blink.BlinkHTMLAreaElement.instance.pathname_Setter_(this, value);
@DomName('HTMLAreaElement.port')
@DocsEditable()
String get port => _blink.BlinkHTMLAreaElement.instance.port_Getter_(this);
@DomName('HTMLAreaElement.port')
@DocsEditable()
void set port(String value) => _blink.BlinkHTMLAreaElement.instance.port_Setter_(this, value);
@DomName('HTMLAreaElement.protocol')
@DocsEditable()
String get protocol => _blink.BlinkHTMLAreaElement.instance.protocol_Getter_(this);
@DomName('HTMLAreaElement.protocol')
@DocsEditable()
void set protocol(String value) => _blink.BlinkHTMLAreaElement.instance.protocol_Setter_(this, value);
@DomName('HTMLAreaElement.search')
@DocsEditable()
String get search => _blink.BlinkHTMLAreaElement.instance.search_Getter_(this);
@DomName('HTMLAreaElement.search')
@DocsEditable()
void set search(String value) => _blink.BlinkHTMLAreaElement.instance.search_Setter_(this, value);
@DomName('HTMLAreaElement.username')
@DocsEditable()
@Experimental() // untriaged
String get username => _blink.BlinkHTMLAreaElement.instance.username_Getter_(this);
@DomName('HTMLAreaElement.username')
@DocsEditable()
@Experimental() // untriaged
void set username(String value) => _blink.BlinkHTMLAreaElement.instance.username_Setter_(this, value);
@DomName('HTMLAreaElement.toString')
@DocsEditable()
@Experimental() // untriaged
String toString() => _blink.BlinkHTMLAreaElement.instance.toString_Callback_0_(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('HTMLAudioElement')
class AudioElement extends MediaElement {
// To suppress missing implicit constructor warnings.
factory AudioElement._() { throw new UnsupportedError("Not supported"); }
@DomName('HTMLAudioElement.HTMLAudioElement')
@DocsEditable()
factory AudioElement([String src]) {
return _blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src);
}
/**
* 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();
}
// 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 NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory AudioTrack._() { throw new UnsupportedError("Not supported"); }
@DomName('AudioTrack.enabled')
@DocsEditable()
@Experimental() // untriaged
bool get enabled => _blink.BlinkAudioTrack.instance.enabled_Getter_(this);
@DomName('AudioTrack.enabled')
@DocsEditable()
@Experimental() // untriaged
void set enabled(bool value) => _blink.BlinkAudioTrack.instance.enabled_Setter_(this, value);
@DomName('AudioTrack.id')
@DocsEditable()
@Experimental() // untriaged
String get id => _blink.BlinkAudioTrack.instance.id_Getter_(this);
@DomName('AudioTrack.kind')
@DocsEditable()
@Experimental() // untriaged
String get kind => _blink.BlinkAudioTrack.instance.kind_Getter_(this);
@DomName('AudioTrack.label')
@DocsEditable()
@Experimental() // untriaged
String get label => _blink.BlinkAudioTrack.instance.label_Getter_(this);
@DomName('AudioTrack.language')
@DocsEditable()
@Experimental() // untriaged
String get language => _blink.BlinkAudioTrack.instance.language_Getter_(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');
@DomName('AudioTrackList.length')
@DocsEditable()
@Experimental() // untriaged
int get length => _blink.BlinkAudioTrackList.instance.length_Getter_(this);
@DomName('AudioTrackList.__getter__')
@DocsEditable()
@Experimental() // untriaged
AudioTrack __getter__(int index) => _blink.BlinkAudioTrackList.instance.$__getter___Callback_1_(this, index);
@DomName('AudioTrackList.getTrackById')
@DocsEditable()
@Experimental() // untriaged
AudioTrack getTrackById(String id) => _blink.BlinkAudioTrackList.instance.getTrackById_Callback_1_(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()
class AutocompleteErrorEvent extends Event {
// To suppress missing implicit constructor warnings.
factory AutocompleteErrorEvent._() { throw new UnsupportedError("Not supported"); }
@DomName('AutocompleteErrorEvent.reason')
@DocsEditable()
String get reason => _blink.BlinkAutocompleteErrorEvent.instance.reason_Getter_(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('HTMLBRElement')
class BRElement extends HtmlElement {
// To suppress missing implicit constructor warnings.
factory BRElement._() { throw new UnsupportedError("Not supported"); }
@DomName('HTMLBRElement.HTMLBRElement')
@DocsEditable()
factory BRElement() => document.createElement("br");
/**
* Constructor instantiated by the DOM when a custom element has been created.
*
* This can only be called by subclasses from their created constructor.
*/
BRElement.created() : super.created();
}
// 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('BarProp')
// http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#barprop
@deprecated // standard
class BarProp extends NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory BarProp._() { throw new UnsupportedError("Not supported"); }
@DomName('BarProp.visible')
@DocsEditable()
bool get visible => _blink.BlinkBarProp.instance.visible_Getter_(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('HTMLBaseElement')
class BaseElement extends HtmlElement {
// To suppress missing implicit constructor warnings.
factory BaseElement._() { throw new UnsupportedError("Not supported"); }
@DomName('HTMLBaseElement.HTMLBaseElement')
@DocsEditable()
factory BaseElement() => document.createElement("base");
/**
* Constructor instantiated by the DOM when a custom element has been created.
*
* This can only be called by subclasses from their created constructor.
*/
BaseElement.created() : super.created();
@DomName('HTMLBaseElement.href')
@DocsEditable()
String get href => _blink.BlinkHTMLBaseElement.instance.href_Getter_(this);
@DomName('HTMLBaseElement.href')
@DocsEditable()
void set href(String value) => _blink.BlinkHTMLBaseElement.instance.href_Setter_(this, value);
@DomName('HTMLBaseElement.target')
@DocsEditable()
String get target => _blink.BlinkHTMLBaseElement.instance.target_Getter_(this);
@DomName('HTMLBaseElement.target')
@DocsEditable()
void set target(String value) => _blink.BlinkHTMLBaseElement.instance.target_Setter_(this, value);
}
// 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('BatteryManager')
// https://dvcs.w3.org/hg/dap/raw-file/default/battery/Overview.html#batterymanager-interface
@Experimental() // stable
class BatteryManager extends EventTarget {
// To suppress missing implicit constructor warnings.
factory BatteryManager._() { throw new UnsupportedError("Not supported"); }
@DomName('BatteryManager.charging')
@DocsEditable()
bool get charging => _blink.BlinkBatteryManager.instance.charging_Getter_(this);
@DomName('BatteryManager.chargingTime')
@DocsEditable()
double get chargingTime => _blink.BlinkBatteryManager.instance.chargingTime_Getter_(this);
@DomName('BatteryManager.dischargingTime')
@DocsEditable()
double get dischargingTime => _blink.BlinkBatteryManager.instance.dischargingTime_Getter_(this);
@DomName('BatteryManager.level')
@DocsEditable()
double get level => _blink.BlinkBatteryManager.instance.level_Getter_(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('BeforeUnloadEvent')
class BeforeUnloadEvent extends Event {
// To suppress missing implicit constructor warnings.
factory BeforeUnloadEvent._() { throw new UnsupportedError("Not supported"); }
@DomName('BeforeUnloadEvent.returnValue')
@DocsEditable()
String get returnValue => _blink.BlinkBeforeUnloadEvent.instance.returnValue_Getter_(this);
@DomName('BeforeUnloadEvent.returnValue')
@DocsEditable()
void set returnValue(String value) => _blink.BlinkBeforeUnloadEvent.instance.returnValue_Setter_(this, value);
}
// 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.
@DomName('Blob')
class Blob extends NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory Blob._() { throw new UnsupportedError("Not supported"); }
@DomName('Blob.Blob')
@DocsEditable()
factory Blob(List blobParts, [String type, String endings]) => _create(blobParts, type, endings);
@DocsEditable()
static Blob _create(blobParts, type, endings) => _blink.BlinkBlob.instance.constructorCallback_3_(blobParts, type, endings);
@DomName('Blob.size')
@DocsEditable()
int get size => _blink.BlinkBlob.instance.size_Getter_(this);
@DomName('Blob.type')
@DocsEditable()
String get type => _blink.BlinkBlob.instance.type_Getter_(this);
@DomName('Blob.close')
@DocsEditable()
@Experimental() // untriaged
void close() => _blink.BlinkBlob.instance.close_Callback_0_(this);
Blob slice([int start, int end, String contentType]) {
if (contentType != null) {
return _blink.BlinkBlob.instance.slice_Callback_3_(this, start, end, contentType);
}
if (end != null) {
return _blink.BlinkBlob.instance.slice_Callback_2_(this, start, end);
}
if (start != null) {
return _blink.BlinkBlob.instance.slice_Callback_1_(this, start);
}
return _blink.BlinkBlob.instance.slice_Callback_0_(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('Body')
@Experimental() // untriaged
class Body extends NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory Body._() { throw new UnsupportedError("Not supported"); }
@DomName('Body.bodyUsed')
@DocsEditable()
@Experimental() // untriaged
bool get bodyUsed => _blink.BlinkBody.instance.bodyUsed_Getter_(this);
@DomName('Body.arrayBuffer')
@DocsEditable()
@Experimental() // untriaged
Future arrayBuffer() => _blink.BlinkBody.instance.arrayBuffer_Callback_0_(this);
@DomName('Body.blob')
@DocsEditable()
@Experimental() // untriaged
Future blob() => _blink.BlinkBody.instance.blob_Callback_0_(this);
@DomName('Body.json')
@DocsEditable()
@Experimental() // untriaged
Future json() => _blink.BlinkBody.instance.json_Callback_0_(this);
@DomName('Body.text')
@DocsEditable()
@Experimental() // untriaged
Future text() => _blink.BlinkBody.instance.text_Callback_0_(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('HTMLBodyElement')
class BodyElement extends HtmlElement implements WindowEventHandlers {
// To suppress missing implicit constructor warnings.
factory BodyElement._() { throw new UnsupportedError("Not supported"); }
/**
* Static factory designed to expose `blur` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.blurEvent')
@DocsEditable()
static const EventStreamProvider<Event> blurEvent = const EventStreamProvider<Event>('blur');
/**
* Static factory designed to expose `error` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.errorEvent')
@DocsEditable()
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
/**
* Static factory designed to expose `focus` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.focusEvent')
@DocsEditable()
static const EventStreamProvider<Event> focusEvent = const EventStreamProvider<Event>('focus');
/**
* Static factory designed to expose `hashchange` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.hashchangeEvent')
@DocsEditable()
static const EventStreamProvider<Event> hashChangeEvent = const EventStreamProvider<Event>('hashchange');
/**
* Static factory designed to expose `load` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.loadEvent')
@DocsEditable()
static const EventStreamProvider<Event> loadEvent = const EventStreamProvider<Event>('load');
/**
* Static factory designed to expose `message` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.messageEvent')
@DocsEditable()
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
/**
* Static factory designed to expose `offline` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.offlineEvent')
@DocsEditable()
static const EventStreamProvider<Event> offlineEvent = const EventStreamProvider<Event>('offline');
/**
* Static factory designed to expose `online` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.onlineEvent')
@DocsEditable()
static const EventStreamProvider<Event> onlineEvent = const EventStreamProvider<Event>('online');
/**
* Static factory designed to expose `popstate` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.popstateEvent')
@DocsEditable()
static const EventStreamProvider<PopStateEvent> popStateEvent = const EventStreamProvider<PopStateEvent>('popstate');
/**
* Static factory designed to expose `resize` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.resizeEvent')
@DocsEditable()
static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
@DomName('HTMLBodyElement.scrollEvent')
@DocsEditable()
@Experimental() // untriaged
static const EventStreamProvider<Event> scrollEvent = const EventStreamProvider<Event>('scroll');
/**
* Static factory designed to expose `storage` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.storageEvent')
@DocsEditable()
static const EventStreamProvider<StorageEvent> storageEvent = const EventStreamProvider<StorageEvent>('storage');
/**
* Static factory designed to expose `unload` events to event
* handlers that are not necessarily instances of [BodyElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLBodyElement.unloadEvent')
@DocsEditable()
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
@DomName('HTMLBodyElement.HTMLBodyElement')
@DocsEditable()
factory BodyElement() => document.createElement("body");
/**
* Constructor instantiated by the DOM when a custom element has been created.
*
* This can only be called by subclasses from their created constructor.
*/
BodyElement.created() : super.created();
/// Stream of `blur` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onblur')
@DocsEditable()
ElementStream<Event> get onBlur => blurEvent.forElement(this);
/// Stream of `error` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onerror')
@DocsEditable()
ElementStream<Event> get onError => errorEvent.forElement(this);
/// Stream of `focus` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onfocus')
@DocsEditable()
ElementStream<Event> get onFocus => focusEvent.forElement(this);
/// Stream of `hashchange` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onhashchange')
@DocsEditable()
ElementStream<Event> get onHashChange => hashChangeEvent.forElement(this);
/// Stream of `load` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onload')
@DocsEditable()
ElementStream<Event> get onLoad => loadEvent.forElement(this);
/// Stream of `message` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onmessage')
@DocsEditable()
ElementStream<MessageEvent> get onMessage => messageEvent.forElement(this);
/// Stream of `offline` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onoffline')
@DocsEditable()
ElementStream<Event> get onOffline => offlineEvent.forElement(this);
/// Stream of `online` events handled by this [BodyElement].
@DomName('HTMLBodyElement.ononline')
@DocsEditable()
ElementStream<Event> get onOnline => onlineEvent.forElement(this);
/// Stream of `popstate` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onpopstate')
@DocsEditable()
ElementStream<PopStateEvent> get onPopState => popStateEvent.forElement(this);
/// Stream of `resize` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onresize')
@DocsEditable()
ElementStream<Event> get onResize => resizeEvent.forElement(this);
@DomName('HTMLBodyElement.onscroll')
@DocsEditable()
@Experimental() // untriaged
ElementStream<Event> get onScroll => scrollEvent.forElement(this);
/// Stream of `storage` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onstorage')
@DocsEditable()
ElementStream<StorageEvent> get onStorage => storageEvent.forElement(this);
/// Stream of `unload` events handled by this [BodyElement].
@DomName('HTMLBodyElement.onunload')
@DocsEditable()
ElementStream<Event> get onUnload => unloadEvent.forElement(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('HTMLButtonElement')
class ButtonElement extends HtmlElement {
// To suppress missing implicit constructor warnings.
factory ButtonElement._() { throw new UnsupportedError("Not supported"); }
@DomName('HTMLButtonElement.HTMLButtonElement')
@DocsEditable()
factory ButtonElement() => document.createElement("button");
/**
* Constructor instantiated by the DOM when a custom element has been created.
*
* This can only be called by subclasses from their created constructor.
*/
ButtonElement.created() : super.created();
@DomName('HTMLButtonElement.autofocus')
@DocsEditable()
bool get autofocus => _blink.BlinkHTMLButtonElement.instance.autofocus_Getter_(this);
@DomName('HTMLButtonElement.autofocus')
@DocsEditable()
void set autofocus(bool value) => _blink.BlinkHTMLButtonElement.instance.autofocus_Setter_(this, value);
@DomName('HTMLButtonElement.disabled')
@DocsEditable()
bool get disabled => _blink.BlinkHTMLButtonElement.instance.disabled_Getter_(this);
@DomName('HTMLButtonElement.disabled')
@DocsEditable()
void set disabled(bool value) => _blink.BlinkHTMLButtonElement.instance.disabled_Setter_(this, value);
@DomName('HTMLButtonElement.form')
@DocsEditable()
FormElement get form => _blink.BlinkHTMLButtonElement.instance.form_Getter_(this);
@DomName('HTMLButtonElement.formAction')
@DocsEditable()
String get formAction => _blink.BlinkHTMLButtonElement.instance.formAction_Getter_(this);
@DomName('HTMLButtonElement.formAction')
@DocsEditable()
void set formAction(String value) => _blink.BlinkHTMLButtonElement.instance.formAction_Setter_(this, value);
@DomName('HTMLButtonElement.formEnctype')
@DocsEditable()
String get formEnctype => _blink.BlinkHTMLButtonElement.instance.formEnctype_Getter_(this);
@DomName('HTMLButtonElement.formEnctype')
@DocsEditable()
void set formEnctype(String value) => _blink.BlinkHTMLButtonElement.instance.formEnctype_Setter_(this, value);
@DomName('HTMLButtonElement.formMethod')
@DocsEditable()
String get formMethod => _blink.BlinkHTMLButtonElement.instance.formMethod_Getter_(this);
@DomName('HTMLButtonElement.formMethod')
@DocsEditable()
void set formMethod(String value) => _blink.BlinkHTMLButtonElement.instance.formMethod_Setter_(this, value);
@DomName('HTMLButtonElement.formNoValidate')
@DocsEditable()
bool get formNoValidate => _blink.BlinkHTMLButtonElement.instance.formNoValidate_Getter_(this);
@DomName('HTMLButtonElement.formNoValidate')
@DocsEditable()
void set formNoValidate(bool value) => _blink.BlinkHTMLButtonElement.instance.formNoValidate_Setter_(this, value);
@DomName('HTMLButtonElement.formTarget')
@DocsEditable()
String get formTarget => _blink.BlinkHTMLButtonElement.instance.formTarget_Getter_(this);
@DomName('HTMLButtonElement.formTarget')
@DocsEditable()
void set formTarget(String value) => _blink.BlinkHTMLButtonElement.instance.formTarget_Setter_(this, value);
@DomName('HTMLButtonElement.labels')
@DocsEditable()
@Unstable()
List<Node> get labels => _blink.BlinkHTMLButtonElement.instance.labels_Getter_(this);
@DomName('HTMLButtonElement.name')
@DocsEditable()
String get name => _blink.BlinkHTMLButtonElement.instance.name_Getter_(this);
@DomName('HTMLButtonElement.name')
@DocsEditable()
void set name(String value) => _blink.BlinkHTMLButtonElement.instance.name_Setter_(this, value);
@DomName('HTMLButtonElement.type')
@DocsEditable()
String get type => _blink.BlinkHTMLButtonElement.instance.type_Getter_(this);
@DomName('HTMLButtonElement.type')
@DocsEditable()
void set type(String value) => _blink.BlinkHTMLButtonElement.instance.type_Setter_(this, value);
@DomName('HTMLButtonElement.validationMessage')
@DocsEditable()
String get validationMessage => _blink.BlinkHTMLButtonElement.instance.validationMessage_Getter_(this);
@DomName('HTMLButtonElement.validity')
@DocsEditable()
ValidityState get validity => _blink.BlinkHTMLButtonElement.instance.validity_Getter_(this);
@DomName('HTMLButtonElement.value')
@DocsEditable()
String get value => _blink.BlinkHTMLButtonElement.instance.value_Getter_(this);
@DomName('HTMLButtonElement.value')
@DocsEditable()
void set value(String value) => _blink.BlinkHTMLButtonElement.instance.value_Setter_(this, value);
@DomName('HTMLButtonElement.willValidate')
@DocsEditable()
bool get willValidate => _blink.BlinkHTMLButtonElement.instance.willValidate_Getter_(this);
@DomName('HTMLButtonElement.checkValidity')
@DocsEditable()
bool checkValidity() => _blink.BlinkHTMLButtonElement.instance.checkValidity_Callback_0_(this);
@DomName('HTMLButtonElement.setCustomValidity')
@DocsEditable()
void setCustomValidity(String error) => _blink.BlinkHTMLButtonElement.instance.setCustomValidity_Callback_1_(this, error);
}
// 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('CDATASection')
// http://dom.spec.whatwg.org/#cdatasection
@deprecated // deprecated
class CDataSection extends Text {
// To suppress missing implicit constructor warnings.
factory CDataSection._() { throw new UnsupportedError("Not supported"); }
}
// 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('CacheStorage')
@Experimental() // untriaged
class CacheStorage extends NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory CacheStorage._() { throw new UnsupportedError("Not supported"); }
@DomName('CacheStorage.create')
@DocsEditable()
@Experimental() // untriaged
Future create(String cacheName) => _blink.BlinkCacheStorage.instance.create_Callback_1_(this, cacheName);
@DomName('CacheStorage.delete')
@DocsEditable()
@Experimental() // untriaged
Future delete(String cacheName) => _blink.BlinkCacheStorage.instance.delete_Callback_1_(this, cacheName);
@DomName('CacheStorage.get')
@DocsEditable()
@Experimental() // untriaged
Future get(String cacheName) => _blink.BlinkCacheStorage.instance.get_Callback_1_(this, cacheName);
@DomName('CacheStorage.has')
@DocsEditable()
@Experimental() // untriaged
Future has(String cacheName) => _blink.BlinkCacheStorage.instance.has_Callback_1_(this, cacheName);
@DomName('CacheStorage.keys')
@DocsEditable()
@Experimental() // untriaged
Future keys() => _blink.BlinkCacheStorage.instance.keys_Callback_0_(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('Canvas2DContextAttributes')
// http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL
@Experimental()
class Canvas2DContextAttributes extends NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory Canvas2DContextAttributes._() { throw new UnsupportedError("Not supported"); }
@DomName('Canvas2DContextAttributes.alpha')
@DocsEditable()
bool get alpha => _blink.BlinkCanvas2DContextAttributes.instance.alpha_Getter_(this);
@DomName('Canvas2DContextAttributes.alpha')
@DocsEditable()
void set alpha(bool value) => _blink.BlinkCanvas2DContextAttributes.instance.alpha_Setter_(this, value);
@DomName('Canvas2DContextAttributes.storage')
@DocsEditable()
@Experimental() // untriaged
String get storage => _blink.BlinkCanvas2DContextAttributes.instance.storage_Getter_(this);
@DomName('Canvas2DContextAttributes.storage')
@DocsEditable()
@Experimental() // untriaged
void set storage(String value) => _blink.BlinkCanvas2DContextAttributes.instance.storage_Setter_(this, value);
}
// 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.
@DomName('HTMLCanvasElement')
class CanvasElement extends HtmlElement implements CanvasImageSource {
// To suppress missing implicit constructor warnings.
factory CanvasElement._() { throw new UnsupportedError("Not supported"); }
/**
* Static factory designed to expose `webglcontextlost` events to event
* handlers that are not necessarily instances of [CanvasElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLCanvasElement.webglcontextlostEvent')
@DocsEditable()
static const EventStreamProvider<gl.ContextEvent> webGlContextLostEvent = const EventStreamProvider<gl.ContextEvent>('webglcontextlost');
/**
* Static factory designed to expose `webglcontextrestored` events to event
* handlers that are not necessarily instances of [CanvasElement].
*
* See [EventStreamProvider] for usage information.
*/
@DomName('HTMLCanvasElement.webglcontextrestoredEvent')
@DocsEditable()
static const EventStreamProvider<gl.ContextEvent> webGlContextRestoredEvent = const EventStreamProvider<gl.ContextEvent>('webglcontextrestored');
@DomName('HTMLCanvasElement.HTMLCanvasElement')
@DocsEditable()
factory CanvasElement({int width, int height}) {
var e = document.createElement("canvas");
if (width != null) e.width = width;
if (height != null) e.height = height;
return e;
}
/**
* Constructor instantiated by the DOM when a custom element has been created.
*
* This can only be called by subclasses from their created constructor.
*/
CanvasElement.created() : super.created();
/// The height of this canvas element in CSS pixels.
@DomName('HTMLCanvasElement.height')
@DocsEditable()
int get height => _blink.BlinkHTMLCanvasElement.instance.height_Getter_(this);
/// The height of this canvas element in CSS pixels.
@DomName('HTMLCanvasElement.height')
@DocsEditable()
void set height(int value) => _blink.BlinkHTMLCanvasElement.instance.height_Setter_(this, value);
/// The width of this canvas element in CSS pixels.
@DomName('HTMLCanvasElement.width')
@DocsEditable()
int get width => _blink.BlinkHTMLCanvasElement.instance.width_Getter_(this);
/// The width of this canvas element in CSS pixels.
@DomName('HTMLCanvasElement.width')
@DocsEditable()
void set width(int value) => _blink.BlinkHTMLCanvasElement.instance.width_Setter_(this, value);
@DomName('HTMLCanvasElement.getContext')
@DocsEditable()
Object getContext(String contextId, [Map attrs]) => _blink.BlinkHTMLCanvasElement.instance.getContext_Callback_2_(this, contextId, attrs);
@DomName('HTMLCanvasElement.toDataURL')
@DocsEditable()
String _toDataUrl(String type, [num quality]) => _blink.BlinkHTMLCanvasElement.instance.toDataURL_Callback_2_(this, type, quality);
/// Stream of `webglcontextlost` events handled by this [CanvasElement].
@DomName('HTMLCanvasElement.onwebglcontextlost')
@DocsEditable()
ElementStream<gl.ContextEvent> get onWebGlContextLost => webGlContextLostEvent.forElement(this);
/// Stream of `webglcontextrestored` events handled by this [CanvasElement].
@DomName('HTMLCanvasElement.onwebglcontextrestored')
@DocsEditable()
ElementStream<gl.ContextEvent> get onWebGlContextRestored => webGlContextRestoredEvent.forElement(this);
/** An API for drawing on this canvas. */
CanvasRenderingContext2D get context2D => getContext('2d');
/**
* Returns a new Web GL context for this canvas.
*
* ## Other resources
*
* * [WebGL fundamentals]
* (http://www.html5rocks.com/en/tutorials/webgl/webgl_fundamentals/) from
* HTML5Rocks.
* * [WebGL homepage] (http://get.webgl.org/).
*/
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@Experimental()
gl.RenderingContext getContext3d({alpha: true, depth: true, stencil: false,
antialias: true, premultipliedAlpha: true, preserveDrawingBuffer: false}) {
var options = {
'alpha': alpha,
'depth': depth,
'stencil': stencil,
'antialias': antialias,
'premultipliedAlpha': premultipliedAlpha,
'preserveDrawingBuffer': preserveDrawingBuffer,
};
var context = getContext('webgl', options);
if (context == null) {
context = getContext('experimental-webgl', options);
}
return context;
}
/**
* Returns a data URI containing a representation of the image in the
* format specified by type (defaults to 'image/png').
*
* Data Uri format is as follow
* `data:[<MIME-type>][;charset=<encoding>][;base64],<data>`
*
* Optional parameter [quality] in the range of 0.0 and 1.0 can be used when
* requesting [type] 'image/jpeg' or 'image/webp'. If [quality] is not passed
* the default value is used. Note: the default value varies by browser.
*
* If the height or width of this canvas element is 0, then 'data:' is
* returned, representing no data.
*
* If the type requested is not 'image/png', and the returned value is
* 'data:image/png', then the requested type is not supported.
*
* Example usage:
*
* CanvasElement canvas = new CanvasElement();
* var ctx = canvas.context2D
* ..fillStyle = "rgb(200,0,0)"
* ..fillRect(10, 10, 55, 50);
* var dataUrl = canvas.toDataUrl("image/jpeg", 0.95);
* // The Data Uri would look similar to
* // 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
* // AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
* // 9TXL0Y4OHwAAAABJRU5ErkJggg=='
* //Create a new image element from the data URI.
* var img = new ImageElement();
* img.src = dataUrl;
* document.body.children.add(img);
*
* See also:
*
* * [Data URI Scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) from Wikipedia.
*
* * [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/DOM/HTMLCanvasElement) from MDN.
*
* * [toDataUrl](http://dev.w3.org/html5/spec/the-canvas-element.html#dom-canvas-todataurl) from W3C.
*/
String toDataUrl([String type = 'image/png', num quality]) =>
_toDataUrl(type, quality);
}
// 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()
/**
* An opaque canvas object representing a gradient.
*
* Created by calling [createLinearGradient] or [createRadialGradient] on a
* [CanvasRenderingContext2D] object.
*
* Example usage:
*
* var canvas = new CanvasElement(width: 600, height: 600);
* var ctx = canvas.context2D;
* ctx.clearRect(0, 0, 600, 600);
* ctx.save();
* // Create radial gradient.
* CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, 600);
* gradient.addColorStop(0, '#000');
* gradient.addColorStop(1, 'rgb(255, 255, 255)');
* // Assign gradients to fill.
* ctx.fillStyle = gradient;
* // Draw a rectangle with a gradient fill.
* ctx.fillRect(0, 0, 600, 600);
* ctx.save();
* document.body.children.add(canvas);
*
* See also:
*
* * [CanvasGradient](https://developer.mozilla.org/en-US/docs/DOM/CanvasGradient) from MDN.
* * [CanvasGradient](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasgradient) from whatwg.
* * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgradient) from W3C.
*/
@DomName('CanvasGradient')
class CanvasGradient extends NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory CanvasGradient._() { throw new UnsupportedError("Not supported"); }
/**
* Adds a color stop to this gradient at the offset.
*
* The [offset] can range between 0.0 and 1.0.
*
* See also:
*
* * [Multiple Color Stops](https://developer.mozilla.org/en-US/docs/CSS/linear-gradient#Gradient_with_multiple_color_stops) from MDN.
*/
@DomName('CanvasGradient.addColorStop')
@DocsEditable()
void addColorStop(num offset, String color) => _blink.BlinkCanvasGradient.instance.addColorStop_Callback_2_(this, offset, color);
}
// 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()
/**
* An opaque object representing a pattern of image, canvas, or video.
*
* Created by calling [createPattern] on a [CanvasRenderingContext2D] object.
*
* Example usage:
*
* var canvas = new CanvasElement(width: 600, height: 600);
* var ctx = canvas.context2D;
* var img = new ImageElement();
* // Image src needs to be loaded before pattern is applied.
* img.onLoad.listen((event) {
* // When the image is loaded, create a pattern
* // from the ImageElement.
* CanvasPattern pattern = ctx.createPattern(img, 'repeat');
* ctx.rect(0, 0, canvas.width, canvas.height);
* ctx.fillStyle = pattern;
* ctx.fill();
* });
* img.src = "images/foo.jpg";
* document.body.children.add(canvas);
*
* See also:
* * [CanvasPattern](https://developer.mozilla.org/en-US/docs/DOM/CanvasPattern) from MDN.
* * [CanvasPattern](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspattern) from whatwg.
* * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspattern) from W3C.
*/
@DomName('CanvasPattern')
class CanvasPattern extends NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
factory CanvasPattern._() { throw new UnsupportedError("Not supported"); }
@DomName('CanvasPattern.setTransform')
@DocsEditable()
@Experimental() // untriaged
void setTransform(Matrix transform) => _blink.BlinkCanvasPattern.instance.setTransform_Callback_1_(this, transform);
}
// 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.
abstract class CanvasRenderingContext {
CanvasElement get canvas;
}
@DomName('CanvasRenderingContext2D')
class CanvasRenderingContext2D extends NativeFieldWrapperClass2 implements CanvasRenderingContext {
// To suppress missing implicit constructor warnings.
factory CanvasRenderingContext2D._() { throw new UnsupportedError("Not supported"); }
@DomName('CanvasRenderingContext2D.canvas')
@DocsEditable()
@Experimental() // untriaged
CanvasElement get canvas => _blink.BlinkCanvasRenderingContext2D.instance.canvas_Getter_(this);
@DomName('CanvasRenderingContext2D.currentTransform')
@DocsEditable()
@Experimental() // untriaged
Matrix get currentTransform => _blink.BlinkCanvasRenderingContext2D.instance.currentTransform_Getter_(this);
@DomName('CanvasRenderingContext2D.currentTransform')
@DocsEditable()
@Experimental() // untriaged
void set currentTransform(Matrix value) => _blink.BlinkCanvasRenderingContext2D.instance.currentTransform_Setter_(this, value);
@DomName('CanvasRenderingContext2D.direction')
@DocsEditable()
@Experimental() // untriaged
String get direction => _blink.BlinkCanvasRenderingContext2D.instance.direction_Getter_(this);
@DomName('CanvasRenderingContext2D.direction')
@DocsEditable()
@Experimental() // untriaged
void set direction(String value) => _blink.BlinkCanvasRenderingContext2D.instance.direction_Setter_(this, value);
@DomName('CanvasRenderingContext2D.fillStyle')
@DocsEditable()
Object get fillStyle => _blink.BlinkCanvasRenderingContext2D.instance.fillStyle_Getter_(this);
@DomName('CanvasRenderingContext2D.fillStyle')
@DocsEditable()
void set fillStyle(Object value) => _blink.BlinkCanvasRenderingContext2D.instance.fillStyle_Setter_(this, value);
@DomName('CanvasRenderingContext2D.font')
@DocsEditable()
String get font => _blink.BlinkCanvasRenderingContext2D.instance.font_Getter_(this);
@DomName('CanvasRenderingContext2D.font')
@DocsEditable()
void set font(String value) => _blink.BlinkCanvasRenderingContext2D.instance.font_Setter_(this, value);
@DomName('CanvasRenderingContext2D.globalAlpha')
@DocsEditable()
num get globalAlpha => _blink.BlinkCanvasRenderingContext2D.instance.globalAlpha_Getter_(this);
@DomName('CanvasRenderingContext2D.globalAlpha')
@DocsEditable()
void set globalAlpha(num value) => _blink.BlinkCanvasRenderingContext2D.instance.globalAlpha_Setter_(this, value);
@DomName('CanvasRenderingContext2D.globalCompositeOperation')
@DocsEditable()
String get globalCompositeOperation => _blink.BlinkCanvasRenderingContext2D.instance.globalCompositeOperation_Getter_(this);
@DomName('CanvasRenderingContext2D.globalCompositeOperation')
@DocsEditable()
void set globalCompositeOperation(String value) => _blink.BlinkCanvasRenderingContext2D.instance.globalCompositeOperation_Setter_(this, value);
/**
* Whether images and patterns on this canvas will be smoothed when this
* canvas is scaled.
*
* ## Other resources
*
* * [Image smoothing]
* (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#image-smoothing)
* from WHATWG.
*/
@DomName('CanvasRenderingContext2D.imageSmoothingEnabled')
@DocsEditable()
@Experimental() // untriaged
bool get imageSmoothingEnabled => _blink.BlinkCanvasRenderingContext2D.instance.imageSmoothingEnabled_Getter_(this);
/**
* Whether images and patterns on this canvas will be smoothed when this
* canvas is scaled.
*
* ## Other resources
*
* * [Image smoothing]
* (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#image-smoothing)
* from WHATWG.
*/
@DomName('CanvasRenderingContext2D.imageSmoothingEnabled')
@DocsEditable()
@Experimental() // untriaged
void set imageSmoothingEnabled(bool value) => _blink.BlinkCanvasRenderingContext2D.instance.imageSmoothingEnabled_Setter_(this, value);
@DomName('CanvasRenderingContext2D.lineCap')
@DocsEditable()
String get lineCap => _blink.BlinkCanvasRenderingContext2D.instance.lineCap_Getter_(this);
@DomName('CanvasRenderingContext2D.lineCap')
@DocsEditable()
void set lineCap(String value) => _blink.BlinkCanvasRenderingContext2D.instance.lineCap_Setter_(this, value);
@DomName('CanvasRenderingContext2D.lineDashOffset')
@DocsEditable()
num get lineDashOffset => _blink.BlinkCanvasRenderingContext2D.instance.lineDashOffset_Getter_(this);
@DomName('CanvasRenderingContext2D.lineDashOffset')
@DocsEditable()
void set lineDashOffset(num value) => _blink.BlinkCanvasRenderingContext2D.instance.lineDashOffset_Setter_(this, value);
@DomName('CanvasRenderingContext2D.lineJoin')
@DocsEditable()
String get lineJoin => _blink.BlinkCanvasRenderingContext2D.instance.lineJoin_Getter_(this);
@DomName('CanvasRenderingContext2D.lineJoin')
@DocsEditable()
void set lineJoin(String value) => _blink.BlinkCanvasRenderingContext2D.instance.lineJoin_Setter_(this, value);
@DomName('CanvasRenderingContext2D.lineWidth')
@DocsEditable()
num get lineWidth => _blink.BlinkCanvasRenderingContext2D.instance.lineWidth_Getter_(this);
@DomName('CanvasRenderingContext2D.lineWidth')
@DocsEditable()
void set lineWidth(num value) => _blink.BlinkCanvasRenderingContext2D.instance.lineWidth_Setter_(this, value);
@DomName('CanvasRenderingContext2D.miterLimit')
@DocsEditable()
num get miterLimit => _blink.BlinkCanvasRenderingContext2D.instance.miterLimit_Getter_(this);
@DomName('CanvasRenderingContext2D.miterLimit')
@DocsEditable()
void set miterLimit(num value) => _blink.BlinkCanvasRenderingContext2D.instance.miterLimit_Setter_(this, value);
@DomName('CanvasRenderingContext2D.shadowBlur')
@DocsEditable()
num get shadowBlur => _blink.BlinkCanvasRenderingContext2D.instance.shadowBlur_Getter_(this);
@DomName('CanvasRenderingContext2D.shadowBlur')
@DocsEditable()
void set shadowBlur(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowBlur_Setter_(this, value);
@DomName('CanvasRenderingContext2D.shadowColor')
@DocsEditable()
String get shadowColor => _blink.BlinkCanvasRenderingContext2D.instance.shadowColor_Getter_(this);
@DomName('CanvasRenderingContext2D.shadowColor')
@DocsEditable()
void set shadowColor(String value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowColor_Setter_(this, value);
@DomName('CanvasRenderingContext2D.shadowOffsetX')
@DocsEditable()
num get shadowOffsetX => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetX_Getter_(this);
@DomName('CanvasRenderingContext2D.shadowOffsetX')
@DocsEditable()
void set shadowOffsetX(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetX_Setter_(this, value);
@DomName('CanvasRenderingContext2D.shadowOffsetY')
@DocsEditable()
num get shadowOffsetY => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetY_Getter_(this);
@DomName('CanvasRenderingContext2D.shadowOffsetY')
@DocsEditable()
void set shadowOffsetY(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetY_Setter_(this, value);
@DomName('CanvasRenderingContext2D.strokeStyle')
@DocsEditable()
Object get strokeStyle => _blink.BlinkCanvasRenderingContext2D.instance.strokeStyle_Getter_(this);
@DomName('CanvasRenderingContext2D.strokeStyle')
@DocsEditable()
void set strokeStyle(Object value) => _blink.BlinkCanvasRenderingContext2D.instance.strokeStyle_Setter_(this, value);
@DomName('CanvasRenderingContext2D.textAlign')
@DocsEditable()
String get textAlign => _blink.BlinkCanvasRenderingContext2D.instance.textAlign_Getter_(this);
@DomName('CanvasRenderingContext2D.textAlign')
@DocsEditable()
void set textAlign(String value) => _blink.BlinkCanvasRenderingContext2D.instance.textAlign_Setter_(this, value);
@DomName('CanvasRenderingContext2D.textBaseline')
@DocsEditable()
String get textBaseline => _blink.BlinkCanvasRenderingContext2D.instance.textBaseline_Getter_(this);
@DomName('CanvasRenderingContext2D.textBaseline')
@DocsEditable()
void set textBaseline(String value) => _blink.BlinkCanvasRenderingContext2D.instance.textBaseline_Setter_(this, value);
void addHitRegion([Map options]) {
if (options != null) {
_blink.BlinkCanvasRenderingContext2D.instance.addHitRegion_Callback_1_(this, options);
return;
}
_blink.BlinkCanvasRenderingContext2D.instance.addHitRegion_Callback_0_(this);
return;
}
@DomName('CanvasRenderingContext2D.beginPath')
@DocsEditable()
void beginPath() => _blink.BlinkCanvasRenderingContext2D.instance.beginPath_Callback_0_(this);
@DomName('CanvasRenderingContext2D.clearHitRegions')
@DocsEditable()
@Experimental() // untriaged
void clearHitRegions() => _blink.BlinkCanvasRenderingContext2D.instance.clearHitRegions_Callback_0_(this);
@DomName('CanvasRenderingContext2D.clearRect')
@DocsEditable()
void clearRect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.clearRect_Callback_4_(this, x, y, width, height);
void clip([path_OR_winding, String winding]) {
if (path_OR_winding == null && winding == null) {
_blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_0_(this);
return;
}
if ((path_OR_winding is String) && winding == null) {
_blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_1_(this, path_OR_winding);
return;
}
if ((path_OR_winding is Path2D) && winding == null) {
_blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_1_(this, path_OR_winding);
return;
}
if ((winding is String) && (path_OR_winding is Path2D)) {
_blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_2_(this, path_OR_winding, winding);
return;
}
throw new ArgumentError("Incorrect number or type of arguments");
}
@DomName('CanvasRenderingContext2D.createImageData')
@DocsEditable()
ImageData createImageData(num sw, num sh) => _blink.BlinkCanvasRenderingContext2D.instance.createImageData_Callback_2_(this, sw, sh);
@DomName('CanvasRenderingContext2D.createImageDataFromImageData')
@DocsEditable()
ImageData createImageDataFromImageData(ImageData imagedata) => _blink.BlinkCanvasRenderingContext2D.instance.createImageData_Callback_1_(this, imagedata);
@DomName('CanvasRenderingContext2D.createLinearGradient')
@DocsEditable()
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) => _blink.BlinkCanvasRenderingContext2D.instance.createLinearGradient_Callback_4_(this, x0, y0, x1, y1);
CanvasPattern createPattern(canvas_OR_image, String repetitionType) {
if ((repetitionType is String || repetitionType == null) && (canvas_OR_image is CanvasElement)) {
return _blink.BlinkCanvasRenderingContext2D.instance.createPattern_Callback_2_(this, canvas_OR_image, repetitionType);
}
if ((repetitionType is String || repetitionType == null) && (canvas_OR_image is VideoElement)) {
return _blink.BlinkCanvasRenderingContext2D.instance.createPattern_Callback_2_(this, canvas_OR_image, repetitionType);
}
throw new ArgumentError("Incorrect number or type of arguments");
}
@DomName('CanvasRenderingContext2D.createPatternFromImage')
@DocsEditable()
CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) => _blink.BlinkCanvasRenderingContext2D.instance.createPattern_Callback_2_(this, image, repetitionType);
@DomName('CanvasRenderingContext2D.createRadialGradient')
@DocsEditable()
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) => _blink.BlinkCanvasRenderingContext2D.instance.createRadialGradient_Callback_6_(this, x0, y0, r0, x1, y1, r1);
void drawFocusIfNeeded(element_OR_path, [Element element]) {
if ((element_OR_path is Element) && element == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawFocusIfNeeded_Callback_1_(this, element_OR_path);
return;
}
if ((element is Element) && (element_OR_path is Path2D)) {
_blink.BlinkCanvasRenderingContext2D.instance.drawFocusIfNeeded_Callback_2_(this, element_OR_path, element);
return;
}
throw new ArgumentError("Incorrect number or type of arguments");
}
void _drawImage(canvas_OR_image_OR_imageBitmap_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width, num height_OR_sh, num dx, num dy, num dw, num dh]) {
if ((sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageElement) && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y);
return;
}
if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageElement) && dx == null && dy == null && dw == null && dh == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
return;
}
if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageElement)) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
return;
}
if ((sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is CanvasElement) && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y);
return;
}
if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is CanvasElement) && dx == null && dy == null && dw == null && dh == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
return;
}
if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is CanvasElement)) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
return;
}
if ((sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is VideoElement) && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y);
return;
}
if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is VideoElement) && dx == null && dy == null && dw == null && dh == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
return;
}
if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is VideoElement)) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
return;
}
if ((sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageBitmap) && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y);
return;
}
if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageBitmap) && dx == null && dy == null && dw == null && dh == null) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
return;
}
if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageBitmap)) {
_blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(this, canvas_OR_image_OR_imageBitmap_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
return;
}
throw new ArgumentError("Incorrect number or type of arguments");
}
void fill([path_OR_winding, String winding]) {
if (path_OR_winding == null && winding == null) {
_blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_0_(this);
return;