| /** |
| * HTML elements and other resources for web-based applications that need to |
| * interact with the browser and the DOM (Document Object Model). |
| * |
| * This library includes DOM element types, CSS styling, local storage, |
| * media, speech, events, and more. |
| * To get started, |
| * check out the [Element] class, the base class for many of the HTML |
| * DOM types. |
| * |
| * ## Other resources |
| * |
| * * If you've never written a web app before, try our |
| * tutorials—[A Game of Darts](http://dartlang.org/docs/tutorials). |
| * |
| * * To see some web-based Dart apps in action and to play with the code, |
| * download |
| * [Dart Editor](http://www.dartlang.org/#get-started) |
| * and run its built-in examples. |
| * |
| * * For even more examples, see |
| * [Dart HTML5 Samples](https://github.com/dart-lang/dart-html5-samples) |
| * on Github. |
| */ |
| library dart.dom.html; |
| |
| import 'dart:async'; |
| import 'dart:collection'; |
| import 'dart:_internal' hide Symbol; |
| import 'dart:html_common'; |
| import 'dart:indexed_db'; |
| import 'dart:isolate'; |
| import "dart:convert"; |
| import 'dart:math'; |
| import 'dart:_native_typed_data'; |
| import 'dart:typed_data'; |
| import 'dart:svg' as svg; |
| import 'dart:svg' show Matrix; |
| import 'dart:svg' show SvgSvgElement; |
| import 'dart:web_audio' as web_audio; |
| import 'dart:web_gl' as gl; |
| import 'dart:web_gl' show RenderingContext; |
| import 'dart:web_sql'; |
| import 'dart:_isolate_helper' show IsolateNatives; |
| import 'dart:_foreign_helper' show JS, JS_INTERCEPTOR_CONSTANT; |
| // 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 - unless you are editing documentation as per: |
| // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation |
| // Auto-generated dart:html library. |
| |
| // Not actually used, but imported since dart:html can generate these objects. |
| import 'dart:_js_helper' |
| show |
| convertDartClosureToJS, |
| Creates, |
| JavaScriptIndexingBehavior, |
| JSName, |
| Native, |
| Returns, |
| ForceInline, |
| findDispatchTagForInterceptorClass, |
| setNativeSubclassDispatchRecord, |
| makeLeafDispatchRecord; |
| import 'dart:_interceptors' |
| show |
| Interceptor, |
| JSExtendableArray, |
| JSUInt31, |
| findInterceptorConstructorForType, |
| findConstructorForNativeSubclassType, |
| getNativeInterceptor, |
| setDispatchProperty; |
| |
| export 'dart:math' show Rectangle, Point; |
| |
| /** |
| * 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 => JS('Window', 'window'); |
| |
| /** |
| * Root node for all content in a web page. |
| */ |
| HtmlDocument get document => JS('HtmlDocument', 'document'); |
| |
| // Workaround for tags like <cite> that lack their own Element subclass -- |
| // Dart issue 1990. |
| @Native("HTMLElement") |
| class HtmlElement extends Element { |
| factory HtmlElement() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| HtmlElement.created() : super.created(); |
| } |
| |
| // EntryArray type was removed, so explicitly adding it to allow support for |
| // older Chrome versions. |
| // Issue #12573. |
| @Native("EntryArray") |
| abstract class _EntryArray implements List<Entry> {} |
| |
| /** |
| * 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): Implement this. |
| throw new UnimplementedError(); |
| } |
| |
| createCustomUpgrader(Type customElementClass, $this) => $this; |
| // 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 Interceptor 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<Event> errorEvent = |
| const EventStreamProvider<Event>('error'); |
| |
| /// Stream of `error` events handled by this [AbstractWorker]. |
| @DomName('AbstractWorker.onerror') |
| @DocsEditable() |
| Stream<Event> get onError => errorEvent.forTarget(this); |
| } |
| // Copyright (c) 2015, 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('HTMLAnchorElement') |
| @Native("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}) { |
| AnchorElement 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 download; |
| |
| @DomName('HTMLAnchorElement.hreflang') |
| @DocsEditable() |
| String hreflang; |
| |
| @DomName('HTMLAnchorElement.rel') |
| @DocsEditable() |
| String rel; |
| |
| @DomName('HTMLAnchorElement.target') |
| @DocsEditable() |
| String target; |
| |
| @DomName('HTMLAnchorElement.type') |
| @DocsEditable() |
| String type; |
| |
| // From URLUtils |
| |
| @DomName('HTMLAnchorElement.hash') |
| @DocsEditable() |
| String hash; |
| |
| @DomName('HTMLAnchorElement.host') |
| @DocsEditable() |
| String host; |
| |
| @DomName('HTMLAnchorElement.hostname') |
| @DocsEditable() |
| String hostname; |
| |
| @DomName('HTMLAnchorElement.href') |
| @DocsEditable() |
| String href; |
| |
| @DomName('HTMLAnchorElement.origin') |
| @DocsEditable() |
| // WebKit only |
| @Experimental() // non-standard |
| final String origin; |
| |
| @DomName('HTMLAnchorElement.password') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String password; |
| |
| @DomName('HTMLAnchorElement.pathname') |
| @DocsEditable() |
| String pathname; |
| |
| @DomName('HTMLAnchorElement.port') |
| @DocsEditable() |
| String port; |
| |
| @DomName('HTMLAnchorElement.protocol') |
| @DocsEditable() |
| String protocol; |
| |
| @DomName('HTMLAnchorElement.search') |
| @DocsEditable() |
| String search; |
| |
| @DomName('HTMLAnchorElement.username') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String username; |
| |
| @DomName('HTMLAnchorElement.toString') |
| @DocsEditable() |
| String toString() => JS('String', 'String(#)', this); |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Animation') |
| @Experimental() // untriaged |
| @Native("Animation") |
| class Animation extends EventTarget { |
| // To suppress missing implicit constructor warnings. |
| factory Animation._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| /// Checks if this type is supported on the current platform. |
| static bool get supported => JS('bool', '!!(document.body.animate)'); |
| |
| @DomName('Animation.currentTime') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num currentTime; |
| |
| @DomName('Animation.effect') |
| @DocsEditable() |
| @Experimental() // untriaged |
| AnimationEffectReadOnly effect; |
| |
| @DomName('Animation.endClip') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num endClip; |
| |
| @DomName('Animation.finished') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final Future finished; |
| |
| @DomName('Animation.playState') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String playState; |
| |
| @DomName('Animation.playbackRate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num playbackRate; |
| |
| @DomName('Animation.ready') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final Future ready; |
| |
| @DomName('Animation.startClip') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num startClip; |
| |
| @DomName('Animation.startTime') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num startTime; |
| |
| @DomName('Animation.cancel') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void cancel() native ; |
| |
| @DomName('Animation.finish') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void finish() native ; |
| |
| @DomName('Animation.pause') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void pause() native ; |
| |
| @DomName('Animation.play') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void play() native ; |
| |
| @DomName('Animation.reverse') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void reverse() native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('AnimationEffectReadOnly') |
| @Experimental() // untriaged |
| @Native("AnimationEffectReadOnly") |
| class AnimationEffectReadOnly extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationEffectReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('AnimationEffectReadOnly.computedTiming') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Map get computedTiming => |
| convertNativeToDart_Dictionary(this._get_computedTiming); |
| @JSName('computedTiming') |
| @DomName('AnimationEffectReadOnly.computedTiming') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final dynamic _get_computedTiming; |
| |
| @DomName('AnimationEffectReadOnly.timing') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final AnimationEffectTiming timing; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('AnimationEffectTiming') |
| @Experimental() // untriaged |
| @Native("AnimationEffectTiming") |
| class AnimationEffectTiming extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationEffectTiming._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('AnimationEffectTiming.delay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num delay; |
| |
| @DomName('AnimationEffectTiming.direction') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String direction; |
| |
| @DomName('AnimationEffectTiming.duration') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Creates('Null') |
| @Returns('num|String') |
| Object duration; |
| |
| @DomName('AnimationEffectTiming.easing') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String easing; |
| |
| @DomName('AnimationEffectTiming.endDelay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num endDelay; |
| |
| @DomName('AnimationEffectTiming.fill') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String fill; |
| |
| @DomName('AnimationEffectTiming.iterationStart') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num iterationStart; |
| |
| @DomName('AnimationEffectTiming.iterations') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num iterations; |
| |
| @DomName('AnimationEffectTiming.playbackRate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num playbackRate; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('AnimationEvent') |
| @Experimental() // untriaged |
| @Native("AnimationEvent") |
| class AnimationEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('AnimationEvent.AnimationEvent') |
| @DocsEditable() |
| factory AnimationEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return AnimationEvent._create_1(type, eventInitDict_1); |
| } |
| return AnimationEvent._create_2(type); |
| } |
| static AnimationEvent _create_1(type, eventInitDict) => |
| JS('AnimationEvent', 'new AnimationEvent(#,#)', type, eventInitDict); |
| static AnimationEvent _create_2(type) => |
| JS('AnimationEvent', 'new AnimationEvent(#)', type); |
| |
| @DomName('AnimationEvent.animationName') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String animationName; |
| |
| @DomName('AnimationEvent.elapsedTime') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final double elapsedTime; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('AnimationPlayerEvent') |
| @Experimental() // untriaged |
| @Native("AnimationPlayerEvent") |
| class AnimationPlayerEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationPlayerEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('AnimationPlayerEvent.AnimationPlayerEvent') |
| @DocsEditable() |
| factory AnimationPlayerEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return AnimationPlayerEvent._create_1(type, eventInitDict_1); |
| } |
| return AnimationPlayerEvent._create_2(type); |
| } |
| static AnimationPlayerEvent _create_1(type, eventInitDict) => JS( |
| 'AnimationPlayerEvent', |
| 'new AnimationPlayerEvent(#,#)', |
| type, |
| eventInitDict); |
| static AnimationPlayerEvent _create_2(type) => |
| JS('AnimationPlayerEvent', 'new AnimationPlayerEvent(#)', type); |
| |
| @DomName('AnimationPlayerEvent.currentTime') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final double currentTime; |
| |
| @DomName('AnimationPlayerEvent.timelineTime') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final double timelineTime; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('AnimationTimeline') |
| @Experimental() // untriaged |
| @Native("AnimationTimeline") |
| class AnimationTimeline extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationTimeline._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('AnimationTimeline.currentTime') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num currentTime; |
| |
| @DomName('AnimationTimeline.playbackRate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num playbackRate; |
| |
| @DomName('AnimationTimeline.getAnimations') |
| @DocsEditable() |
| @Experimental() // untriaged |
| List<Animation> getAnimations() native ; |
| |
| @DomName('AnimationTimeline.play') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Animation play(AnimationEffectReadOnly source) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('AppBannerPromptResult') |
| @Experimental() // untriaged |
| @Native("AppBannerPromptResult") |
| class AppBannerPromptResult extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AppBannerPromptResult._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('AppBannerPromptResult.outcome') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String outcome; |
| |
| @DomName('AppBannerPromptResult.platform') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String platform; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| /** |
| * 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() |
| @Native("ApplicationCache,DOMApplicationCache,OfflineResourceList") |
| 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 => JS('bool', '!!(window.applicationCache)'); |
| |
| @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() |
| final int status; |
| |
| @DomName('ApplicationCache.abort') |
| @DocsEditable() |
| void abort() native ; |
| |
| @DomName('ApplicationCache.swapCache') |
| @DocsEditable() |
| void swapCache() native ; |
| |
| @DomName('ApplicationCache.update') |
| @DocsEditable() |
| void update() native ; |
| |
| /// 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. |
| |
| @DocsEditable() |
| @DomName('ApplicationCacheErrorEvent') |
| @Experimental() // untriaged |
| @Native("ApplicationCacheErrorEvent") |
| class ApplicationCacheErrorEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory ApplicationCacheErrorEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('ApplicationCacheErrorEvent.ApplicationCacheErrorEvent') |
| @DocsEditable() |
| factory ApplicationCacheErrorEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return ApplicationCacheErrorEvent._create_1(type, eventInitDict_1); |
| } |
| return ApplicationCacheErrorEvent._create_2(type); |
| } |
| static ApplicationCacheErrorEvent _create_1(type, eventInitDict) => JS( |
| 'ApplicationCacheErrorEvent', |
| 'new ApplicationCacheErrorEvent(#,#)', |
| type, |
| eventInitDict); |
| static ApplicationCacheErrorEvent _create_2(type) => JS( |
| 'ApplicationCacheErrorEvent', 'new ApplicationCacheErrorEvent(#)', type); |
| |
| @DomName('ApplicationCacheErrorEvent.message') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String message; |
| |
| @DomName('ApplicationCacheErrorEvent.reason') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String reason; |
| |
| @DomName('ApplicationCacheErrorEvent.status') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final int status; |
| |
| @DomName('ApplicationCacheErrorEvent.url') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String url; |
| } |
| // Copyright (c) 2015, 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() |
| /** |
| * 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') |
| @Native("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 alt; |
| |
| @DomName('HTMLAreaElement.coords') |
| @DocsEditable() |
| String coords; |
| |
| @DomName('HTMLAreaElement.shape') |
| @DocsEditable() |
| String shape; |
| |
| @DomName('HTMLAreaElement.target') |
| @DocsEditable() |
| String target; |
| |
| // From URLUtils |
| |
| @DomName('HTMLAreaElement.hash') |
| @DocsEditable() |
| String hash; |
| |
| @DomName('HTMLAreaElement.host') |
| @DocsEditable() |
| String host; |
| |
| @DomName('HTMLAreaElement.hostname') |
| @DocsEditable() |
| String hostname; |
| |
| @DomName('HTMLAreaElement.href') |
| @DocsEditable() |
| String href; |
| |
| @DomName('HTMLAreaElement.origin') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String origin; |
| |
| @DomName('HTMLAreaElement.password') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String password; |
| |
| @DomName('HTMLAreaElement.pathname') |
| @DocsEditable() |
| String pathname; |
| |
| @DomName('HTMLAreaElement.port') |
| @DocsEditable() |
| String port; |
| |
| @DomName('HTMLAreaElement.protocol') |
| @DocsEditable() |
| String protocol; |
| |
| @DomName('HTMLAreaElement.search') |
| @DocsEditable() |
| String search; |
| |
| @DomName('HTMLAreaElement.username') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String username; |
| |
| @DomName('HTMLAreaElement.toString') |
| @DocsEditable() |
| String toString() => JS('String', 'String(#)', this); |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLAudioElement') |
| @Native("HTMLAudioElement") |
| class AudioElement extends MediaElement { |
| @DomName('HTMLAudioElement.HTMLAudioElement') |
| @DocsEditable() |
| factory AudioElement._([String src]) { |
| if (src != null) { |
| return AudioElement._create_1(src); |
| } |
| return AudioElement._create_2(); |
| } |
| static AudioElement _create_1(src) => JS('AudioElement', 'new Audio(#)', src); |
| static AudioElement _create_2() => JS('AudioElement', 'new Audio()'); |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| AudioElement.created() : super.created(); |
| |
| factory AudioElement([String src]) => new AudioElement._(src); |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('AudioTrack') |
| @Experimental() // untriaged |
| @Native("AudioTrack") |
| class AudioTrack extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AudioTrack._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('AudioTrack.enabled') |
| @DocsEditable() |
| @Experimental() // untriaged |
| bool enabled; |
| |
| @DomName('AudioTrack.id') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String id; |
| |
| @DomName('AudioTrack.kind') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String kind; |
| |
| @DomName('AudioTrack.label') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String label; |
| |
| @DomName('AudioTrack.language') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String language; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('AudioTrackList') |
| @Experimental() // untriaged |
| @Native("AudioTrackList") |
| 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 |
| final int length; |
| |
| @DomName('AudioTrackList.__getter__') |
| @DocsEditable() |
| @Experimental() // untriaged |
| AudioTrack __getter__(int index) native ; |
| |
| @DomName('AudioTrackList.getTrackById') |
| @DocsEditable() |
| @Experimental() // untriaged |
| AudioTrack getTrackById(String id) native ; |
| |
| @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. |
| |
| @DocsEditable() |
| @DomName('AutocompleteErrorEvent') |
| // http://wiki.whatwg.org/wiki/RequestAutocomplete |
| @Experimental() |
| @Native("AutocompleteErrorEvent") |
| class AutocompleteErrorEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory AutocompleteErrorEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('AutocompleteErrorEvent.AutocompleteErrorEvent') |
| @DocsEditable() |
| factory AutocompleteErrorEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return AutocompleteErrorEvent._create_1(type, eventInitDict_1); |
| } |
| return AutocompleteErrorEvent._create_2(type); |
| } |
| static AutocompleteErrorEvent _create_1(type, eventInitDict) => JS( |
| 'AutocompleteErrorEvent', |
| 'new AutocompleteErrorEvent(#,#)', |
| type, |
| eventInitDict); |
| static AutocompleteErrorEvent _create_2(type) => |
| JS('AutocompleteErrorEvent', 'new AutocompleteErrorEvent(#)', type); |
| |
| @DomName('AutocompleteErrorEvent.reason') |
| @DocsEditable() |
| final String reason; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLBRElement') |
| @Native("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. |
| |
| @DocsEditable() |
| @DomName('BarProp') |
| // http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#barprop |
| @deprecated // standard |
| @Native("BarProp") |
| class BarProp extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BarProp._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('BarProp.visible') |
| @DocsEditable() |
| final bool visible; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLBaseElement') |
| @Native("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 href; |
| |
| @DomName('HTMLBaseElement.target') |
| @DocsEditable() |
| String target; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('BatteryManager') |
| // https://dvcs.w3.org/hg/dap/raw-file/default/battery/Overview.html#batterymanager-interface |
| @Experimental() // stable |
| @Native("BatteryManager") |
| class BatteryManager extends EventTarget { |
| // To suppress missing implicit constructor warnings. |
| factory BatteryManager._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('BatteryManager.charging') |
| @DocsEditable() |
| final bool charging; |
| |
| @DomName('BatteryManager.chargingTime') |
| @DocsEditable() |
| final double chargingTime; |
| |
| @DomName('BatteryManager.dischargingTime') |
| @DocsEditable() |
| final double dischargingTime; |
| |
| @DomName('BatteryManager.level') |
| @DocsEditable() |
| final double level; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('BeforeInstallPromptEvent') |
| @Experimental() // untriaged |
| @Native("BeforeInstallPromptEvent") |
| class BeforeInstallPromptEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory BeforeInstallPromptEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('BeforeInstallPromptEvent.BeforeInstallPromptEvent') |
| @DocsEditable() |
| factory BeforeInstallPromptEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return BeforeInstallPromptEvent._create_1(type, eventInitDict_1); |
| } |
| return BeforeInstallPromptEvent._create_2(type); |
| } |
| static BeforeInstallPromptEvent _create_1(type, eventInitDict) => JS( |
| 'BeforeInstallPromptEvent', |
| 'new BeforeInstallPromptEvent(#,#)', |
| type, |
| eventInitDict); |
| static BeforeInstallPromptEvent _create_2(type) => |
| JS('BeforeInstallPromptEvent', 'new BeforeInstallPromptEvent(#)', type); |
| |
| List<String> get platforms => JS("List<String>", "#.platforms", this); |
| |
| @DomName('BeforeInstallPromptEvent.userChoice') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final Future userChoice; |
| |
| @DomName('BeforeInstallPromptEvent.prompt') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future prompt() native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('BeforeUnloadEvent') |
| @Native("BeforeUnloadEvent") |
| class BeforeUnloadEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory BeforeUnloadEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| // Shadowing definition. |
| String get returnValue => JS("String", "#.returnValue", this); |
| |
| set returnValue(String value) { |
| JS("void", "#.returnValue = #", 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') |
| @Native("Blob") |
| class Blob extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Blob._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Blob.size') |
| @DocsEditable() |
| final int size; |
| |
| @DomName('Blob.type') |
| @DocsEditable() |
| final String type; |
| |
| @DomName('Blob.close') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void close() native ; |
| |
| @DomName('Blob.slice') |
| @DocsEditable() |
| Blob slice([int start, int end, String contentType]) native ; |
| |
| factory Blob(List blobParts, [String type, String endings]) { |
| // TODO: validate that blobParts is a JS Array and convert if not. |
| // TODO: any coercions on the elements of blobParts, e.g. coerce a typed |
| // array to ArrayBuffer if it is a total view. |
| if (type == null && endings == null) { |
| return _create_1(blobParts); |
| } |
| var bag = _create_bag(); |
| if (type != null) _bag_set(bag, 'type', type); |
| if (endings != null) _bag_set(bag, 'endings', endings); |
| return _create_2(blobParts, bag); |
| } |
| |
| static _create_1(parts) => JS('Blob', 'new self.Blob(#)', parts); |
| static _create_2(parts, bag) => JS('Blob', 'new self.Blob(#, #)', parts, bag); |
| |
| static _create_bag() => JS('var', '{}'); |
| static _bag_set(bag, key, value) { |
| JS('void', '#[#] = #', bag, key, 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. |
| |
| @DocsEditable() |
| @DomName('Bluetooth') |
| @Experimental() // untriaged |
| @Native("Bluetooth") |
| class Bluetooth extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Bluetooth._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Bluetooth.requestDevice') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future requestDevice(Map options) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| return _requestDevice_1(options_1); |
| } |
| |
| @JSName('requestDevice') |
| @DomName('Bluetooth.requestDevice') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future _requestDevice_1(options) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('BluetoothDevice') |
| @Experimental() // untriaged |
| @Native("BluetoothDevice") |
| class BluetoothDevice extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BluetoothDevice._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('BluetoothDevice.deviceClass') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final int deviceClass; |
| |
| @DomName('BluetoothDevice.instanceID') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String instanceID; |
| |
| @DomName('BluetoothDevice.name') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String name; |
| |
| @DomName('BluetoothDevice.paired') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final bool paired; |
| |
| @DomName('BluetoothDevice.productID') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final int productID; |
| |
| @DomName('BluetoothDevice.productVersion') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final int productVersion; |
| |
| @DomName('BluetoothDevice.vendorID') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final int vendorID; |
| |
| @DomName('BluetoothDevice.vendorIDSource') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String vendorIDSource; |
| |
| @JSName('connectGATT') |
| @DomName('BluetoothDevice.connectGATT') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future connectGatt() native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('BluetoothGATTCharacteristic') |
| @Experimental() // untriaged |
| @Native("BluetoothGATTCharacteristic") |
| class BluetoothGattCharacteristic extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BluetoothGattCharacteristic._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('BluetoothGATTCharacteristic.uuid') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String uuid; |
| |
| @DomName('BluetoothGATTCharacteristic.readValue') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future readValue() native ; |
| |
| @DomName('BluetoothGATTCharacteristic.writeValue') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future writeValue(/*BufferSource*/ value) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('BluetoothGATTRemoteServer') |
| @Experimental() // untriaged |
| @Native("BluetoothGATTRemoteServer") |
| class BluetoothGattRemoteServer extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BluetoothGattRemoteServer._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('BluetoothGATTRemoteServer.connected') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final bool connected; |
| |
| @DomName('BluetoothGATTRemoteServer.getPrimaryService') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future getPrimaryService(/*BluetoothServiceUUID*/ service) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('BluetoothGATTService') |
| @Experimental() // untriaged |
| @Native("BluetoothGATTService") |
| class BluetoothGattService extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BluetoothGattService._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('BluetoothGATTService.isPrimary') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final bool isPrimary; |
| |
| @DomName('BluetoothGATTService.uuid') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String uuid; |
| |
| @DomName('BluetoothGATTService.getCharacteristic') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future getCharacteristic(/*BluetoothCharacteristicUUID*/ characteristic) |
| native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('BluetoothUUID') |
| @Experimental() // untriaged |
| @Native("BluetoothUUID") |
| class BluetoothUuid extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BluetoothUuid._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('canonicalUUID') |
| @DomName('BluetoothUUID.canonicalUUID') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static String canonicalUuid(int alias) native ; |
| |
| @DomName('BluetoothUUID.getCharacteristic') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static String getCharacteristic(Object name) native ; |
| |
| @DomName('BluetoothUUID.getDescriptor') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static String getDescriptor(Object name) native ; |
| |
| @DomName('BluetoothUUID.getService') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static String getService(Object name) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Body') |
| @Experimental() // untriaged |
| @Native("Body") |
| class Body extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Body._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Body.bodyUsed') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final bool bodyUsed; |
| |
| @DomName('Body.arrayBuffer') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future arrayBuffer() native ; |
| |
| @DomName('Body.blob') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future blob() native ; |
| |
| @DomName('Body.json') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future json() native ; |
| |
| @DomName('Body.text') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future text() native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLBodyElement') |
| @Native("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. |
| |
| @DocsEditable() |
| @DomName('HTMLButtonElement') |
| @Native("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 autofocus; |
| |
| @DomName('HTMLButtonElement.disabled') |
| @DocsEditable() |
| bool disabled; |
| |
| @DomName('HTMLButtonElement.form') |
| @DocsEditable() |
| final FormElement form; |
| |
| @DomName('HTMLButtonElement.formAction') |
| @DocsEditable() |
| String formAction; |
| |
| @DomName('HTMLButtonElement.formEnctype') |
| @DocsEditable() |
| String formEnctype; |
| |
| @DomName('HTMLButtonElement.formMethod') |
| @DocsEditable() |
| String formMethod; |
| |
| @DomName('HTMLButtonElement.formNoValidate') |
| @DocsEditable() |
| bool formNoValidate; |
| |
| @DomName('HTMLButtonElement.formTarget') |
| @DocsEditable() |
| String formTarget; |
| |
| @DomName('HTMLButtonElement.labels') |
| @DocsEditable() |
| @Unstable() |
| @Returns('NodeList') |
| @Creates('NodeList') |
| final List<Node> labels; |
| |
| @DomName('HTMLButtonElement.name') |
| @DocsEditable() |
| String name; |
| |
| @DomName('HTMLButtonElement.type') |
| @DocsEditable() |
| String type; |
| |
| @DomName('HTMLButtonElement.validationMessage') |
| @DocsEditable() |
| final String validationMessage; |
| |
| @DomName('HTMLButtonElement.validity') |
| @DocsEditable() |
| final ValidityState validity; |
| |
| @DomName('HTMLButtonElement.value') |
| @DocsEditable() |
| String value; |
| |
| @DomName('HTMLButtonElement.willValidate') |
| @DocsEditable() |
| final bool willValidate; |
| |
| @DomName('HTMLButtonElement.checkValidity') |
| @DocsEditable() |
| bool checkValidity() native ; |
| |
| @DomName('HTMLButtonElement.reportValidity') |
| @DocsEditable() |
| @Experimental() // untriaged |
| bool reportValidity() native ; |
| |
| @DomName('HTMLButtonElement.setCustomValidity') |
| @DocsEditable() |
| void setCustomValidity(String error) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CDATASection') |
| // http://dom.spec.whatwg.org/#cdatasection |
| @deprecated // deprecated |
| @Native("CDATASection") |
| 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. |
| |
| @DocsEditable() |
| @DomName('CacheStorage') |
| @Experimental() // untriaged |
| @Native("CacheStorage") |
| class CacheStorage extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CacheStorage._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CacheStorage.delete') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future delete(String cacheName) native ; |
| |
| @DomName('CacheStorage.has') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future has(String cacheName) native ; |
| |
| @DomName('CacheStorage.keys') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future keys() native ; |
| |
| @DomName('CacheStorage.match') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future match(/*RequestInfo*/ request, [Map options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| return _match_1(request, options_1); |
| } |
| return _match_2(request); |
| } |
| |
| @JSName('match') |
| @DomName('CacheStorage.match') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future _match_1(request, options) native ; |
| @JSName('match') |
| @DomName('CacheStorage.match') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future _match_2(request) native ; |
| |
| @DomName('CacheStorage.open') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future open(String cacheName) native ; |
| } |
| // 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') |
| @Native("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}) { |
| CanvasElement 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 height; |
| |
| /// The width of this canvas element in CSS pixels. |
| @DomName('HTMLCanvasElement.width') |
| @DocsEditable() |
| int width; |
| |
| @DomName('HTMLCanvasElement.getContext') |
| @DocsEditable() |
| @Creates('CanvasRenderingContext2D|RenderingContext') |
| @Returns('CanvasRenderingContext2D|RenderingContext|Null') |
| Object getContext(String contextId, [Map attributes]) { |
| if (attributes != null) { |
| var attributes_1 = convertDartToNative_Dictionary(attributes); |
| return _getContext_1(contextId, attributes_1); |
| } |
| return _getContext_2(contextId); |
| } |
| |
| @JSName('getContext') |
| @DomName('HTMLCanvasElement.getContext') |
| @DocsEditable() |
| @Creates('CanvasRenderingContext2D|RenderingContext') |
| @Returns('CanvasRenderingContext2D|RenderingContext|Null') |
| Object _getContext_1(contextId, attributes) native ; |
| @JSName('getContext') |
| @DomName('HTMLCanvasElement.getContext') |
| @DocsEditable() |
| @Creates('CanvasRenderingContext2D|RenderingContext') |
| @Returns('CanvasRenderingContext2D|RenderingContext|Null') |
| Object _getContext_2(contextId) native ; |
| |
| @JSName('toDataURL') |
| @DomName('HTMLCanvasElement.toDataURL') |
| @DocsEditable() |
| String _toDataUrl(String type, [arguments_OR_quality]) native ; |
| |
| /// 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 => |
| JS('Null|CanvasRenderingContext2D', '#.getContext(#)', this, '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. |
| |
| @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](https://html.spec.whatwg.org/multipage/scripting.html#canvasgradient) |
| * from WHATWG. |
| * * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgradient) from W3C. |
| */ |
| @DomName('CanvasGradient') |
| @Native("CanvasGradient") |
| class CanvasGradient extends Interceptor { |
| // 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) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| /** |
| * 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](https://html.spec.whatwg.org/multipage/scripting.html#canvaspattern) |
| * from WHATWG. |
| * * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspattern) from W3C. |
| */ |
| @DomName('CanvasPattern') |
| @Native("CanvasPattern") |
| class CanvasPattern extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CanvasPattern._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CanvasPattern.setTransform') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void setTransform(Matrix transform) native ; |
| } |
| // 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') |
| @Native("CanvasRenderingContext2D") |
| class CanvasRenderingContext2D extends Interceptor |
| implements CanvasRenderingContext { |
| // To suppress missing implicit constructor warnings. |
| factory CanvasRenderingContext2D._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CanvasRenderingContext2D.canvas') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final CanvasElement canvas; |
| |
| @DomName('CanvasRenderingContext2D.currentTransform') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Matrix currentTransform; |
| |
| @DomName('CanvasRenderingContext2D.direction') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String direction; |
| |
| @DomName('CanvasRenderingContext2D.fillStyle') |
| @DocsEditable() |
| @Creates('String|CanvasGradient|CanvasPattern') |
| @Returns('String|CanvasGradient|CanvasPattern') |
| Object fillStyle; |
| |
| @DomName('CanvasRenderingContext2D.filter') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String filter; |
| |
| @DomName('CanvasRenderingContext2D.font') |
| @DocsEditable() |
| String font; |
| |
| @DomName('CanvasRenderingContext2D.globalAlpha') |
| @DocsEditable() |
| num globalAlpha; |
| |
| @DomName('CanvasRenderingContext2D.globalCompositeOperation') |
| @DocsEditable() |
| String globalCompositeOperation; |
| |
| /** |
| * Whether images and patterns on this canvas will be smoothed when this |
| * canvas is scaled. |
| * |
| * ## Other resources |
| * |
| * * [Image |
| * smoothing](https://html.spec.whatwg.org/multipage/scripting.html#image-smoothing) |
| * from WHATWG. |
| */ |
| @DomName('CanvasRenderingContext2D.imageSmoothingEnabled') |
| @DocsEditable() |
| @Experimental() // untriaged |
| bool imageSmoothingEnabled; |
| |
| @DomName('CanvasRenderingContext2D.lineCap') |
| @DocsEditable() |
| String lineCap; |
| |
| @DomName('CanvasRenderingContext2D.lineJoin') |
| @DocsEditable() |
| String lineJoin; |
| |
| @DomName('CanvasRenderingContext2D.lineWidth') |
| @DocsEditable() |
| num lineWidth; |
| |
| @DomName('CanvasRenderingContext2D.miterLimit') |
| @DocsEditable() |
| num miterLimit; |
| |
| @DomName('CanvasRenderingContext2D.shadowBlur') |
| @DocsEditable() |
| num shadowBlur; |
| |
| @DomName('CanvasRenderingContext2D.shadowColor') |
| @DocsEditable() |
| String shadowColor; |
| |
| @DomName('CanvasRenderingContext2D.shadowOffsetX') |
| @DocsEditable() |
| num shadowOffsetX; |
| |
| @DomName('CanvasRenderingContext2D.shadowOffsetY') |
| @DocsEditable() |
| num shadowOffsetY; |
| |
| @DomName('CanvasRenderingContext2D.strokeStyle') |
| @DocsEditable() |
| @Creates('String|CanvasGradient|CanvasPattern') |
| @Returns('String|CanvasGradient|CanvasPattern') |
| Object strokeStyle; |
| |
| @DomName('CanvasRenderingContext2D.textAlign') |
| @DocsEditable() |
| String textAlign; |
| |
| @DomName('CanvasRenderingContext2D.textBaseline') |
| @DocsEditable() |
| String textBaseline; |
| |
| @DomName('CanvasRenderingContext2D.addHitRegion') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void addHitRegion([Map options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| _addHitRegion_1(options_1); |
| return; |
| } |
| _addHitRegion_2(); |
| return; |
| } |
| |
| @JSName('addHitRegion') |
| @DomName('CanvasRenderingContext2D.addHitRegion') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _addHitRegion_1(options) native ; |
| @JSName('addHitRegion') |
| @DomName('CanvasRenderingContext2D.addHitRegion') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _addHitRegion_2() native ; |
| |
| @DomName('CanvasRenderingContext2D.beginPath') |
| @DocsEditable() |
| void beginPath() native ; |
| |
| @DomName('CanvasRenderingContext2D.clearHitRegions') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void clearHitRegions() native ; |
| |
| @DomName('CanvasRenderingContext2D.clearRect') |
| @DocsEditable() |
| void clearRect(num x, num y, num width, num height) native ; |
| |
| @DomName('CanvasRenderingContext2D.clip') |
| @DocsEditable() |
| void clip([path_OR_winding, String winding]) native ; |
| |
| @DomName('CanvasRenderingContext2D.createImageData') |
| @DocsEditable() |
| @Creates('ImageData|=Object') |
| ImageData createImageData(imagedata_OR_sw, [num sh]) { |
| if ((imagedata_OR_sw is ImageData) && sh == null) { |
| var imagedata_1 = convertDartToNative_ImageData(imagedata_OR_sw); |
| return convertNativeToDart_ImageData(_createImageData_1(imagedata_1)); |
| } |
| if (sh != null && (imagedata_OR_sw is num)) { |
| return convertNativeToDart_ImageData( |
| _createImageData_2(imagedata_OR_sw, sh)); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| |
| @JSName('createImageData') |
| @DomName('CanvasRenderingContext2D.createImageData') |
| @DocsEditable() |
| @Creates('ImageData|=Object') |
| _createImageData_1(imagedata) native ; |
| @JSName('createImageData') |
| @DomName('CanvasRenderingContext2D.createImageData') |
| @DocsEditable() |
| @Creates('ImageData|=Object') |
| _createImageData_2(num sw, sh) native ; |
| |
| @DomName('CanvasRenderingContext2D.createLinearGradient') |
| @DocsEditable() |
| CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native ; |
| |
| @DomName('CanvasRenderingContext2D.createPattern') |
| @DocsEditable() |
| CanvasPattern createPattern(Object image, String repetitionType) native ; |
| |
| @DomName('CanvasRenderingContext2D.createRadialGradient') |
| @DocsEditable() |
| CanvasGradient createRadialGradient( |
| num x0, num y0, num r0, num x1, num y1, num r1) native ; |
| |
| @DomName('CanvasRenderingContext2D.drawFocusIfNeeded') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void drawFocusIfNeeded(element_OR_path, [Element element]) native ; |
| |
| @DomName('CanvasRenderingContext2D.fillRect') |
| @DocsEditable() |
| void fillRect(num x, num y, num width, num height) native ; |
| |
| @DomName('CanvasRenderingContext2D.getContextAttributes') |
| @DocsEditable() |
| // http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL |
| @Experimental() |
| Map getContextAttributes() { |
| return convertNativeToDart_Dictionary(_getContextAttributes_1()); |
| } |
| |
| @JSName('getContextAttributes') |
| @DomName('CanvasRenderingContext2D.getContextAttributes') |
| @DocsEditable() |
| // http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL |
| @Experimental() |
| _getContextAttributes_1() native ; |
| |
| @DomName('CanvasRenderingContext2D.getImageData') |
| @DocsEditable() |
| @Creates('ImageData|=Object') |
| ImageData getImageData(num sx, num sy, num sw, num sh) { |
| return convertNativeToDart_ImageData(_getImageData_1(sx, sy, sw, sh)); |
| } |
| |
| @JSName('getImageData') |
| @DomName('CanvasRenderingContext2D.getImageData') |
| @DocsEditable() |
| @Creates('ImageData|=Object') |
| _getImageData_1(sx, sy, sw, sh) native ; |
| |
| @JSName('getLineDash') |
| @DomName('CanvasRenderingContext2D.getLineDash') |
| @DocsEditable() |
| List<num> _getLineDash() native ; |
| |
| @DomName('CanvasRenderingContext2D.isContextLost') |
| @DocsEditable() |
| @Experimental() // untriaged |
| bool isContextLost() native ; |
| |
| @DomName('CanvasRenderingContext2D.isPointInPath') |
| @DocsEditable() |
| bool isPointInPath(path_OR_x, num x_OR_y, [winding_OR_y, String winding]) |
| native ; |
| |
| @DomName('CanvasRenderingContext2D.isPointInStroke') |
| @DocsEditable() |
| bool isPointInStroke(path_OR_x, num x_OR_y, [num y]) native ; |
| |
| @DomName('CanvasRenderingContext2D.measureText') |
| @DocsEditable() |
| TextMetrics measureText(String text) native ; |
| |
| @DomName('CanvasRenderingContext2D.putImageData') |
| @DocsEditable() |
| void putImageData(ImageData imagedata, num dx, num dy, |
| [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) { |
| if (dirtyX == null && |
| dirtyY == null && |
| dirtyWidth == null && |
| dirtyHeight == null) { |
| var imagedata_1 = convertDartToNative_ImageData(imagedata); |
| _putImageData_1(imagedata_1, dx, dy); |
| return; |
| } |
| if (dirtyHeight != null && |
| dirtyWidth != null && |
| dirtyY != null && |
| dirtyX != null) { |
| var imagedata_1 = convertDartToNative_ImageData(imagedata); |
| _putImageData_2( |
| imagedata_1, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight); |
| return; |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| |
| @JSName('putImageData') |
| @DomName('CanvasRenderingContext2D.putImageData') |
| @DocsEditable() |
| void _putImageData_1(imagedata, dx, dy) native ; |
| @JSName('putImageData') |
| @DomName('CanvasRenderingContext2D.putImageData') |
| @DocsEditable() |
| void _putImageData_2( |
| imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native ; |
| |
| @DomName('CanvasRenderingContext2D.removeHitRegion') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void removeHitRegion(String id) native ; |
| |
| @DomName('CanvasRenderingContext2D.resetTransform') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void resetTransform() native ; |
| |
| @DomName('CanvasRenderingContext2D.restore') |
| @DocsEditable() |
| void restore() native ; |
| |
| @DomName('CanvasRenderingContext2D.rotate') |
| @DocsEditable() |
| void rotate(num angle) native ; |
| |
| @DomName('CanvasRenderingContext2D.save') |
| @DocsEditable() |
| void save() native ; |
| |
| @DomName('CanvasRenderingContext2D.scale') |
| @DocsEditable() |
| void scale(num x, num y) native ; |
| |
| @DomName('CanvasRenderingContext2D.scrollPathIntoView') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void scrollPathIntoView([Path2D path]) native ; |
| |
| @DomName('CanvasRenderingContext2D.setTransform') |
| @DocsEditable() |
| void setTransform(num a, num b, num c, num d, num e, num f) native ; |
| |
| @DomName('CanvasRenderingContext2D.stroke') |
| @DocsEditable() |
| void stroke([Path2D path]) native ; |
| |
| @DomName('CanvasRenderingContext2D.strokeRect') |
| @DocsEditable() |
| void strokeRect(num x, num y, num width, num height) native ; |
| |
| @DomName('CanvasRenderingContext2D.strokeText') |
| @DocsEditable() |
| void strokeText(String text, num x, num y, [num maxWidth]) native ; |
| |
| @DomName('CanvasRenderingContext2D.transform') |
| @DocsEditable() |
| void transform(num a, num b, num c, num d, num e, num f) native ; |
| |
| @DomName('CanvasRenderingContext2D.translate') |
| @DocsEditable() |
| void translate(num x, num y) native ; |
| |
| // From CanvasPathMethods |
| |
| @JSName('arc') |
| @DomName('CanvasRenderingContext2D.arc') |
| @DocsEditable() |
| void _arc(num x, num y, num radius, num startAngle, num endAngle, |
| bool anticlockwise) native ; |
| |
| @DomName('CanvasRenderingContext2D.arcTo') |
| @DocsEditable() |
| void arcTo(num x1, num y1, num x2, num y2, num radius) native ; |
| |
| @DomName('CanvasRenderingContext2D.bezierCurveTo') |
| @DocsEditable() |
| void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) |
| native ; |
| |
| @DomName('CanvasRenderingContext2D.closePath') |
| @DocsEditable() |
| void closePath() native ; |
| |
| @DomName('CanvasRenderingContext2D.ellipse') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void ellipse(num x, num y, num radiusX, num radiusY, num rotation, |
| num startAngle, num endAngle, bool anticlockwise) native ; |
| |
| @DomName('CanvasRenderingContext2D.lineTo') |
| @DocsEditable() |
| void lineTo(num x, num y) native ; |
| |
| @DomName('CanvasRenderingContext2D.moveTo') |
| @DocsEditable() |
| void moveTo(num x, num y) native ; |
| |
| @DomName('CanvasRenderingContext2D.quadraticCurveTo') |
| @DocsEditable() |
| void quadraticCurveTo(num cpx, num cpy, num x, num y) native ; |
| |
| @DomName('CanvasRenderingContext2D.rect') |
| @DocsEditable() |
| void rect(num x, num y, num width, num height) native ; |
| |
| @DomName('CanvasRenderingContext2D.createImageDataFromImageData') |
| @DocsEditable() |
| ImageData createImageDataFromImageData(ImageData imagedata) => |
| JS('ImageData', '#.createImageData(#)', this, imagedata); |
| |
| /** |
| * Sets the color used inside shapes. |
| * [r], [g], [b] are 0-255, [a] is 0-1. |
| */ |
| void setFillColorRgb(int r, int g, int b, [num a = 1]) { |
| this.fillStyle = 'rgba($r, $g, $b, $a)'; |
| } |
| |
| /** |
| * Sets the color used inside shapes. |
| * [h] is in degrees, 0-360. |
| * [s], [l] are in percent, 0-100. |
| * [a] is 0-1. |
| */ |
| void setFillColorHsl(int h, num s, num l, [num a = 1]) { |
| this.fillStyle = 'hsla($h, $s%, $l%, $a)'; |
| } |
| |
| /** |
| * Sets the color used for stroking shapes. |
| * [r], [g], [b] are 0-255, [a] is 0-1. |
| */ |
| void setStrokeColorRgb(int r, int g, int b, [num a = 1]) { |
| this.strokeStyle = 'rgba($r, $g, $b, $a)'; |
| } |
| |
| /** |
| * Sets the color used for stroking shapes. |
| * [h] is in degrees, 0-360. |
| * [s], [l] are in percent, 0-100. |
| * [a] is 0-1. |
| */ |
| void setStrokeColorHsl(int h, num s, num l, [num a = 1]) { |
| this.strokeStyle = 'hsla($h, $s%, $l%, $a)'; |
| } |
| |
| @DomName('CanvasRenderingContext2D.arc') |
| void arc(num x, num y, num radius, num startAngle, num endAngle, |
| [bool anticlockwise = false]) { |
| // TODO(terry): This should not be needed: dartbug.com/20939. |
| JS('void', '#.arc(#, #, #, #, #, #)', this, x, y, radius, startAngle, |
| endAngle, anticlockwise); |
| } |
| |
| @DomName('CanvasRenderingContext2D.createPatternFromImage') |
| CanvasPattern createPatternFromImage( |
| ImageElement image, String repetitionType) => |
| JS('CanvasPattern', '#.createPattern(#, #)', this, image, repetitionType); |
| |
| /** |
| * Draws an image from a CanvasImageSource to an area of this canvas. |
| * |
| * The image will be drawn to an area of this canvas defined by |
| * [destRect]. [sourceRect] defines the region of the source image that is |
| * drawn. |
| * If [sourceRect] is not provided, then |
| * the entire rectangular image from [source] will be drawn to this context. |
| * |
| * If the image is larger than canvas |
| * will allow, the image will be clipped to fit the available space. |
| * |
| * CanvasElement canvas = new CanvasElement(width: 600, height: 600); |
| * CanvasRenderingContext2D ctx = canvas.context2D; |
| * ImageElement img = document.query('img'); |
| * img.width = 100; |
| * img.height = 100; |
| * |
| * // Scale the image to 20x20. |
| * ctx.drawImageToRect(img, new Rectangle(50, 50, 20, 20)); |
| * |
| * VideoElement video = document.query('video'); |
| * video.width = 100; |
| * video.height = 100; |
| * // Take the middle 20x20 pixels from the video and stretch them. |
| * ctx.drawImageToRect(video, new Rectangle(50, 50, 100, 100), |
| * sourceRect: new Rectangle(40, 40, 20, 20)); |
| * |
| * // Draw the top 100x20 pixels from the otherCanvas. |
| * CanvasElement otherCanvas = document.query('canvas'); |
| * ctx.drawImageToRect(otherCanvas, new Rectangle(0, 0, 100, 20), |
| * sourceRect: new Rectangle(0, 0, 100, 20)); |
| * |
| * See also: |
| * |
| * * [CanvasImageSource] for more information on what data is retrieved |
| * from [source]. |
| * * [drawImage](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage) |
| * from the WHATWG. |
| */ |
| @DomName('CanvasRenderingContext2D.drawImage') |
| void drawImageToRect(CanvasImageSource source, Rectangle destRect, |
| {Rectangle sourceRect}) { |
| if (sourceRect == null) { |
| drawImageScaled( |
| source, destRect.left, destRect.top, destRect.width, destRect.height); |
| } else { |
| drawImageScaledFromSource( |
| source, |
| sourceRect.left, |
| sourceRect.top, |
| sourceRect.width, |
| sourceRect.height, |
| destRect.left, |
| destRect.top, |
| destRect.width, |
| destRect.height); |
| } |
| } |
| |
| /** |
| * Draws an image from a CanvasImageSource to this canvas. |
| * |
| * The entire image from [source] will be drawn to this context with its top |
| * left corner at the point ([destX], [destY]). If the image is |
| * larger than canvas will allow, the image will be clipped to fit the |
| * available space. |
| * |
| * CanvasElement canvas = new CanvasElement(width: 600, height: 600); |
| * CanvasRenderingContext2D ctx = canvas.context2D; |
| * ImageElement img = document.query('img'); |
| * |
| * ctx.drawImage(img, 100, 100); |
| * |
| * VideoElement video = document.query('video'); |
| * ctx.drawImage(video, 0, 0); |
| * |
| * CanvasElement otherCanvas = document.query('canvas'); |
| * otherCanvas.width = 100; |
| * otherCanvas.height = 100; |
| * ctx.drawImage(otherCanvas, 590, 590); // will get clipped |
| * |
| * See also: |
| * |
| * * [CanvasImageSource] for more information on what data is retrieved |
| * from [source]. |
| * * [drawImage](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage) |
| * from the WHATWG. |
| */ |
| @DomName('CanvasRenderingContext2D.drawImage') |
| @JSName('drawImage') |
| void drawImage(CanvasImageSource source, num destX, num destY) native ; |
| |
| /** |
| * Draws an image from a CanvasImageSource to an area of this canvas. |
| * |
| * The image will be drawn to this context with its top left corner at the |
| * point ([destX], [destY]) and will be scaled to be [destWidth] wide and |
| * [destHeight] tall. |
| * |
| * If the image is larger than canvas |
| * will allow, the image will be clipped to fit the available space. |
| * |
| * CanvasElement canvas = new CanvasElement(width: 600, height: 600); |
| * CanvasRenderingContext2D ctx = canvas.context2D; |
| * ImageElement img = document.query('img'); |
| * img.width = 100; |
| * img.height = 100; |
| * |
| * // Scale the image to 300x50 at the point (20, 20) |
| * ctx.drawImageScaled(img, 20, 20, 300, 50); |
| * |
| * See also: |
| * |
| * * [CanvasImageSource] for more information on what data is retrieved |
| * from [source]. |
| * * [drawImage](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage) |
| * from the WHATWG. |
| */ |
| @DomName('CanvasRenderingContext2D.drawImage') |
| @JSName('drawImage') |
| void drawImageScaled(CanvasImageSource source, num destX, num destY, |
| num destWidth, num destHeight) native ; |
| |
| /** |
| * Draws an image from a CanvasImageSource to an area of this canvas. |
| * |
| * The image is a region of [source] that is [sourceWidth] wide and |
| * [destHeight] tall with top left corner at ([sourceX], [sourceY]). |
| * The image will be drawn to this context with its top left corner at the |
| * point ([destX], [destY]) and will be scaled to be [destWidth] wide and |
| * [destHeight] tall. |
| * |
| * If the image is larger than canvas |
| * will allow, the image will be clipped to fit the available space. |
| * |
| * VideoElement video = document.query('video'); |
| * video.width = 100; |
| * video.height = 100; |
| * // Take the middle 20x20 pixels from the video and stretch them. |
| * ctx.drawImageScaledFromSource(video, 40, 40, 20, 20, 50, 50, 100, 100); |
| * |
| * // Draw the top 100x20 pixels from the otherCanvas to this one. |
| * CanvasElement otherCanvas = document.query('canvas'); |
| * ctx.drawImageScaledFromSource(otherCanvas, 0, 0, 100, 20, 0, 0, 100, 20); |
| * |
| * See also: |
| * |
| * * [CanvasImageSource] for more information on what data is retrieved |
| * from [source]. |
| * * [drawImage](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage) |
| * from the WHATWG. |
| */ |
| @DomName('CanvasRenderingContext2D.drawImage') |
| @JSName('drawImage') |
| void drawImageScaledFromSource( |
| CanvasImageSource source, |
| num sourceX, |
| num sourceY, |
| num sourceWidth, |
| num sourceHeight, |
| num destX, |
| num destY, |
| num destWidth, |
| num destHeight) native ; |
| |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @SupportedBrowser(SupportedBrowser.IE, '11') |
| @Unstable() |
| @DomName('CanvasRenderingContext2D.lineDashOffset') |
| // TODO(14316): Firefox has this functionality with mozDashOffset, but it |
| // needs to be polyfilled. |
| num get lineDashOffset => |
| JS('num', '#.lineDashOffset || #.webkitLineDashOffset', this, this); |
| |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @SupportedBrowser(SupportedBrowser.IE, '11') |
| @Unstable() |
| @DomName('CanvasRenderingContext2D.lineDashOffset') |
| // TODO(14316): Firefox has this functionality with mozDashOffset, but it |
| // needs to be polyfilled. |
| set lineDashOffset(num value) { |
| JS( |
| 'void', |
| 'typeof #.lineDashOffset != "undefined" ? #.lineDashOffset = # : ' |
| '#.webkitLineDashOffset = #', |
| this, |
| this, |
| value, |
| this, |
| value); |
| } |
| |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @SupportedBrowser(SupportedBrowser.IE, '11') |
| @Unstable() |
| @DomName('CanvasRenderingContext2D.getLineDash') |
| List<num> getLineDash() { |
| // TODO(14316): Firefox has this functionality with mozDash, but it's a bit |
| // different. |
| if (JS('bool', '!!#.getLineDash', this)) { |
| return JS('List<num>', '#.getLineDash()', this); |
| } else if (JS('bool', '!!#.webkitLineDash', this)) { |
| return JS('List<num>', '#.webkitLineDash', this); |
| } |
| } |
| |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @SupportedBrowser(SupportedBrowser.IE, '11') |
| @Unstable() |
| @DomName('CanvasRenderingContext2D.setLineDash') |
| void setLineDash(List<num> dash) { |
| // TODO(14316): Firefox has this functionality with mozDash, but it's a bit |
| // different. |
| if (JS('bool', '!!#.setLineDash', this)) { |
| JS('void', '#.setLineDash(#)', this, dash); |
| } else if (JS('bool', '!!#.webkitLineDash', this)) { |
| JS('void', '#.webkitLineDash = #', this, dash); |
| } |
| } |
| |
| /** |
| * Draws text to the canvas. |
| * |
| * The text is drawn starting at coordinates ([x], [y]). |
| * If [maxWidth] is provided and the [text] is computed to be wider than |
| * [maxWidth], then the drawn text is scaled down horizontally to fit. |
| * |
| * The text uses the current [CanvasRenderingContext2D.font] property for font |
| * options, such as typeface and size, and the current |
| * [CanvasRenderingContext2D.fillStyle] for style options such as color. |
| * The current [CanvasRenderingContext2D.textAlign] and |
| * [CanvasRenderingContext2D.textBaseLine] properties are also applied to the |
| * drawn text. |
| */ |
| @DomName('CanvasRenderingContext2D.fillText') |
| void fillText(String text, num x, num y, [num maxWidth]) { |
| if (maxWidth != null) { |
| JS('void', '#.fillText(#, #, #, #)', this, text, x, y, maxWidth); |
| } else { |
| JS('void', '#.fillText(#, #, #)', this, text, x, y); |
| } |
| } |
| |
| @DomName('CanvasRenderingContext2D.fill') |
| void fill([String winding = 'nonzero']) { |
| JS('void', '#.fill(#)', this, winding); |
| } |
| |
| /** Deprecated always returns 1.0 */ |
| @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRation') |
| @Experimental() |
| @deprecated |
| double get backingStorePixelRatio => 1.0; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CharacterData') |
| @Native("CharacterData") |
| class CharacterData extends Node |
| implements NonDocumentTypeChildNode, ChildNode { |
| // To suppress missing implicit constructor warnings. |
| factory CharacterData._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CharacterData.data') |
| @DocsEditable() |
| String data; |
| |
| @DomName('CharacterData.length') |
| @DocsEditable() |
| final int length; |
| |
| @DomName('CharacterData.appendData') |
| @DocsEditable() |
| void appendData(String data) native ; |
| |
| @DomName('CharacterData.deleteData') |
| @DocsEditable() |
| void deleteData(int offset, int count) native ; |
| |
| @DomName('CharacterData.insertData') |
| @DocsEditable() |
| void insertData(int offset, String data) native ; |
| |
| @DomName('CharacterData.replaceData') |
| @DocsEditable() |
| void replaceData(int offset, int count, String data) native ; |
| |
| @DomName('CharacterData.substringData') |
| @DocsEditable() |
| String substringData(int offset, int count) native ; |
| |
| // From ChildNode |
| |
| @DomName('CharacterData.after') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void after(Object nodes) native ; |
| |
| @DomName('CharacterData.before') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void before(Object nodes) native ; |
| |
| // From NonDocumentTypeChildNode |
| |
| @DomName('CharacterData.nextElementSibling') |
| @DocsEditable() |
| final Element nextElementSibling; |
| |
| @DomName('CharacterData.previousElementSibling') |
| @DocsEditable() |
| final Element previousElementSibling; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('ChildNode') |
| @Experimental() // untriaged |
| abstract class ChildNode extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory ChildNode._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| void after(Object nodes); |
| |
| void before(Object nodes); |
| |
| void remove(); |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CHROMIUMValuebuffer') |
| @Experimental() // untriaged |
| @Native("CHROMIUMValuebuffer") |
| class ChromiumValuebuffer extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory ChromiumValuebuffer._() { |
| 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. |
| |
| @DocsEditable() |
| @DomName('CircularGeofencingRegion') |
| @Experimental() // untriaged |
| @Native("CircularGeofencingRegion") |
| class CircularGeofencingRegion extends GeofencingRegion { |
| // To suppress missing implicit constructor warnings. |
| factory CircularGeofencingRegion._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CircularGeofencingRegion.CircularGeofencingRegion') |
| @DocsEditable() |
| factory CircularGeofencingRegion(Map init) { |
| var init_1 = convertDartToNative_Dictionary(init); |
| return CircularGeofencingRegion._create_1(init_1); |
| } |
| static CircularGeofencingRegion _create_1(init) => |
| JS('CircularGeofencingRegion', 'new CircularGeofencingRegion(#)', init); |
| |
| @DomName('CircularGeofencingRegion.MAX_RADIUS') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const num MAX_RADIUS = 100.0; |
| |
| @DomName('CircularGeofencingRegion.MIN_RADIUS') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const num MIN_RADIUS = 1.0; |
| |
| @DomName('CircularGeofencingRegion.latitude') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final double latitude; |
| |
| @DomName('CircularGeofencingRegion.longitude') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final double longitude; |
| |
| @DomName('CircularGeofencingRegion.radius') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final double radius; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Client') |
| @Experimental() // untriaged |
| @Native("Client") |
| class Client extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Client._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Client.frameType') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String frameType; |
| |
| @DomName('Client.id') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String id; |
| |
| @DomName('Client.url') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String url; |
| |
| @DomName('Client.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void postMessage(/*SerializedScriptValue*/ message, |
| [List<MessagePort> transfer]) { |
| if (transfer != null) { |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_1(message_1, transfer); |
| return; |
| } |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_2(message_1); |
| return; |
| } |
| |
| @JSName('postMessage') |
| @DomName('Client.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_1(message, List<MessagePort> transfer) native ; |
| @JSName('postMessage') |
| @DomName('Client.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_2(message) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Clients') |
| @Experimental() // untriaged |
| @Native("Clients") |
| class Clients extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Clients._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Clients.claim') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future claim() native ; |
| |
| @DomName('Clients.matchAll') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future matchAll([Map options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| return _matchAll_1(options_1); |
| } |
| return _matchAll_2(); |
| } |
| |
| @JSName('matchAll') |
| @DomName('Clients.matchAll') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future _matchAll_1(options) native ; |
| @JSName('matchAll') |
| @DomName('Clients.matchAll') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future _matchAll_2() native ; |
| |
| @DomName('Clients.openWindow') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future openWindow(String url) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('ClipboardEvent') |
| @Experimental() // untriaged |
| @Native("ClipboardEvent") |
| class ClipboardEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory ClipboardEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('ClipboardEvent.clipboardData') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final DataTransfer clipboardData; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CloseEvent') |
| @Native("CloseEvent") |
| class CloseEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory CloseEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CloseEvent.CloseEvent') |
| @DocsEditable() |
| factory CloseEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return CloseEvent._create_1(type, eventInitDict_1); |
| } |
| return CloseEvent._create_2(type); |
| } |
| static CloseEvent _create_1(type, eventInitDict) => |
| JS('CloseEvent', 'new CloseEvent(#,#)', type, eventInitDict); |
| static CloseEvent _create_2(type) => |
| JS('CloseEvent', 'new CloseEvent(#)', type); |
| |
| @DomName('CloseEvent.code') |
| @DocsEditable() |
| final int code; |
| |
| @DomName('CloseEvent.reason') |
| @DocsEditable() |
| final String reason; |
| |
| @DomName('CloseEvent.wasClean') |
| @DocsEditable() |
| final bool wasClean; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Comment') |
| @Native("Comment") |
| class Comment extends CharacterData { |
| factory Comment([String data]) { |
| if (data != null) { |
| return JS('Comment', '#.createComment(#)', document, data); |
| } |
| return JS('Comment', '#.createComment("")', document); |
| } |
| // To suppress missing implicit constructor warnings. |
| factory Comment._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| } |
| // 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. |
| |
| // WARNING: Do not edit - generated code. |
| |
| @DomName('CompositionEvent') |
| @Native("CompositionEvent") |
| class CompositionEvent extends UIEvent { |
| factory CompositionEvent(String type, |
| {bool canBubble: false, |
| bool cancelable: false, |
| Window view, |
| String data, |
| String locale}) { |
| if (view == null) { |
| view = window; |
| } |
| CompositionEvent e = document._createEvent("CompositionEvent"); |
| |
| if (Device.isFirefox) { |
| // Firefox requires the locale parameter that isn't supported elsewhere. |
| JS('void', '#.initCompositionEvent(#, #, #, #, #, #)', e, type, canBubble, |
| cancelable, view, data, locale); |
| } else { |
| e._initCompositionEvent(type, canBubble, cancelable, view, data); |
| } |
| |
| return e; |
| } |
| |
| @DomName('CompositionEvent.CompositionEvent') |
| @DocsEditable() |
| factory CompositionEvent._(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return CompositionEvent._create_1(type, eventInitDict_1); |
| } |
| return CompositionEvent._create_2(type); |
| } |
| static CompositionEvent _create_1(type, eventInitDict) => |
| JS('CompositionEvent', 'new CompositionEvent(#,#)', type, eventInitDict); |
| static CompositionEvent _create_2(type) => |
| JS('CompositionEvent', 'new CompositionEvent(#)', type); |
| |
| @DomName('CompositionEvent.data') |
| @DocsEditable() |
| final String data; |
| |
| @JSName('initCompositionEvent') |
| @DomName('CompositionEvent.initCompositionEvent') |
| @DocsEditable() |
| void _initCompositionEvent(String type, bool bubbles, bool cancelable, |
| Window view, String data) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CompositorProxy') |
| @Experimental() // untriaged |
| @Native("CompositorProxy") |
| class CompositorProxy extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CompositorProxy._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CompositorProxy.CompositorProxy') |
| @DocsEditable() |
| factory CompositorProxy(Element element, List<String> attributeArray) { |
| return CompositorProxy._create_1(element, attributeArray); |
| } |
| static CompositorProxy _create_1(element, attributeArray) => JS( |
| 'CompositorProxy', 'new CompositorProxy(#,#)', element, attributeArray); |
| |
| @DomName('CompositorProxy.opacity') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num opacity; |
| |
| @DomName('CompositorProxy.scrollLeft') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num scrollLeft; |
| |
| @DomName('CompositorProxy.scrollTop') |
| @DocsEditable() |
| @Experimental() // untriaged |
| num scrollTop; |
| |
| @DomName('CompositorProxy.transform') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix transform; |
| |
| @DomName('CompositorProxy.disconnect') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void disconnect() native ; |
| |
| @DomName('CompositorProxy.supports') |
| @DocsEditable() |
| @Experimental() // untriaged |
| bool supports(String attribute) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CompositorWorker') |
| @Experimental() // untriaged |
| @Native("CompositorWorker") |
| class CompositorWorker extends EventTarget implements AbstractWorker { |
| // To suppress missing implicit constructor warnings. |
| factory CompositorWorker._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CompositorWorker.errorEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> errorEvent = |
| const EventStreamProvider<Event>('error'); |
| |
| @DomName('CompositorWorker.messageEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<MessageEvent> messageEvent = |
| const EventStreamProvider<MessageEvent>('message'); |
| |
| @DomName('CompositorWorker.CompositorWorker') |
| @DocsEditable() |
| factory CompositorWorker(String scriptUrl) { |
| return CompositorWorker._create_1(scriptUrl); |
| } |
| static CompositorWorker _create_1(scriptUrl) => |
| JS('CompositorWorker', 'new CompositorWorker(#)', scriptUrl); |
| |
| @DomName('CompositorWorker.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void postMessage(/*SerializedScriptValue*/ message, |
| [List<MessagePort> transfer]) { |
| if (transfer != null) { |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_1(message_1, transfer); |
| return; |
| } |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_2(message_1); |
| return; |
| } |
| |
| @JSName('postMessage') |
| @DomName('CompositorWorker.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_1(message, List<MessagePort> transfer) native ; |
| @JSName('postMessage') |
| @DomName('CompositorWorker.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_2(message) native ; |
| |
| @DomName('CompositorWorker.terminate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void terminate() native ; |
| |
| @DomName('CompositorWorker.onerror') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onError => errorEvent.forTarget(this); |
| |
| @DomName('CompositorWorker.onmessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<MessageEvent> get onMessage => messageEvent.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. |
| |
| @DocsEditable() |
| @DomName('CompositorWorkerGlobalScope') |
| @Experimental() // untriaged |
| @Native("CompositorWorkerGlobalScope") |
| class CompositorWorkerGlobalScope extends WorkerGlobalScope { |
| // To suppress missing implicit constructor warnings. |
| factory CompositorWorkerGlobalScope._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CompositorWorkerGlobalScope.messageEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<MessageEvent> messageEvent = |
| const EventStreamProvider<MessageEvent>('message'); |
| |
| @DomName('CompositorWorkerGlobalScope.cancelAnimationFrame') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void cancelAnimationFrame(int handle) native ; |
| |
| @DomName('CompositorWorkerGlobalScope.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void postMessage(/*any*/ message, [List<MessagePort> transfer]) { |
| if (transfer != null) { |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_1(message_1, transfer); |
| return; |
| } |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_2(message_1); |
| return; |
| } |
| |
| @JSName('postMessage') |
| @DomName('CompositorWorkerGlobalScope.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_1(message, List<MessagePort> transfer) native ; |
| @JSName('postMessage') |
| @DomName('CompositorWorkerGlobalScope.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_2(message) native ; |
| |
| @DomName('CompositorWorkerGlobalScope.requestAnimationFrame') |
| @DocsEditable() |
| @Experimental() // untriaged |
| int requestAnimationFrame(FrameRequestCallback callback) native ; |
| |
| @DomName('CompositorWorkerGlobalScope.onmessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<MessageEvent> get onMessage => messageEvent.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. |
| |
| @DomName('Console') |
| class Console { |
| const Console._safe(); |
| |
| static const Console _safeConsole = const Console._safe(); |
| |
| bool get _isConsoleDefined => JS('bool', 'typeof console != "undefined"'); |
| |
| @DomName('Console.memory') |
| MemoryInfo get memory => |
| _isConsoleDefined ? JS('MemoryInfo', 'console.memory') : null; |
| |
| @DomName('Console.assertCondition') |
| void assertCondition(bool condition, Object arg) => _isConsoleDefined |
| ? JS('void', 'console.assertCondition(#, #)', condition, arg) |
| : null; |
| |
| @DomName('Console.clear') |
| void clear(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.clear(#)', arg) : null; |
| |
| @DomName('Console.count') |
| void count(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.count(#)', arg) : null; |
| |
| @DomName('Console.debug') |
| void debug(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.debug(#)', arg) : null; |
| |
| @DomName('Console.dir') |
| void dir(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.dir(#)', arg) : null; |
| |
| @DomName('Console.dirxml') |
| void dirxml(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.dirxml(#)', arg) : null; |
| |
| @DomName('Console.error') |
| void error(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.error(#)', arg) : null; |
| |
| @DomName('Console.group') |
| void group(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.group(#)', arg) : null; |
| |
| @DomName('Console.groupCollapsed') |
| void groupCollapsed(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.groupCollapsed(#)', arg) : null; |
| |
| @DomName('Console.groupEnd') |
| void groupEnd() => |
| _isConsoleDefined ? JS('void', 'console.groupEnd()') : null; |
| |
| @DomName('Console.info') |
| void info(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.info(#)', arg) : null; |
| |
| @DomName('Console.log') |
| void log(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.log(#)', arg) : null; |
| |
| @DomName('Console.markTimeline') |
| void markTimeline(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.markTimeline(#)', arg) : null; |
| |
| @DomName('Console.profile') |
| void profile(String title) => |
| _isConsoleDefined ? JS('void', 'console.profile(#)', title) : null; |
| |
| @DomName('Console.profileEnd') |
| void profileEnd(String title) => |
| _isConsoleDefined ? JS('void', 'console.profileEnd(#)', title) : null; |
| |
| @DomName('Console.table') |
| void table(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.table(#)', arg) : null; |
| |
| @DomName('Console.time') |
| void time(String title) => |
| _isConsoleDefined ? JS('void', 'console.time(#)', title) : null; |
| |
| @DomName('Console.timeEnd') |
| void timeEnd(String title) => |
| _isConsoleDefined ? JS('void', 'console.timeEnd(#)', title) : null; |
| |
| @DomName('Console.timeStamp') |
| void timeStamp(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.timeStamp(#)', arg) : null; |
| |
| @DomName('Console.trace') |
| void trace(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.trace(#)', arg) : null; |
| |
| @DomName('Console.warn') |
| void warn(Object arg) => |
| _isConsoleDefined ? JS('void', 'console.warn(#)', arg) : null; |
| // To suppress missing implicit constructor warnings. |
| factory Console._() { |
| 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. |
| |
| @DocsEditable() |
| @DomName('ConsoleBase') |
| @Experimental() // untriaged |
| @Native("ConsoleBase") |
| class ConsoleBase extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory ConsoleBase._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('assert') |
| @DomName('ConsoleBase.assert') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void assertCondition(bool condition, Object arg) native ; |
| |
| @DomName('ConsoleBase.timeline') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void timeline(String title) native ; |
| |
| @DomName('ConsoleBase.timelineEnd') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void timelineEnd(String title) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLContentElement') |
| @SupportedBrowser(SupportedBrowser.CHROME, '26') |
| @Experimental() |
| // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#content-element |
| @Native("HTMLContentElement") |
| class ContentElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory ContentElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('HTMLContentElement.HTMLContentElement') |
| @DocsEditable() |
| factory ContentElement() => document.createElement("content"); |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| ContentElement.created() : super.created(); |
| |
| /// Checks if this type is supported on the current platform. |
| static bool get supported => Element.isTagSupported('content'); |
| |
| @DomName('HTMLContentElement.select') |
| @DocsEditable() |
| String select; |
| |
| @DomName('HTMLContentElement.getDistributedNodes') |
| @DocsEditable() |
| @Returns('NodeList') |
| @Creates('NodeList') |
| List<Node> getDistributedNodes() native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Coordinates') |
| @Native("Coordinates") |
| class Coordinates extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Coordinates._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Coordinates.accuracy') |
| @DocsEditable() |
| final double accuracy; |
| |
| @DomName('Coordinates.altitude') |
| @DocsEditable() |
| final double altitude; |
| |
| @DomName('Coordinates.altitudeAccuracy') |
| @DocsEditable() |
| final double altitudeAccuracy; |
| |
| @DomName('Coordinates.heading') |
| @DocsEditable() |
| final double heading; |
| |
| @DomName('Coordinates.latitude') |
| @DocsEditable() |
| final double latitude; |
| |
| @DomName('Coordinates.longitude') |
| @DocsEditable() |
| final double longitude; |
| |
| @DomName('Coordinates.speed') |
| @DocsEditable() |
| final double speed; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Credential') |
| @Experimental() // untriaged |
| @Native("Credential") |
| class Credential extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Credential._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('iconURL') |
| @DomName('Credential.iconURL') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String iconUrl; |
| |
| @DomName('Credential.id') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String id; |
| |
| @DomName('Credential.name') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String name; |
| |
| @DomName('Credential.type') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String type; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CredentialsContainer') |
| @Experimental() // untriaged |
| @Native("CredentialsContainer") |
| class CredentialsContainer extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CredentialsContainer._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CredentialsContainer.notifySignedIn') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future notifySignedIn(Credential credential) native ; |
| |
| @DomName('CredentialsContainer.request') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future request([Map options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| return _request_1(options_1); |
| } |
| return _request_2(); |
| } |
| |
| @JSName('request') |
| @DomName('CredentialsContainer.request') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future _request_1(options) native ; |
| @JSName('request') |
| @DomName('CredentialsContainer.request') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future _request_2() native ; |
| |
| @DomName('CredentialsContainer.requireUserMediation') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Future requireUserMediation() native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CrossOriginConnectEvent') |
| @Experimental() // untriaged |
| @Native("CrossOriginConnectEvent") |
| class CrossOriginConnectEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory CrossOriginConnectEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CrossOriginConnectEvent.client') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final CrossOriginServiceWorkerClient client; |
| |
| @DomName('CrossOriginConnectEvent.acceptConnection') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void acceptConnection(Future shouldAccept) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CrossOriginServiceWorkerClient') |
| @Experimental() // untriaged |
| @Native("CrossOriginServiceWorkerClient") |
| class CrossOriginServiceWorkerClient extends EventTarget { |
| // To suppress missing implicit constructor warnings. |
| factory CrossOriginServiceWorkerClient._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CrossOriginServiceWorkerClient.origin') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String origin; |
| |
| @DomName('CrossOriginServiceWorkerClient.targetUrl') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String targetUrl; |
| |
| @DomName('CrossOriginServiceWorkerClient.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void postMessage(/*SerializedScriptValue*/ message, |
| [List<MessagePort> transfer]) { |
| if (transfer != null) { |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_1(message_1, transfer); |
| return; |
| } |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_2(message_1); |
| return; |
| } |
| |
| @JSName('postMessage') |
| @DomName('CrossOriginServiceWorkerClient.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_1(message, List<MessagePort> transfer) native ; |
| @JSName('postMessage') |
| @DomName('CrossOriginServiceWorkerClient.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_2(message) native ; |
| } |
| // Copyright (c) 2015, 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('Crypto') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // http://www.w3.org/TR/WebCryptoAPI/ |
| @Native("Crypto") |
| class Crypto extends Interceptor { |
| TypedData getRandomValues(TypedData array) { |
| return _getRandomValues(array); |
| } |
| |
| // To suppress missing implicit constructor warnings. |
| factory Crypto._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| /// Checks if this type is supported on the current platform. |
| static bool get supported => |
| JS('bool', '!!(window.crypto && window.crypto.getRandomValues)'); |
| |
| @DomName('Crypto.subtle') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final _SubtleCrypto subtle; |
| |
| @JSName('getRandomValues') |
| @DomName('Crypto.getRandomValues') |
| @DocsEditable() |
| @Creates('TypedData') |
| @Returns('TypedData|Null') |
| TypedData _getRandomValues(TypedData array) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CryptoKey') |
| @Experimental() // untriaged |
| @Native("CryptoKey") |
| class CryptoKey extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CryptoKey._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CryptoKey.algorithm') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Creates('Null') |
| final Object algorithm; |
| |
| @DomName('CryptoKey.extractable') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final bool extractable; |
| |
| @DomName('CryptoKey.type') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String type; |
| |
| @DomName('CryptoKey.usages') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final List<String> usages; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSS') |
| // http://www.w3.org/TR/css3-conditional/#the-css-interface |
| @Experimental() // None |
| @Native("CSS") |
| class Css extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Css._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSS.supports') |
| @DocsEditable() |
| static bool supports(String property, String value) native ; |
| |
| @JSName('supports') |
| @DomName('CSS.supports') |
| @DocsEditable() |
| static bool supportsCondition(String conditionText) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSCharsetRule') |
| // http://dev.w3.org/csswg/cssom/#the-csscharsetrule-interface |
| @Experimental() |
| @Native("CSSCharsetRule") |
| class CssCharsetRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssCharsetRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSCharsetRule.encoding') |
| @DocsEditable() |
| String encoding; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSFontFaceRule') |
| @Native("CSSFontFaceRule") |
| class CssFontFaceRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssFontFaceRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSFontFaceRule.style') |
| @DocsEditable() |
| final CssStyleDeclaration style; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSGroupingRule') |
| @Experimental() // untriaged |
| @Native("CSSGroupingRule") |
| class CssGroupingRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssGroupingRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSGroupingRule.cssRules') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| final List<CssRule> cssRules; |
| |
| @DomName('CSSGroupingRule.deleteRule') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void deleteRule(int index) native ; |
| |
| @DomName('CSSGroupingRule.insertRule') |
| @DocsEditable() |
| @Experimental() // untriaged |
| int insertRule(String rule, int index) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSImportRule') |
| @Native("CSSImportRule") |
| class CssImportRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssImportRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSImportRule.href') |
| @DocsEditable() |
| final String href; |
| |
| @DomName('CSSImportRule.media') |
| @DocsEditable() |
| final MediaList media; |
| |
| @DomName('CSSImportRule.styleSheet') |
| @DocsEditable() |
| final CssStyleSheet styleSheet; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSKeyframeRule') |
| @Experimental() // untriaged |
| @Native("CSSKeyframeRule,MozCSSKeyframeRule,WebKitCSSKeyframeRule") |
| class CssKeyframeRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssKeyframeRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSKeyframeRule.keyText') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String keyText; |
| |
| @DomName('CSSKeyframeRule.style') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final CssStyleDeclaration style; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSKeyframesRule') |
| @Experimental() // untriaged |
| @Native("CSSKeyframesRule,MozCSSKeyframesRule,WebKitCSSKeyframesRule") |
| class CssKeyframesRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssKeyframesRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSKeyframesRule.cssRules') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| final List<CssRule> cssRules; |
| |
| @DomName('CSSKeyframesRule.name') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String name; |
| |
| @DomName('CSSKeyframesRule.__getter__') |
| @DocsEditable() |
| @Experimental() // untriaged |
| CssKeyframeRule __getter__(int index) native ; |
| |
| @DomName('CSSKeyframesRule.appendRule') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void appendRule(String rule) native ; |
| |
| @DomName('CSSKeyframesRule.deleteRule') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void deleteRule(String select) native ; |
| |
| @DomName('CSSKeyframesRule.findRule') |
| @DocsEditable() |
| @Experimental() // untriaged |
| CssKeyframeRule findRule(String select) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSMediaRule') |
| @Native("CSSMediaRule") |
| class CssMediaRule extends CssGroupingRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssMediaRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSMediaRule.media') |
| @DocsEditable() |
| final MediaList media; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSPageRule') |
| @Native("CSSPageRule") |
| class CssPageRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssPageRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSPageRule.selectorText') |
| @DocsEditable() |
| String selectorText; |
| |
| @DomName('CSSPageRule.style') |
| @DocsEditable() |
| final CssStyleDeclaration style; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSRule') |
| @Native("CSSRule") |
| class CssRule extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CssRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSRule.CHARSET_RULE') |
| @DocsEditable() |
| static const int CHARSET_RULE = 2; |
| |
| @DomName('CSSRule.FONT_FACE_RULE') |
| @DocsEditable() |
| static const int FONT_FACE_RULE = 5; |
| |
| @DomName('CSSRule.IMPORT_RULE') |
| @DocsEditable() |
| static const int IMPORT_RULE = 3; |
| |
| @DomName('CSSRule.KEYFRAMES_RULE') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const int KEYFRAMES_RULE = 7; |
| |
| @DomName('CSSRule.KEYFRAME_RULE') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const int KEYFRAME_RULE = 8; |
| |
| @DomName('CSSRule.MEDIA_RULE') |
| @DocsEditable() |
| static const int MEDIA_RULE = 4; |
| |
| @DomName('CSSRule.PAGE_RULE') |
| @DocsEditable() |
| static const int PAGE_RULE = 6; |
| |
| @DomName('CSSRule.STYLE_RULE') |
| @DocsEditable() |
| static const int STYLE_RULE = 1; |
| |
| @DomName('CSSRule.SUPPORTS_RULE') |
| @DocsEditable() |
| static const int SUPPORTS_RULE = 12; |
| |
| @DomName('CSSRule.VIEWPORT_RULE') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const int VIEWPORT_RULE = 15; |
| |
| @DomName('CSSRule.WEBKIT_KEYFRAMES_RULE') |
| @DocsEditable() |
| // http://www.w3.org/TR/css3-animations/#cssrule |
| @Experimental() |
| static const int WEBKIT_KEYFRAMES_RULE = 7; |
| |
| @DomName('CSSRule.WEBKIT_KEYFRAME_RULE') |
| @DocsEditable() |
| // http://www.w3.org/TR/css3-animations/#cssrule |
| @Experimental() |
| static const int WEBKIT_KEYFRAME_RULE = 8; |
| |
| @DomName('CSSRule.cssText') |
| @DocsEditable() |
| String cssText; |
| |
| @DomName('CSSRule.parentRule') |
| @DocsEditable() |
| final CssRule parentRule; |
| |
| @DomName('CSSRule.parentStyleSheet') |
| @DocsEditable() |
| final CssStyleSheet parentStyleSheet; |
| |
| @DomName('CSSRule.type') |
| @DocsEditable() |
| final int type; |
| } |
| |
| // Copyright (c) 2014, 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 THIS TEMPLATE FILE. |
| // The template file was generated by scripts/css_code_generator.py |
| |
| // Source of CSS properties: |
| // CSSPropertyNames.in |
| |
| @DomName('CSSStyleDeclaration') |
| @Native("CSSStyleDeclaration,MSStyleCSSProperties,CSS2Properties") |
| class CssStyleDeclaration extends Interceptor with CssStyleDeclarationBase { |
| factory CssStyleDeclaration() => new CssStyleDeclaration.css(''); |
| |
| factory CssStyleDeclaration.css(String css) { |
| final style = new Element.tag('div').style; |
| style.cssText = css; |
| return style; |
| } |
| |
| String getPropertyValue(String propertyName) { |
| var propValue = _getPropertyValueHelper(propertyName); |
| return propValue != null ? propValue : ''; |
| } |
| |
| String _getPropertyValueHelper(String propertyName) { |
| if (_supportsProperty(_camelCase(propertyName))) { |
| return _getPropertyValue(propertyName); |
| } else { |
| return _getPropertyValue(Device.cssPrefix + propertyName); |
| } |
| } |
| |
| /** |
| * Returns true if the provided *CSS* property name is supported on this |
| * element. |
| * |
| * Please note the property name camelCase, not-hyphens. This |
| * method returns true if the property is accessible via an unprefixed _or_ |
| * prefixed property. |
| */ |
| bool supportsProperty(String propertyName) { |
| return _supportsProperty(propertyName) || |
| _supportsProperty(_camelCase(Device.cssPrefix + propertyName)); |
| } |
| |
| bool _supportsProperty(String propertyName) { |
| return JS('bool', '# in #', propertyName, this); |
| } |
| |
| @DomName('CSSStyleDeclaration.setProperty') |
| void setProperty(String propertyName, String value, [String priority]) { |
| return _setPropertyHelper( |
| _browserPropertyName(propertyName), value, priority); |
| } |
| |
| String _browserPropertyName(String propertyName) { |
| String name = _readCache(propertyName); |
| if (name is String) return name; |
| if (_supportsProperty(_camelCase(propertyName))) { |
| name = propertyName; |
| } else { |
| name = Device.cssPrefix + propertyName; |
| } |
| _writeCache(propertyName, name); |
| return name; |
| } |
| |
| static final _propertyCache = JS('', '{}'); |
| static String _readCache(String key) => |
| JS('String|Null', '#[#]', _propertyCache, key); |
| static void _writeCache(String key, String value) { |
| JS('void', '#[#] = #', _propertyCache, key, value); |
| } |
| |
| static String _camelCase(String hyphenated) { |
| var replacedMs = JS('String', r'#.replace(/^-ms-/, "ms-")', hyphenated); |
| return JS( |
| 'String', |
| r'#.replace(/-([\da-z])/ig, (_, letter) => letter.toUpperCase())', |
| replacedMs); |
| } |
| |
| void _setPropertyHelper(String propertyName, String value, |
| [String priority]) { |
| if (value == null) value = ''; |
| if (priority == null) priority = ''; |
| JS('void', '#.setProperty(#, #, #)', this, propertyName, value, priority); |
| } |
| |
| /** |
| * Checks to see if CSS Transitions are supported. |
| */ |
| static bool get supportsTransitions { |
| return document.body.style.supportsProperty('transition'); |
| } |
| |
| // To suppress missing implicit constructor warnings. |
| factory CssStyleDeclaration._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSStyleDeclaration.cssText') |
| @DocsEditable() |
| String cssText; |
| |
| @DomName('CSSStyleDeclaration.length') |
| @DocsEditable() |
| final int length; |
| |
| @DomName('CSSStyleDeclaration.parentRule') |
| @DocsEditable() |
| final CssRule parentRule; |
| |
| @DomName('CSSStyleDeclaration.getPropertyPriority') |
| @DocsEditable() |
| String getPropertyPriority(String property) native ; |
| |
| @JSName('getPropertyValue') |
| @DomName('CSSStyleDeclaration.getPropertyValue') |
| @DocsEditable() |
| String _getPropertyValue(String property) native ; |
| |
| @DomName('CSSStyleDeclaration.item') |
| @DocsEditable() |
| String item(int index) native ; |
| |
| @DomName('CSSStyleDeclaration.removeProperty') |
| @DocsEditable() |
| String removeProperty(String property) native ; |
| |
| /** Gets the value of "background" */ |
| String get background => this._background; |
| |
| /** Sets the value of "background" */ |
| set background(String value) { |
| _background = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('background') |
| String _background; |
| |
| /** Gets the value of "background-attachment" */ |
| String get backgroundAttachment => this._backgroundAttachment; |
| |
| /** Sets the value of "background-attachment" */ |
| set backgroundAttachment(String value) { |
| _backgroundAttachment = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('backgroundAttachment') |
| String _backgroundAttachment; |
| |
| /** Gets the value of "background-color" */ |
| String get backgroundColor => this._backgroundColor; |
| |
| /** Sets the value of "background-color" */ |
| set backgroundColor(String value) { |
| _backgroundColor = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('backgroundColor') |
| String _backgroundColor; |
| |
| /** Gets the value of "background-image" */ |
| String get backgroundImage => this._backgroundImage; |
| |
| /** Sets the value of "background-image" */ |
| set backgroundImage(String value) { |
| _backgroundImage = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('backgroundImage') |
| String _backgroundImage; |
| |
| /** Gets the value of "background-position" */ |
| String get backgroundPosition => this._backgroundPosition; |
| |
| /** Sets the value of "background-position" */ |
| set backgroundPosition(String value) { |
| _backgroundPosition = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('backgroundPosition') |
| String _backgroundPosition; |
| |
| /** Gets the value of "background-repeat" */ |
| String get backgroundRepeat => this._backgroundRepeat; |
| |
| /** Sets the value of "background-repeat" */ |
| set backgroundRepeat(String value) { |
| _backgroundRepeat = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('backgroundRepeat') |
| String _backgroundRepeat; |
| |
| /** Gets the value of "border" */ |
| String get border => this._border; |
| |
| /** Sets the value of "border" */ |
| set border(String value) { |
| _border = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('border') |
| String _border; |
| |
| /** Gets the value of "border-bottom" */ |
| String get borderBottom => this._borderBottom; |
| |
| /** Sets the value of "border-bottom" */ |
| set borderBottom(String value) { |
| _borderBottom = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderBottom') |
| String _borderBottom; |
| |
| /** Gets the value of "border-bottom-color" */ |
| String get borderBottomColor => this._borderBottomColor; |
| |
| /** Sets the value of "border-bottom-color" */ |
| set borderBottomColor(String value) { |
| _borderBottomColor = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderBottomColor') |
| String _borderBottomColor; |
| |
| /** Gets the value of "border-bottom-style" */ |
| String get borderBottomStyle => this._borderBottomStyle; |
| |
| /** Sets the value of "border-bottom-style" */ |
| set borderBottomStyle(String value) { |
| _borderBottomStyle = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderBottomStyle') |
| String _borderBottomStyle; |
| |
| /** Gets the value of "border-bottom-width" */ |
| String get borderBottomWidth => this._borderBottomWidth; |
| |
| /** Sets the value of "border-bottom-width" */ |
| set borderBottomWidth(String value) { |
| _borderBottomWidth = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderBottomWidth') |
| String _borderBottomWidth; |
| |
| /** Gets the value of "border-collapse" */ |
| String get borderCollapse => this._borderCollapse; |
| |
| /** Sets the value of "border-collapse" */ |
| set borderCollapse(String value) { |
| _borderCollapse = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderCollapse') |
| String _borderCollapse; |
| |
| /** Gets the value of "border-color" */ |
| String get borderColor => this._borderColor; |
| |
| /** Sets the value of "border-color" */ |
| set borderColor(String value) { |
| _borderColor = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderColor') |
| String _borderColor; |
| |
| /** Gets the value of "border-left" */ |
| String get borderLeft => this._borderLeft; |
| |
| /** Sets the value of "border-left" */ |
| set borderLeft(String value) { |
| _borderLeft = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderLeft') |
| String _borderLeft; |
| |
| /** Gets the value of "border-left-color" */ |
| String get borderLeftColor => this._borderLeftColor; |
| |
| /** Sets the value of "border-left-color" */ |
| set borderLeftColor(String value) { |
| _borderLeftColor = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderLeftColor') |
| String _borderLeftColor; |
| |
| /** Gets the value of "border-left-style" */ |
| String get borderLeftStyle => this._borderLeftStyle; |
| |
| /** Sets the value of "border-left-style" */ |
| set borderLeftStyle(String value) { |
| _borderLeftStyle = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderLeftStyle') |
| String _borderLeftStyle; |
| |
| /** Gets the value of "border-left-width" */ |
| String get borderLeftWidth => this._borderLeftWidth; |
| |
| /** Sets the value of "border-left-width" */ |
| set borderLeftWidth(String value) { |
| _borderLeftWidth = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderLeftWidth') |
| String _borderLeftWidth; |
| |
| /** Gets the value of "border-right" */ |
| String get borderRight => this._borderRight; |
| |
| /** Sets the value of "border-right" */ |
| set borderRight(String value) { |
| _borderRight = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderRight') |
| String _borderRight; |
| |
| /** Gets the value of "border-right-color" */ |
| String get borderRightColor => this._borderRightColor; |
| |
| /** Sets the value of "border-right-color" */ |
| set borderRightColor(String value) { |
| _borderRightColor = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderRightColor') |
| String _borderRightColor; |
| |
| /** Gets the value of "border-right-style" */ |
| String get borderRightStyle => this._borderRightStyle; |
| |
| /** Sets the value of "border-right-style" */ |
| set borderRightStyle(String value) { |
| _borderRightStyle = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderRightStyle') |
| String _borderRightStyle; |
| |
| /** Gets the value of "border-right-width" */ |
| String get borderRightWidth => this._borderRightWidth; |
| |
| /** Sets the value of "border-right-width" */ |
| set borderRightWidth(String value) { |
| _borderRightWidth = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderRightWidth') |
| String _borderRightWidth; |
| |
| /** Gets the value of "border-spacing" */ |
| String get borderSpacing => this._borderSpacing; |
| |
| /** Sets the value of "border-spacing" */ |
| set borderSpacing(String value) { |
| _borderSpacing = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderSpacing') |
| String _borderSpacing; |
| |
| /** Gets the value of "border-style" */ |
| String get borderStyle => this._borderStyle; |
| |
| /** Sets the value of "border-style" */ |
| set borderStyle(String value) { |
| _borderStyle = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderStyle') |
| String _borderStyle; |
| |
| /** Gets the value of "border-top" */ |
| String get borderTop => this._borderTop; |
| |
| /** Sets the value of "border-top" */ |
| set borderTop(String value) { |
| _borderTop = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderTop') |
| String _borderTop; |
| |
| /** Gets the value of "border-top-color" */ |
| String get borderTopColor => this._borderTopColor; |
| |
| /** Sets the value of "border-top-color" */ |
| set borderTopColor(String value) { |
| _borderTopColor = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderTopColor') |
| String _borderTopColor; |
| |
| /** Gets the value of "border-top-style" */ |
| String get borderTopStyle => this._borderTopStyle; |
| |
| /** Sets the value of "border-top-style" */ |
| set borderTopStyle(String value) { |
| _borderTopStyle = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderTopStyle') |
| String _borderTopStyle; |
| |
| /** Gets the value of "border-top-width" */ |
| String get borderTopWidth => this._borderTopWidth; |
| |
| /** Sets the value of "border-top-width" */ |
| set borderTopWidth(String value) { |
| _borderTopWidth = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderTopWidth') |
| String _borderTopWidth; |
| |
| /** Gets the value of "border-width" */ |
| String get borderWidth => this._borderWidth; |
| |
| /** Sets the value of "border-width" */ |
| set borderWidth(String value) { |
| _borderWidth = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('borderWidth') |
| String _borderWidth; |
| |
| /** Gets the value of "bottom" */ |
| String get bottom => this._bottom; |
| |
| /** Sets the value of "bottom" */ |
| set bottom(String value) { |
| _bottom = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('bottom') |
| String _bottom; |
| |
| /** Gets the value of "caption-side" */ |
| String get captionSide => this._captionSide; |
| |
| /** Sets the value of "caption-side" */ |
| set captionSide(String value) { |
| _captionSide = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('captionSide') |
| String _captionSide; |
| |
| /** Gets the value of "clear" */ |
| String get clear => this._clear; |
| |
| /** Sets the value of "clear" */ |
| set clear(String value) { |
| _clear = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('clear') |
| String _clear; |
| |
| /** Gets the value of "clip" */ |
| String get clip => this._clip; |
| |
| /** Sets the value of "clip" */ |
| set clip(String value) { |
| _clip = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('clip') |
| String _clip; |
| |
| /** Gets the value of "color" */ |
| String get color => this._color; |
| |
| /** Sets the value of "color" */ |
| set color(String value) { |
| _color = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('color') |
| String _color; |
| |
| /** Gets the value of "content" */ |
| String get content => this._content; |
| |
| /** Sets the value of "content" */ |
| set content(String value) { |
| _content = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('content') |
| String _content; |
| |
| /** Gets the value of "cursor" */ |
| String get cursor => this._cursor; |
| |
| /** Sets the value of "cursor" */ |
| set cursor(String value) { |
| _cursor = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('cursor') |
| String _cursor; |
| |
| /** Gets the value of "direction" */ |
| String get direction => this._direction; |
| |
| /** Sets the value of "direction" */ |
| set direction(String value) { |
| _direction = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('direction') |
| String _direction; |
| |
| /** Gets the value of "display" */ |
| String get display => this._display; |
| |
| /** Sets the value of "display" */ |
| set display(String value) { |
| _display = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('display') |
| String _display; |
| |
| /** Gets the value of "empty-cells" */ |
| String get emptyCells => this._emptyCells; |
| |
| /** Sets the value of "empty-cells" */ |
| set emptyCells(String value) { |
| _emptyCells = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('emptyCells') |
| String _emptyCells; |
| |
| /** Gets the value of "font" */ |
| String get font => this._font; |
| |
| /** Sets the value of "font" */ |
| set font(String value) { |
| _font = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('font') |
| String _font; |
| |
| /** Gets the value of "font-family" */ |
| String get fontFamily => this._fontFamily; |
| |
| /** Sets the value of "font-family" */ |
| set fontFamily(String value) { |
| _fontFamily = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('fontFamily') |
| String _fontFamily; |
| |
| /** Gets the value of "font-size" */ |
| String get fontSize => this._fontSize; |
| |
| /** Sets the value of "font-size" */ |
| set fontSize(String value) { |
| _fontSize = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('fontSize') |
| String _fontSize; |
| |
| /** Gets the value of "font-style" */ |
| String get fontStyle => this._fontStyle; |
| |
| /** Sets the value of "font-style" */ |
| set fontStyle(String value) { |
| _fontStyle = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('fontStyle') |
| String _fontStyle; |
| |
| /** Gets the value of "font-variant" */ |
| String get fontVariant => this._fontVariant; |
| |
| /** Sets the value of "font-variant" */ |
| set fontVariant(String value) { |
| _fontVariant = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('fontVariant') |
| String _fontVariant; |
| |
| /** Gets the value of "font-weight" */ |
| String get fontWeight => this._fontWeight; |
| |
| /** Sets the value of "font-weight" */ |
| set fontWeight(String value) { |
| _fontWeight = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('fontWeight') |
| String _fontWeight; |
| |
| /** Gets the value of "height" */ |
| String get height => this._height; |
| |
| /** Sets the value of "height" */ |
| set height(String value) { |
| _height = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('height') |
| String _height; |
| |
| /** Gets the value of "left" */ |
| String get left => this._left; |
| |
| /** Sets the value of "left" */ |
| set left(String value) { |
| _left = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('left') |
| String _left; |
| |
| /** Gets the value of "letter-spacing" */ |
| String get letterSpacing => this._letterSpacing; |
| |
| /** Sets the value of "letter-spacing" */ |
| set letterSpacing(String value) { |
| _letterSpacing = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('letterSpacing') |
| String _letterSpacing; |
| |
| /** Gets the value of "line-height" */ |
| String get lineHeight => this._lineHeight; |
| |
| /** Sets the value of "line-height" */ |
| set lineHeight(String value) { |
| _lineHeight = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('lineHeight') |
| String _lineHeight; |
| |
| /** Gets the value of "list-style" */ |
| String get listStyle => this._listStyle; |
| |
| /** Sets the value of "list-style" */ |
| set listStyle(String value) { |
| _listStyle = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('listStyle') |
| String _listStyle; |
| |
| /** Gets the value of "list-style-image" */ |
| String get listStyleImage => this._listStyleImage; |
| |
| /** Sets the value of "list-style-image" */ |
| set listStyleImage(String value) { |
| _listStyleImage = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('listStyleImage') |
| String _listStyleImage; |
| |
| /** Gets the value of "list-style-position" */ |
| String get listStylePosition => this._listStylePosition; |
| |
| /** Sets the value of "list-style-position" */ |
| set listStylePosition(String value) { |
| _listStylePosition = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('listStylePosition') |
| String _listStylePosition; |
| |
| /** Gets the value of "list-style-type" */ |
| String get listStyleType => this._listStyleType; |
| |
| /** Sets the value of "list-style-type" */ |
| set listStyleType(String value) { |
| _listStyleType = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('listStyleType') |
| String _listStyleType; |
| |
| /** Gets the value of "margin" */ |
| String get margin => this._margin; |
| |
| /** Sets the value of "margin" */ |
| set margin(String value) { |
| _margin = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('margin') |
| String _margin; |
| |
| /** Gets the value of "margin-bottom" */ |
| String get marginBottom => this._marginBottom; |
| |
| /** Sets the value of "margin-bottom" */ |
| set marginBottom(String value) { |
| _marginBottom = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('marginBottom') |
| String _marginBottom; |
| |
| /** Gets the value of "margin-left" */ |
| String get marginLeft => this._marginLeft; |
| |
| /** Sets the value of "margin-left" */ |
| set marginLeft(String value) { |
| _marginLeft = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('marginLeft') |
| String _marginLeft; |
| |
| /** Gets the value of "margin-right" */ |
| String get marginRight => this._marginRight; |
| |
| /** Sets the value of "margin-right" */ |
| set marginRight(String value) { |
| _marginRight = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('marginRight') |
| String _marginRight; |
| |
| /** Gets the value of "margin-top" */ |
| String get marginTop => this._marginTop; |
| |
| /** Sets the value of "margin-top" */ |
| set marginTop(String value) { |
| _marginTop = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('marginTop') |
| String _marginTop; |
| |
| /** Gets the value of "max-height" */ |
| String get maxHeight => this._maxHeight; |
| |
| /** Sets the value of "max-height" */ |
| set maxHeight(String value) { |
| _maxHeight = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('maxHeight') |
| String _maxHeight; |
| |
| /** Gets the value of "max-width" */ |
| String get maxWidth => this._maxWidth; |
| |
| /** Sets the value of "max-width" */ |
| set maxWidth(String value) { |
| _maxWidth = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('maxWidth') |
| String _maxWidth; |
| |
| /** Gets the value of "min-height" */ |
| String get minHeight => this._minHeight; |
| |
| /** Sets the value of "min-height" */ |
| set minHeight(String value) { |
| _minHeight = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('minHeight') |
| String _minHeight; |
| |
| /** Gets the value of "min-width" */ |
| String get minWidth => this._minWidth; |
| |
| /** Sets the value of "min-width" */ |
| set minWidth(String value) { |
| _minWidth = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('minWidth') |
| String _minWidth; |
| |
| /** Gets the value of "outline" */ |
| String get outline => this._outline; |
| |
| /** Sets the value of "outline" */ |
| set outline(String value) { |
| _outline = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('outline') |
| String _outline; |
| |
| /** Gets the value of "outline-color" */ |
| String get outlineColor => this._outlineColor; |
| |
| /** Sets the value of "outline-color" */ |
| set outlineColor(String value) { |
| _outlineColor = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('outlineColor') |
| String _outlineColor; |
| |
| /** Gets the value of "outline-style" */ |
| String get outlineStyle => this._outlineStyle; |
| |
| /** Sets the value of "outline-style" */ |
| set outlineStyle(String value) { |
| _outlineStyle = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('outlineStyle') |
| String _outlineStyle; |
| |
| /** Gets the value of "outline-width" */ |
| String get outlineWidth => this._outlineWidth; |
| |
| /** Sets the value of "outline-width" */ |
| set outlineWidth(String value) { |
| _outlineWidth = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('outlineWidth') |
| String _outlineWidth; |
| |
| /** Gets the value of "overflow" */ |
| String get overflow => this._overflow; |
| |
| /** Sets the value of "overflow" */ |
| set overflow(String value) { |
| _overflow = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('overflow') |
| String _overflow; |
| |
| /** Gets the value of "padding" */ |
| String get padding => this._padding; |
| |
| /** Sets the value of "padding" */ |
| set padding(String value) { |
| _padding = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('padding') |
| String _padding; |
| |
| /** Gets the value of "padding-bottom" */ |
| String get paddingBottom => this._paddingBottom; |
| |
| /** Sets the value of "padding-bottom" */ |
| set paddingBottom(String value) { |
| _paddingBottom = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('paddingBottom') |
| String _paddingBottom; |
| |
| /** Gets the value of "padding-left" */ |
| String get paddingLeft => this._paddingLeft; |
| |
| /** Sets the value of "padding-left" */ |
| set paddingLeft(String value) { |
| _paddingLeft = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('paddingLeft') |
| String _paddingLeft; |
| |
| /** Gets the value of "padding-right" */ |
| String get paddingRight => this._paddingRight; |
| |
| /** Sets the value of "padding-right" */ |
| set paddingRight(String value) { |
| _paddingRight = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('paddingRight') |
| String _paddingRight; |
| |
| /** Gets the value of "padding-top" */ |
| String get paddingTop => this._paddingTop; |
| |
| /** Sets the value of "padding-top" */ |
| set paddingTop(String value) { |
| _paddingTop = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('paddingTop') |
| String _paddingTop; |
| |
| /** Gets the value of "page-break-after" */ |
| String get pageBreakAfter => this._pageBreakAfter; |
| |
| /** Sets the value of "page-break-after" */ |
| set pageBreakAfter(String value) { |
| _pageBreakAfter = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('pageBreakAfter') |
| String _pageBreakAfter; |
| |
| /** Gets the value of "page-break-before" */ |
| String get pageBreakBefore => this._pageBreakBefore; |
| |
| /** Sets the value of "page-break-before" */ |
| set pageBreakBefore(String value) { |
| _pageBreakBefore = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('pageBreakBefore') |
| String _pageBreakBefore; |
| |
| /** Gets the value of "page-break-inside" */ |
| String get pageBreakInside => this._pageBreakInside; |
| |
| /** Sets the value of "page-break-inside" */ |
| set pageBreakInside(String value) { |
| _pageBreakInside = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('pageBreakInside') |
| String _pageBreakInside; |
| |
| /** Gets the value of "position" */ |
| String get position => this._position; |
| |
| /** Sets the value of "position" */ |
| set position(String value) { |
| _position = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('position') |
| String _position; |
| |
| /** Gets the value of "quotes" */ |
| String get quotes => this._quotes; |
| |
| /** Sets the value of "quotes" */ |
| set quotes(String value) { |
| _quotes = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('quotes') |
| String _quotes; |
| |
| /** Gets the value of "right" */ |
| String get right => this._right; |
| |
| /** Sets the value of "right" */ |
| set right(String value) { |
| _right = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('right') |
| String _right; |
| |
| /** Gets the value of "table-layout" */ |
| String get tableLayout => this._tableLayout; |
| |
| /** Sets the value of "table-layout" */ |
| set tableLayout(String value) { |
| _tableLayout = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('tableLayout') |
| String _tableLayout; |
| |
| /** Gets the value of "text-align" */ |
| String get textAlign => this._textAlign; |
| |
| /** Sets the value of "text-align" */ |
| set textAlign(String value) { |
| _textAlign = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('textAlign') |
| String _textAlign; |
| |
| /** Gets the value of "text-decoration" */ |
| String get textDecoration => this._textDecoration; |
| |
| /** Sets the value of "text-decoration" */ |
| set textDecoration(String value) { |
| _textDecoration = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('textDecoration') |
| String _textDecoration; |
| |
| /** Gets the value of "text-indent" */ |
| String get textIndent => this._textIndent; |
| |
| /** Sets the value of "text-indent" */ |
| set textIndent(String value) { |
| _textIndent = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('textIndent') |
| String _textIndent; |
| |
| /** Gets the value of "text-transform" */ |
| String get textTransform => this._textTransform; |
| |
| /** Sets the value of "text-transform" */ |
| set textTransform(String value) { |
| _textTransform = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('textTransform') |
| String _textTransform; |
| |
| /** Gets the value of "top" */ |
| String get top => this._top; |
| |
| /** Sets the value of "top" */ |
| set top(String value) { |
| _top = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('top') |
| String _top; |
| |
| /** Gets the value of "unicode-bidi" */ |
| String get unicodeBidi => this._unicodeBidi; |
| |
| /** Sets the value of "unicode-bidi" */ |
| set unicodeBidi(String value) { |
| _unicodeBidi = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('unicodeBidi') |
| String _unicodeBidi; |
| |
| /** Gets the value of "vertical-align" */ |
| String get verticalAlign => this._verticalAlign; |
| |
| /** Sets the value of "vertical-align" */ |
| set verticalAlign(String value) { |
| _verticalAlign = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('verticalAlign') |
| String _verticalAlign; |
| |
| /** Gets the value of "visibility" */ |
| String get visibility => this._visibility; |
| |
| /** Sets the value of "visibility" */ |
| set visibility(String value) { |
| _visibility = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('visibility') |
| String _visibility; |
| |
| /** Gets the value of "white-space" */ |
| String get whiteSpace => this._whiteSpace; |
| |
| /** Sets the value of "white-space" */ |
| set whiteSpace(String value) { |
| _whiteSpace = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('whiteSpace') |
| String _whiteSpace; |
| |
| /** Gets the value of "width" */ |
| String get width => this._width; |
| |
| /** Sets the value of "width" */ |
| set width(String value) { |
| _width = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('width') |
| String _width; |
| |
| /** Gets the value of "word-spacing" */ |
| String get wordSpacing => this._wordSpacing; |
| |
| /** Sets the value of "word-spacing" */ |
| set wordSpacing(String value) { |
| _wordSpacing = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('wordSpacing') |
| String _wordSpacing; |
| |
| /** Gets the value of "z-index" */ |
| String get zIndex => this._zIndex; |
| |
| /** Sets the value of "z-index" */ |
| set zIndex(String value) { |
| _zIndex = value == null ? '' : value; |
| } |
| |
| @Returns('String') |
| @JSName('zIndex') |
| String _zIndex; |
| } |
| |
| class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase { |
| final Iterable<Element> _elementIterable; |
| Iterable<CssStyleDeclaration> _elementCssStyleDeclarationSetIterable; |
| |
| _CssStyleDeclarationSet(this._elementIterable) { |
| _elementCssStyleDeclarationSetIterable = |
| new List.from(_elementIterable).map((e) => e.style); |
| } |
| |
| String getPropertyValue(String propertyName) => |
| _elementCssStyleDeclarationSetIterable.first |
| .getPropertyValue(propertyName); |
| |
| void setProperty(String propertyName, String value, [String priority]) { |
| _elementCssStyleDeclarationSetIterable |
| .forEach((e) => e.setProperty(propertyName, value, priority)); |
| } |
| |
| void _setAll(String propertyName, String value) { |
| value = value == null ? '' : value; |
| for (Element element in _elementIterable) { |
| JS('void', '#.style[#] = #', element, propertyName, value); |
| } |
| } |
| |
| /** Sets the value of "background" */ |
| set background(String value) { |
| _setAll('background', value); |
| } |
| |
| /** Sets the value of "background-attachment" */ |
| set backgroundAttachment(String value) { |
| _setAll('backgroundAttachment', value); |
| } |
| |
| /** Sets the value of "background-color" */ |
| set backgroundColor(String value) { |
| _setAll('backgroundColor', value); |
| } |
| |
| /** Sets the value of "background-image" */ |
| set backgroundImage(String value) { |
| _setAll('backgroundImage', value); |
| } |
| |
| /** Sets the value of "background-position" */ |
| set backgroundPosition(String value) { |
| _setAll('backgroundPosition', value); |
| } |
| |
| /** Sets the value of "background-repeat" */ |
| set backgroundRepeat(String value) { |
| _setAll('backgroundRepeat', value); |
| } |
| |
| /** Sets the value of "border" */ |
| set border(String value) { |
| _setAll('border', value); |
| } |
| |
| /** Sets the value of "border-bottom" */ |
| set borderBottom(String value) { |
| _setAll('borderBottom', value); |
| } |
| |
| /** Sets the value of "border-bottom-color" */ |
| set borderBottomColor(String value) { |
| _setAll('borderBottomColor', value); |
| } |
| |
| /** Sets the value of "border-bottom-style" */ |
| set borderBottomStyle(String value) { |
| _setAll('borderBottomStyle', value); |
| } |
| |
| /** Sets the value of "border-bottom-width" */ |
| set borderBottomWidth(String value) { |
| _setAll('borderBottomWidth', value); |
| } |
| |
| /** Sets the value of "border-collapse" */ |
| set borderCollapse(String value) { |
| _setAll('borderCollapse', value); |
| } |
| |
| /** Sets the value of "border-color" */ |
| set borderColor(String value) { |
| _setAll('borderColor', value); |
| } |
| |
| /** Sets the value of "border-left" */ |
| set borderLeft(String value) { |
| _setAll('borderLeft', value); |
| } |
| |
| /** Sets the value of "border-left-color" */ |
| set borderLeftColor(String value) { |
| _setAll('borderLeftColor', value); |
| } |
| |
| /** Sets the value of "border-left-style" */ |
| set borderLeftStyle(String value) { |
| _setAll('borderLeftStyle', value); |
| } |
| |
| /** Sets the value of "border-left-width" */ |
| set borderLeftWidth(String value) { |
| _setAll('borderLeftWidth', value); |
| } |
| |
| /** Sets the value of "border-right" */ |
| set borderRight(String value) { |
| _setAll('borderRight', value); |
| } |
| |
| /** Sets the value of "border-right-color" */ |
| set borderRightColor(String value) { |
| _setAll('borderRightColor', value); |
| } |
| |
| /** Sets the value of "border-right-style" */ |
| set borderRightStyle(String value) { |
| _setAll('borderRightStyle', value); |
| } |
| |
| /** Sets the value of "border-right-width" */ |
| set borderRightWidth(String value) { |
| _setAll('borderRightWidth', value); |
| } |
| |
| /** Sets the value of "border-spacing" */ |
| set borderSpacing(String value) { |
| _setAll('borderSpacing', value); |
| } |
| |
| /** Sets the value of "border-style" */ |
| set borderStyle(String value) { |
| _setAll('borderStyle', value); |
| } |
| |
| /** Sets the value of "border-top" */ |
| set borderTop(String value) { |
| _setAll('borderTop', value); |
| } |
| |
| /** Sets the value of "border-top-color" */ |
| set borderTopColor(String value) { |
| _setAll('borderTopColor', value); |
| } |
| |
| /** Sets the value of "border-top-style" */ |
| set borderTopStyle(String value) { |
| _setAll('borderTopStyle', value); |
| } |
| |
| /** Sets the value of "border-top-width" */ |
| set borderTopWidth(String value) { |
| _setAll('borderTopWidth', value); |
| } |
| |
| /** Sets the value of "border-width" */ |
| set borderWidth(String value) { |
| _setAll('borderWidth', value); |
| } |
| |
| /** Sets the value of "bottom" */ |
| set bottom(String value) { |
| _setAll('bottom', value); |
| } |
| |
| /** Sets the value of "caption-side" */ |
| set captionSide(String value) { |
| _setAll('captionSide', value); |
| } |
| |
| /** Sets the value of "clear" */ |
| set clear(String value) { |
| _setAll('clear', value); |
| } |
| |
| /** Sets the value of "clip" */ |
| set clip(String value) { |
| _setAll('clip', value); |
| } |
| |
| /** Sets the value of "color" */ |
| set color(String value) { |
| _setAll('color', value); |
| } |
| |
| /** Sets the value of "content" */ |
| set content(String value) { |
| _setAll('content', value); |
| } |
| |
| /** Sets the value of "cursor" */ |
| set cursor(String value) { |
| _setAll('cursor', value); |
| } |
| |
| /** Sets the value of "direction" */ |
| set direction(String value) { |
| _setAll('direction', value); |
| } |
| |
| /** Sets the value of "display" */ |
| set display(String value) { |
| _setAll('display', value); |
| } |
| |
| /** Sets the value of "empty-cells" */ |
| set emptyCells(String value) { |
| _setAll('emptyCells', value); |
| } |
| |
| /** Sets the value of "font" */ |
| set font(String value) { |
| _setAll('font', value); |
| } |
| |
| /** Sets the value of "font-family" */ |
| set fontFamily(String value) { |
| _setAll('fontFamily', value); |
| } |
| |
| /** Sets the value of "font-size" */ |
| set fontSize(String value) { |
| _setAll('fontSize', value); |
| } |
| |
| /** Sets the value of "font-style" */ |
| set fontStyle(String value) { |
| _setAll('fontStyle', value); |
| } |
| |
| /** Sets the value of "font-variant" */ |
| set fontVariant(String value) { |
| _setAll('fontVariant', value); |
| } |
| |
| /** Sets the value of "font-weight" */ |
| set fontWeight(String value) { |
| _setAll('fontWeight', value); |
| } |
| |
| /** Sets the value of "height" */ |
| set height(String value) { |
| _setAll('height', value); |
| } |
| |
| /** Sets the value of "left" */ |
| set left(String value) { |
| _setAll('left', value); |
| } |
| |
| /** Sets the value of "letter-spacing" */ |
| set letterSpacing(String value) { |
| _setAll('letterSpacing', value); |
| } |
| |
| /** Sets the value of "line-height" */ |
| set lineHeight(String value) { |
| _setAll('lineHeight', value); |
| } |
| |
| /** Sets the value of "list-style" */ |
| set listStyle(String value) { |
| _setAll('listStyle', value); |
| } |
| |
| /** Sets the value of "list-style-image" */ |
| set listStyleImage(String value) { |
| _setAll('listStyleImage', value); |
| } |
| |
| /** Sets the value of "list-style-position" */ |
| set listStylePosition(String value) { |
| _setAll('listStylePosition', value); |
| } |
| |
| /** Sets the value of "list-style-type" */ |
| set listStyleType(String value) { |
| _setAll('listStyleType', value); |
| } |
| |
| /** Sets the value of "margin" */ |
| set margin(String value) { |
| _setAll('margin', value); |
| } |
| |
| /** Sets the value of "margin-bottom" */ |
| set marginBottom(String value) { |
| _setAll('marginBottom', value); |
| } |
| |
| /** Sets the value of "margin-left" */ |
| set marginLeft(String value) { |
| _setAll('marginLeft', value); |
| } |
| |
| /** Sets the value of "margin-right" */ |
| set marginRight(String value) { |
| _setAll('marginRight', value); |
| } |
| |
| /** Sets the value of "margin-top" */ |
| set marginTop(String value) { |
| _setAll('marginTop', value); |
| } |
| |
| /** Sets the value of "max-height" */ |
| set maxHeight(String value) { |
| _setAll('maxHeight', value); |
| } |
| |
| /** Sets the value of "max-width" */ |
| set maxWidth(String value) { |
| _setAll('maxWidth', value); |
| } |
| |
| /** Sets the value of "min-height" */ |
| set minHeight(String value) { |
| _setAll('minHeight', value); |
| } |
| |
| /** Sets the value of "min-width" */ |
| set minWidth(String value) { |
| _setAll('minWidth', value); |
| } |
| |
| /** Sets the value of "outline" */ |
| set outline(String value) { |
| _setAll('outline', value); |
| } |
| |
| /** Sets the value of "outline-color" */ |
| set outlineColor(String value) { |
| _setAll('outlineColor', value); |
| } |
| |
| /** Sets the value of "outline-style" */ |
| set outlineStyle(String value) { |
| _setAll('outlineStyle', value); |
| } |
| |
| /** Sets the value of "outline-width" */ |
| set outlineWidth(String value) { |
| _setAll('outlineWidth', value); |
| } |
| |
| /** Sets the value of "overflow" */ |
| set overflow(String value) { |
| _setAll('overflow', value); |
| } |
| |
| /** Sets the value of "padding" */ |
| set padding(String value) { |
| _setAll('padding', value); |
| } |
| |
| /** Sets the value of "padding-bottom" */ |
| set paddingBottom(String value) { |
| _setAll('paddingBottom', value); |
| } |
| |
| /** Sets the value of "padding-left" */ |
| set paddingLeft(String value) { |
| _setAll('paddingLeft', value); |
| } |
| |
| /** Sets the value of "padding-right" */ |
| set paddingRight(String value) { |
| _setAll('paddingRight', value); |
| } |
| |
| /** Sets the value of "padding-top" */ |
| set paddingTop(String value) { |
| _setAll('paddingTop', value); |
| } |
| |
| /** Sets the value of "page-break-after" */ |
| set pageBreakAfter(String value) { |
| _setAll('pageBreakAfter', value); |
| } |
| |
| /** Sets the value of "page-break-before" */ |
| set pageBreakBefore(String value) { |
| _setAll('pageBreakBefore', value); |
| } |
| |
| /** Sets the value of "page-break-inside" */ |
| set pageBreakInside(String value) { |
| _setAll('pageBreakInside', value); |
| } |
| |
| /** Sets the value of "position" */ |
| set position(String value) { |
| _setAll('position', value); |
| } |
| |
| /** Sets the value of "quotes" */ |
| set quotes(String value) { |
| _setAll('quotes', value); |
| } |
| |
| /** Sets the value of "right" */ |
| set right(String value) { |
| _setAll('right', value); |
| } |
| |
| /** Sets the value of "table-layout" */ |
| set tableLayout(String value) { |
| _setAll('tableLayout', value); |
| } |
| |
| /** Sets the value of "text-align" */ |
| set textAlign(String value) { |
| _setAll('textAlign', value); |
| } |
| |
| /** Sets the value of "text-decoration" */ |
| set textDecoration(String value) { |
| _setAll('textDecoration', value); |
| } |
| |
| /** Sets the value of "text-indent" */ |
| set textIndent(String value) { |
| _setAll('textIndent', value); |
| } |
| |
| /** Sets the value of "text-transform" */ |
| set textTransform(String value) { |
| _setAll('textTransform', value); |
| } |
| |
| /** Sets the value of "top" */ |
| set top(String value) { |
| _setAll('top', value); |
| } |
| |
| /** Sets the value of "unicode-bidi" */ |
| set unicodeBidi(String value) { |
| _setAll('unicodeBidi', value); |
| } |
| |
| /** Sets the value of "vertical-align" */ |
| set verticalAlign(String value) { |
| _setAll('verticalAlign', value); |
| } |
| |
| /** Sets the value of "visibility" */ |
| set visibility(String value) { |
| _setAll('visibility', value); |
| } |
| |
| /** Sets the value of "white-space" */ |
| set whiteSpace(String value) { |
| _setAll('whiteSpace', value); |
| } |
| |
| /** Sets the value of "width" */ |
| set width(String value) { |
| _setAll('width', value); |
| } |
| |
| /** Sets the value of "word-spacing" */ |
| set wordSpacing(String value) { |
| _setAll('wordSpacing', value); |
| } |
| |
| /** Sets the value of "z-index" */ |
| set zIndex(String value) { |
| _setAll('zIndex', value); |
| } |
| |
| // Important note: CssStyleDeclarationSet does NOT implement every method |
| // available in CssStyleDeclaration. Some of the methods don't make so much |
| // sense in terms of having a resonable value to return when you're |
| // considering a list of Elements. You will need to manually add any of the |
| // items in the MEMBERS set if you want that functionality. |
| } |
| |
| abstract class CssStyleDeclarationBase { |
| String getPropertyValue(String propertyName); |
| void setProperty(String propertyName, String value, [String priority]); |
| |
| /** Gets the value of "align-content" */ |
| String get alignContent => getPropertyValue('align-content'); |
| |
| /** Sets the value of "align-content" */ |
| set alignContent(String value) { |
| setProperty('align-content', value, ''); |
| } |
| |
| /** Gets the value of "align-items" */ |
| String get alignItems => getPropertyValue('align-items'); |
| |
| /** Sets the value of "align-items" */ |
| set alignItems(String value) { |
| setProperty('align-items', value, ''); |
| } |
| |
| /** Gets the value of "align-self" */ |
| String get alignSelf => getPropertyValue('align-self'); |
| |
| /** Sets the value of "align-self" */ |
| set alignSelf(String value) { |
| setProperty('align-self', value, ''); |
| } |
| |
| /** Gets the value of "animation" */ |
| String get animation => getPropertyValue('animation'); |
| |
| /** Sets the value of "animation" */ |
| set animation(String value) { |
| setProperty('animation', value, ''); |
| } |
| |
| /** Gets the value of "animation-delay" */ |
| String get animationDelay => getPropertyValue('animation-delay'); |
| |
| /** Sets the value of "animation-delay" */ |
| set animationDelay(String value) { |
| setProperty('animation-delay', value, ''); |
| } |
| |
| /** Gets the value of "animation-direction" */ |
| String get animationDirection => getPropertyValue('animation-direction'); |
| |
| /** Sets the value of "animation-direction" */ |
| set animationDirection(String value) { |
| setProperty('animation-direction', value, ''); |
| } |
| |
| /** Gets the value of "animation-duration" */ |
| String get animationDuration => getPropertyValue('animation-duration'); |
| |
| /** Sets the value of "animation-duration" */ |
| set animationDuration(String value) { |
| setProperty('animation-duration', value, ''); |
| } |
| |
| /** Gets the value of "animation-fill-mode" */ |
| String get animationFillMode => getPropertyValue('animation-fill-mode'); |
| |
| /** Sets the value of "animation-fill-mode" */ |
| set animationFillMode(String value) { |
| setProperty('animation-fill-mode', value, ''); |
| } |
| |
| /** Gets the value of "animation-iteration-count" */ |
| String get animationIterationCount => |
| getPropertyValue('animation-iteration-count'); |
| |
| /** Sets the value of "animation-iteration-count" */ |
| set animationIterationCount(String value) { |
| setProperty('animation-iteration-count', value, ''); |
| } |
| |
| /** Gets the value of "animation-name" */ |
| String get animationName => getPropertyValue('animation-name'); |
| |
| /** Sets the value of "animation-name" */ |
| set animationName(String value) { |
| setProperty('animation-name', value, ''); |
| } |
| |
| /** Gets the value of "animation-play-state" */ |
| String get animationPlayState => getPropertyValue('animation-play-state'); |
| |
| /** Sets the value of "animation-play-state" */ |
| set animationPlayState(String value) { |
| setProperty('animation-play-state', value, ''); |
| } |
| |
| /** Gets the value of "animation-timing-function" */ |
| String get animationTimingFunction => |
| getPropertyValue('animation-timing-function'); |
| |
| /** Sets the value of "animation-timing-function" */ |
| set animationTimingFunction(String value) { |
| setProperty('animation-timing-function', value, ''); |
| } |
| |
| /** Gets the value of "app-region" */ |
| String get appRegion => getPropertyValue('app-region'); |
| |
| /** Sets the value of "app-region" */ |
| set appRegion(String value) { |
| setProperty('app-region', value, ''); |
| } |
| |
| /** Gets the value of "appearance" */ |
| String get appearance => getPropertyValue('appearance'); |
| |
| /** Sets the value of "appearance" */ |
| set appearance(String value) { |
| setProperty('appearance', value, ''); |
| } |
| |
| /** Gets the value of "aspect-ratio" */ |
| String get aspectRatio => getPropertyValue('aspect-ratio'); |
| |
| /** Sets the value of "aspect-ratio" */ |
| set aspectRatio(String value) { |
| setProperty('aspect-ratio', value, ''); |
| } |
| |
| /** Gets the value of "backface-visibility" */ |
| String get backfaceVisibility => getPropertyValue('backface-visibility'); |
| |
| /** Sets the value of "backface-visibility" */ |
| set backfaceVisibility(String value) { |
| setProperty('backface-visibility', value, ''); |
| } |
| |
| /** Gets the value of "background" */ |
| String get background => getPropertyValue('background'); |
| |
| /** Sets the value of "background" */ |
| set background(String value) { |
| setProperty('background', value, ''); |
| } |
| |
| /** Gets the value of "background-attachment" */ |
| String get backgroundAttachment => getPropertyValue('background-attachment'); |
| |
| /** Sets the value of "background-attachment" */ |
| set backgroundAttachment(String value) { |
| setProperty('background-attachment', value, ''); |
| } |
| |
| /** Gets the value of "background-blend-mode" */ |
| String get backgroundBlendMode => getPropertyValue('background-blend-mode'); |
| |
| /** Sets the value of "background-blend-mode" */ |
| set backgroundBlendMode(String value) { |
| setProperty('background-blend-mode', value, ''); |
| } |
| |
| /** Gets the value of "background-clip" */ |
| String get backgroundClip => getPropertyValue('background-clip'); |
| |
| /** Sets the value of "background-clip" */ |
| set backgroundClip(String value) { |
| setProperty('background-clip', value, ''); |
| } |
| |
| /** Gets the value of "background-color" */ |
| String get backgroundColor => getPropertyValue('background-color'); |
| |
| /** Sets the value of "background-color" */ |
| set backgroundColor(String value) { |
| setProperty('background-color', value, ''); |
| } |
| |
| /** Gets the value of "background-composite" */ |
| String get backgroundComposite => getPropertyValue('background-composite'); |
| |
| /** Sets the value of "background-composite" */ |
| set backgroundComposite(String value) { |
| setProperty('background-composite', value, ''); |
| } |
| |
| /** Gets the value of "background-image" */ |
| String get backgroundImage => getPropertyValue('background-image'); |
| |
| /** Sets the value of "background-image" */ |
| set backgroundImage(String value) { |
| setProperty('background-image', value, ''); |
| } |
| |
| /** Gets the value of "background-origin" */ |
| String get backgroundOrigin => getPropertyValue('background-origin'); |
| |
| /** Sets the value of "background-origin" */ |
| set backgroundOrigin(String value) { |
| setProperty('background-origin', value, ''); |
| } |
| |
| /** Gets the value of "background-position" */ |
| String get backgroundPosition => getPropertyValue('background-position'); |
| |
| /** Sets the value of "background-position" */ |
| set backgroundPosition(String value) { |
| setProperty('background-position', value, ''); |
| } |
| |
| /** Gets the value of "background-position-x" */ |
| String get backgroundPositionX => getPropertyValue('background-position-x'); |
| |
| /** Sets the value of "background-position-x" */ |
| set backgroundPositionX(String value) { |
| setProperty('background-position-x', value, ''); |
| } |
| |
| /** Gets the value of "background-position-y" */ |
| String get backgroundPositionY => getPropertyValue('background-position-y'); |
| |
| /** Sets the value of "background-position-y" */ |
| set backgroundPositionY(String value) { |
| setProperty('background-position-y', value, ''); |
| } |
| |
| /** Gets the value of "background-repeat" */ |
| String get backgroundRepeat => getPropertyValue('background-repeat'); |
| |
| /** Sets the value of "background-repeat" */ |
| set backgroundRepeat(String value) { |
| setProperty('background-repeat', value, ''); |
| } |
| |
| /** Gets the value of "background-repeat-x" */ |
| String get backgroundRepeatX => getPropertyValue('background-repeat-x'); |
| |
| /** Sets the value of "background-repeat-x" */ |
| set backgroundRepeatX(String value) { |
| setProperty('background-repeat-x', value, ''); |
| } |
| |
| /** Gets the value of "background-repeat-y" */ |
| String get backgroundRepeatY => getPropertyValue('background-repeat-y'); |
| |
| /** Sets the value of "background-repeat-y" */ |
| set backgroundRepeatY(String value) { |
| setProperty('background-repeat-y', value, ''); |
| } |
| |
| /** Gets the value of "background-size" */ |
| String get backgroundSize => getPropertyValue('background-size'); |
| |
| /** Sets the value of "background-size" */ |
| set backgroundSize(String value) { |
| setProperty('background-size', value, ''); |
| } |
| |
| /** Gets the value of "border" */ |
| String get border => getPropertyValue('border'); |
| |
| /** Sets the value of "border" */ |
| set border(String value) { |
| setProperty('border', value, ''); |
| } |
| |
| /** Gets the value of "border-after" */ |
| String get borderAfter => getPropertyValue('border-after'); |
| |
| /** Sets the value of "border-after" */ |
| set borderAfter(String value) { |
| setProperty('border-after', value, ''); |
| } |
| |
| /** Gets the value of "border-after-color" */ |
| String get borderAfterColor => getPropertyValue('border-after-color'); |
| |
| /** Sets the value of "border-after-color" */ |
| set borderAfterColor(String value) { |
| setProperty('border-after-color', value, ''); |
| } |
| |
| /** Gets the value of "border-after-style" */ |
| String get borderAfterStyle => getPropertyValue('border-after-style'); |
| |
| /** Sets the value of "border-after-style" */ |
| set borderAfterStyle(String value) { |
| setProperty('border-after-style', value, ''); |
| } |
| |
| /** Gets the value of "border-after-width" */ |
| String get borderAfterWidth => getPropertyValue('border-after-width'); |
| |
| /** Sets the value of "border-after-width" */ |
| set borderAfterWidth(String value) { |
| setProperty('border-after-width', value, ''); |
| } |
| |
| /** Gets the value of "border-before" */ |
| String get borderBefore => getPropertyValue('border-before'); |
| |
| /** Sets the value of "border-before" */ |
| set borderBefore(String value) { |
| setProperty('border-before', value, ''); |
| } |
| |
| /** Gets the value of "border-before-color" */ |
| String get borderBeforeColor => getPropertyValue('border-before-color'); |
| |
| /** Sets the value of "border-before-color" */ |
| set borderBeforeColor(String value) { |
| setProperty('border-before-color', value, ''); |
| } |
| |
| /** Gets the value of "border-before-style" */ |
| String get borderBeforeStyle => getPropertyValue('border-before-style'); |
| |
| /** Sets the value of "border-before-style" */ |
| set borderBeforeStyle(String value) { |
| setProperty('border-before-style', value, ''); |
| } |
| |
| /** Gets the value of "border-before-width" */ |
| String get borderBeforeWidth => getPropertyValue('border-before-width'); |
| |
| /** Sets the value of "border-before-width" */ |
| set borderBeforeWidth(String value) { |
| setProperty('border-before-width', value, ''); |
| } |
| |
| /** Gets the value of "border-bottom" */ |
| String get borderBottom => getPropertyValue('border-bottom'); |
| |
| /** Sets the value of "border-bottom" */ |
| set borderBottom(String value) { |
| setProperty('border-bottom', value, ''); |
| } |
| |
| /** Gets the value of "border-bottom-color" */ |
| String get borderBottomColor => getPropertyValue('border-bottom-color'); |
| |
| /** Sets the value of "border-bottom-color" */ |
| set borderBottomColor(String value) { |
| setProperty('border-bottom-color', value, ''); |
| } |
| |
| /** Gets the value of "border-bottom-left-radius" */ |
| String get borderBottomLeftRadius => |
| getPropertyValue('border-bottom-left-radius'); |
| |
| /** Sets the value of "border-bottom-left-radius" */ |
| set borderBottomLeftRadius(String value) { |
| setProperty('border-bottom-left-radius', value, ''); |
| } |
| |
| /** Gets the value of "border-bottom-right-radius" */ |
| String get borderBottomRightRadius => |
| getPropertyValue('border-bottom-right-radius'); |
| |
| /** Sets the value of "border-bottom-right-radius" */ |
| set borderBottomRightRadius(String value) { |
| setProperty('border-bottom-right-radius', value, ''); |
| } |
| |
| /** Gets the value of "border-bottom-style" */ |
| String get borderBottomStyle => getPropertyValue('border-bottom-style'); |
| |
| /** Sets the value of "border-bottom-style" */ |
| set borderBottomStyle(String value) { |
| setProperty('border-bottom-style', value, ''); |
| } |
| |
| /** Gets the value of "border-bottom-width" */ |
| String get borderBottomWidth => getPropertyValue('border-bottom-width'); |
| |
| /** Sets the value of "border-bottom-width" */ |
| set borderBottomWidth(String value) { |
| setProperty('border-bottom-width', value, ''); |
| } |
| |
| /** Gets the value of "border-collapse" */ |
| String get borderCollapse => getPropertyValue('border-collapse'); |
| |
| /** Sets the value of "border-collapse" */ |
| set borderCollapse(String value) { |
| setProperty('border-collapse', value, ''); |
| } |
| |
| /** Gets the value of "border-color" */ |
| String get borderColor => getPropertyValue('border-color'); |
| |
| /** Sets the value of "border-color" */ |
| set borderColor(String value) { |
| setProperty('border-color', value, ''); |
| } |
| |
| /** Gets the value of "border-end" */ |
| String get borderEnd => getPropertyValue('border-end'); |
| |
| /** Sets the value of "border-end" */ |
| set borderEnd(String value) { |
| setProperty('border-end', value, ''); |
| } |
| |
| /** Gets the value of "border-end-color" */ |
| String get borderEndColor => getPropertyValue('border-end-color'); |
| |
| /** Sets the value of "border-end-color" */ |
| set borderEndColor(String value) { |
| setProperty('border-end-color', value, ''); |
| } |
| |
| /** Gets the value of "border-end-style" */ |
| String get borderEndStyle => getPropertyValue('border-end-style'); |
| |
| /** Sets the value of "border-end-style" */ |
| set borderEndStyle(String value) { |
| setProperty('border-end-style', value, ''); |
| } |
| |
| /** Gets the value of "border-end-width" */ |
| String get borderEndWidth => getPropertyValue('border-end-width'); |
| |
| /** Sets the value of "border-end-width" */ |
| set borderEndWidth(String value) { |
| setProperty('border-end-width', value, ''); |
| } |
| |
| /** Gets the value of "border-fit" */ |
| String get borderFit => getPropertyValue('border-fit'); |
| |
| /** Sets the value of "border-fit" */ |
| set borderFit(String value) { |
| setProperty('border-fit', value, ''); |
| } |
| |
| /** Gets the value of "border-horizontal-spacing" */ |
| String get borderHorizontalSpacing => |
| getPropertyValue('border-horizontal-spacing'); |
| |
| /** Sets the value of "border-horizontal-spacing" */ |
| set borderHorizontalSpacing(String value) { |
| setProperty('border-horizontal-spacing', value, ''); |
| } |
| |
| /** Gets the value of "border-image" */ |
| String get borderImage => getPropertyValue('border-image'); |
| |
| /** Sets the value of "border-image" */ |
| set borderImage(String value) { |
| setProperty('border-image', value, ''); |
| } |
| |
| /** Gets the value of "border-image-outset" */ |
| String get borderImageOutset => getPropertyValue('border-image-outset'); |
| |
| /** Sets the value of "border-image-outset" */ |
| set borderImageOutset(String value) { |
| setProperty('border-image-outset', value, ''); |
| } |
| |
| /** Gets the value of "border-image-repeat" */ |
| String get borderImageRepeat => getPropertyValue('border-image-repeat'); |
| |
| /** Sets the value of "border-image-repeat" */ |
| set borderImageRepeat(String value) { |
| setProperty('border-image-repeat', value, ''); |
| } |
| |
| /** Gets the value of "border-image-slice" */ |
| String get borderImageSlice => getPropertyValue('border-image-slice'); |
| |
| /** Sets the value of "border-image-slice" */ |
| set borderImageSlice(String value) { |
| setProperty('border-image-slice', value, ''); |
| } |
| |
| /** Gets the value of "border-image-source" */ |
| String get borderImageSource => getPropertyValue('border-image-source'); |
| |
| /** Sets the value of "border-image-source" */ |
| set borderImageSource(String value) { |
| setProperty('border-image-source', value, ''); |
| } |
| |
| /** Gets the value of "border-image-width" */ |
| String get borderImageWidth => getPropertyValue('border-image-width'); |
| |
| /** Sets the value of "border-image-width" */ |
| set borderImageWidth(String value) { |
| setProperty('border-image-width', value, ''); |
| } |
| |
| /** Gets the value of "border-left" */ |
| String get borderLeft => getPropertyValue('border-left'); |
| |
| /** Sets the value of "border-left" */ |
| set borderLeft(String value) { |
| setProperty('border-left', value, ''); |
| } |
| |
| /** Gets the value of "border-left-color" */ |
| String get borderLeftColor => getPropertyValue('border-left-color'); |
| |
| /** Sets the value of "border-left-color" */ |
| set borderLeftColor(String value) { |
| setProperty('border-left-color', value, ''); |
| } |
| |
| /** Gets the value of "border-left-style" */ |
| String get borderLeftStyle => getPropertyValue('border-left-style'); |
| |
| /** Sets the value of "border-left-style" */ |
| set borderLeftStyle(String value) { |
| setProperty('border-left-style', value, ''); |
| } |
| |
| /** Gets the value of "border-left-width" */ |
| String get borderLeftWidth => getPropertyValue('border-left-width'); |
| |
| /** Sets the value of "border-left-width" */ |
| set borderLeftWidth(String value) { |
| setProperty('border-left-width', value, ''); |
| } |
| |
| /** Gets the value of "border-radius" */ |
| String get borderRadius => getPropertyValue('border-radius'); |
| |
| /** Sets the value of "border-radius" */ |
| set borderRadius(String value) { |
| setProperty('border-radius', value, ''); |
| } |
| |
| /** Gets the value of "border-right" */ |
| String get borderRight => getPropertyValue('border-right'); |
| |
| /** Sets the value of "border-right" */ |
| set borderRight(String value) { |
| setProperty('border-right', value, ''); |
| } |
| |
| /** Gets the value of "border-right-color" */ |
| String get borderRightColor => getPropertyValue('border-right-color'); |
| |
| /** Sets the value of "border-right-color" */ |
| set borderRightColor(String value) { |
| setProperty('border-right-color', value, ''); |
| } |
| |
| /** Gets the value of "border-right-style" */ |
| String get borderRightStyle => getPropertyValue('border-right-style'); |
| |
| /** Sets the value of "border-right-style" */ |
| set borderRightStyle(String value) { |
| setProperty('border-right-style', value, ''); |
| } |
| |
| /** Gets the value of "border-right-width" */ |
| String get borderRightWidth => getPropertyValue('border-right-width'); |
| |
| /** Sets the value of "border-right-width" */ |
| set borderRightWidth(String value) { |
| setProperty('border-right-width', value, ''); |
| } |
| |
| /** Gets the value of "border-spacing" */ |
| String get borderSpacing => getPropertyValue('border-spacing'); |
| |
| /** Sets the value of "border-spacing" */ |
| set borderSpacing(String value) { |
| setProperty('border-spacing', value, ''); |
| } |
| |
| /** Gets the value of "border-start" */ |
| String get borderStart => getPropertyValue('border-start'); |
| |
| /** Sets the value of "border-start" */ |
| set borderStart(String value) { |
| setProperty('border-start', value, ''); |
| } |
| |
| /** Gets the value of "border-start-color" */ |
| String get borderStartColor => getPropertyValue('border-start-color'); |
| |
| /** Sets the value of "border-start-color" */ |
| set borderStartColor(String value) { |
| setProperty('border-start-color', value, ''); |
| } |
| |
| /** Gets the value of "border-start-style" */ |
| String get borderStartStyle => getPropertyValue('border-start-style'); |
| |
| /** Sets the value of "border-start-style" */ |
| set borderStartStyle(String value) { |
| setProperty('border-start-style', value, ''); |
| } |
| |
| /** Gets the value of "border-start-width" */ |
| String get borderStartWidth => getPropertyValue('border-start-width'); |
| |
| /** Sets the value of "border-start-width" */ |
| set borderStartWidth(String value) { |
| setProperty('border-start-width', value, ''); |
| } |
| |
| /** Gets the value of "border-style" */ |
| String get borderStyle => getPropertyValue('border-style'); |
| |
| /** Sets the value of "border-style" */ |
| set borderStyle(String value) { |
| setProperty('border-style', value, ''); |
| } |
| |
| /** Gets the value of "border-top" */ |
| String get borderTop => getPropertyValue('border-top'); |
| |
| /** Sets the value of "border-top" */ |
| set borderTop(String value) { |
| setProperty('border-top', value, ''); |
| } |
| |
| /** Gets the value of "border-top-color" */ |
| String get borderTopColor => getPropertyValue('border-top-color'); |
| |
| /** Sets the value of "border-top-color" */ |
| set borderTopColor(String value) { |
| setProperty('border-top-color', value, ''); |
| } |
| |
| /** Gets the value of "border-top-left-radius" */ |
| String get borderTopLeftRadius => getPropertyValue('border-top-left-radius'); |
| |
| /** Sets the value of "border-top-left-radius" */ |
| set borderTopLeftRadius(String value) { |
| setProperty('border-top-left-radius', value, ''); |
| } |
| |
| /** Gets the value of "border-top-right-radius" */ |
| String get borderTopRightRadius => |
| getPropertyValue('border-top-right-radius'); |
| |
| /** Sets the value of "border-top-right-radius" */ |
| set borderTopRightRadius(String value) { |
| setProperty('border-top-right-radius', value, ''); |
| } |
| |
| /** Gets the value of "border-top-style" */ |
| String get borderTopStyle => getPropertyValue('border-top-style'); |
| |
| /** Sets the value of "border-top-style" */ |
| set borderTopStyle(String value) { |
| setProperty('border-top-style', value, ''); |
| } |
| |
| /** Gets the value of "border-top-width" */ |
| String get borderTopWidth => getPropertyValue('border-top-width'); |
| |
| /** Sets the value of "border-top-width" */ |
| set borderTopWidth(String value) { |
| setProperty('border-top-width', value, ''); |
| } |
| |
| /** Gets the value of "border-vertical-spacing" */ |
| String get borderVerticalSpacing => |
| getPropertyValue('border-vertical-spacing'); |
| |
| /** Sets the value of "border-vertical-spacing" */ |
| set borderVerticalSpacing(String value) { |
| setProperty('border-vertical-spacing', value, ''); |
| } |
| |
| /** Gets the value of "border-width" */ |
| String get borderWidth => getPropertyValue('border-width'); |
| |
| /** Sets the value of "border-width" */ |
| set borderWidth(String value) { |
| setProperty('border-width', value, ''); |
| } |
| |
| /** Gets the value of "bottom" */ |
| String get bottom => getPropertyValue('bottom'); |
| |
| /** Sets the value of "bottom" */ |
| set bottom(String value) { |
| setProperty('bottom', value, ''); |
| } |
| |
| /** Gets the value of "box-align" */ |
| String get boxAlign => getPropertyValue('box-align'); |
| |
| /** Sets the value of "box-align" */ |
| set boxAlign(String value) { |
| setProperty('box-align', value, ''); |
| } |
| |
| /** Gets the value of "box-decoration-break" */ |
| String get boxDecorationBreak => getPropertyValue('box-decoration-break'); |
| |
| /** Sets the value of "box-decoration-break" */ |
| set boxDecorationBreak(String value) { |
| setProperty('box-decoration-break', value, ''); |
| } |
| |
| /** Gets the value of "box-direction" */ |
| String get boxDirection => getPropertyValue('box-direction'); |
| |
| /** Sets the value of "box-direction" */ |
| set boxDirection(String value) { |
| setProperty('box-direction', value, ''); |
| } |
| |
| /** Gets the value of "box-flex" */ |
| String get boxFlex => getPropertyValue('box-flex'); |
| |
| /** Sets the value of "box-flex" */ |
| set boxFlex(String value) { |
| setProperty('box-flex', value, ''); |
| } |
| |
| /** Gets the value of "box-flex-group" */ |
| String get boxFlexGroup => getPropertyValue('box-flex-group'); |
| |
| /** Sets the value of "box-flex-group" */ |
| set boxFlexGroup(String value) { |
| setProperty('box-flex-group', value, ''); |
| } |
| |
| /** Gets the value of "box-lines" */ |
| String get boxLines => getPropertyValue('box-lines'); |
| |
| /** Sets the value of "box-lines" */ |
| set boxLines(String value) { |
| setProperty('box-lines', value, ''); |
| } |
| |
| /** Gets the value of "box-ordinal-group" */ |
| String get boxOrdinalGroup => getPropertyValue('box-ordinal-group'); |
| |
| /** Sets the value of "box-ordinal-group" */ |
| set boxOrdinalGroup(String value) { |
| setProperty('box-ordinal-group', value, ''); |
| } |
| |
| /** Gets the value of "box-orient" */ |
| String get boxOrient => getPropertyValue('box-orient'); |
| |
| /** Sets the value of "box-orient" */ |
| set boxOrient(String value) { |
| setProperty('box-orient', value, ''); |
| } |
| |
| /** Gets the value of "box-pack" */ |
| String get boxPack => getPropertyValue('box-pack'); |
| |
| /** Sets the value of "box-pack" */ |
| set boxPack(String value) { |
| setProperty('box-pack', value, ''); |
| } |
| |
| /** Gets the value of "box-reflect" */ |
| String get boxReflect => getPropertyValue('box-reflect'); |
| |
| /** Sets the value of "box-reflect" */ |
| set boxReflect(String value) { |
| setProperty('box-reflect', value, ''); |
| } |
| |
| /** Gets the value of "box-shadow" */ |
| String get boxShadow => getPropertyValue('box-shadow'); |
| |
| /** Sets the value of "box-shadow" */ |
| set boxShadow(String value) { |
| setProperty('box-shadow', value, ''); |
| } |
| |
| /** Gets the value of "box-sizing" */ |
| String get boxSizing => getPropertyValue('box-sizing'); |
| |
| /** Sets the value of "box-sizing" */ |
| set boxSizing(String value) { |
| setProperty('box-sizing', value, ''); |
| } |
| |
| /** Gets the value of "caption-side" */ |
| String get captionSide => getPropertyValue('caption-side'); |
| |
| /** Sets the value of "caption-side" */ |
| set captionSide(String value) { |
| setProperty('caption-side', value, ''); |
| } |
| |
| /** Gets the value of "clear" */ |
| String get clear => getPropertyValue('clear'); |
| |
| /** Sets the value of "clear" */ |
| set clear(String value) { |
| setProperty('clear', value, ''); |
| } |
| |
| /** Gets the value of "clip" */ |
| String get clip => getPropertyValue('clip'); |
| |
| /** Sets the value of "clip" */ |
| set clip(String value) { |
| setProperty('clip', value, ''); |
| } |
| |
| /** Gets the value of "clip-path" */ |
| String get clipPath => getPropertyValue('clip-path'); |
| |
| /** Sets the value of "clip-path" */ |
| set clipPath(String value) { |
| setProperty('clip-path', value, ''); |
| } |
| |
| /** Gets the value of "color" */ |
| String get color => getPropertyValue('color'); |
| |
| /** Sets the value of "color" */ |
| set color(String value) { |
| setProperty('color', value, ''); |
| } |
| |
| /** Gets the value of "column-break-after" */ |
| String get columnBreakAfter => getPropertyValue('column-break-after'); |
| |
| /** Sets the value of "column-break-after" */ |
| set columnBreakAfter(String value) { |
| setProperty('column-break-after', value, ''); |
| } |
| |
| /** Gets the value of "column-break-before" */ |
| String get columnBreakBefore => getPropertyValue('column-break-before'); |
| |
| /** Sets the value of "column-break-before" */ |
| set columnBreakBefore(String value) { |
| setProperty('column-break-before', value, ''); |
| } |
| |
| /** Gets the value of "column-break-inside" */ |
| String get columnBreakInside => getPropertyValue('column-break-inside'); |
| |
| /** Sets the value of "column-break-inside" */ |
| set columnBreakInside(String value) { |
| setProperty('column-break-inside', value, ''); |
| } |
| |
| /** Gets the value of "column-count" */ |
| String get columnCount => getPropertyValue('column-count'); |
| |
| /** Sets the value of "column-count" */ |
| set columnCount(String value) { |
| setProperty('column-count', value, ''); |
| } |
| |
| /** Gets the value of "column-fill" */ |
| String get columnFill => getPropertyValue('column-fill'); |
| |
| /** Sets the value of "column-fill" */ |
| set columnFill(String value) { |
| setProperty('column-fill', value, ''); |
| } |
| |
| /** Gets the value of "column-gap" */ |
| String get columnGap => getPropertyValue('column-gap'); |
| |
| /** Sets the value of "column-gap" */ |
| set columnGap(String value) { |
| setProperty('column-gap', value, ''); |
| } |
| |
| /** Gets the value of "column-rule" */ |
| String get columnRule => getPropertyValue('column-rule'); |
| |
| /** Sets the value of "column-rule" */ |
| set columnRule(String value) { |
| setProperty('column-rule', value, ''); |
| } |
| |
| /** Gets the value of "column-rule-color" */ |
| String get columnRuleColor => getPropertyValue('column-rule-color'); |
| |
| /** Sets the value of "column-rule-color" */ |
| set columnRuleColor(String value) { |
| setProperty('column-rule-color', value, ''); |
| } |
| |
| /** Gets the value of "column-rule-style" */ |
| String get columnRuleStyle => getPropertyValue('column-rule-style'); |
| |
| /** Sets the value of "column-rule-style" */ |
| set columnRuleStyle(String value) { |
| setProperty('column-rule-style', value, ''); |
| } |
| |
| /** Gets the value of "column-rule-width" */ |
| String get columnRuleWidth => getPropertyValue('column-rule-width'); |
| |
| /** Sets the value of "column-rule-width" */ |
| set columnRuleWidth(String value) { |
| setProperty('column-rule-width', value, ''); |
| } |
| |
| /** Gets the value of "column-span" */ |
| String get columnSpan => getPropertyValue('column-span'); |
| |
| /** Sets the value of "column-span" */ |
| set columnSpan(String value) { |
| setProperty('column-span', value, ''); |
| } |
| |
| /** Gets the value of "column-width" */ |
| String get columnWidth => getPropertyValue('column-width'); |
| |
| /** Sets the value of "column-width" */ |
| set columnWidth(String value) { |
| setProperty('column-width', value, ''); |
| } |
| |
| /** Gets the value of "columns" */ |
| String get columns => getPropertyValue('columns'); |
| |
| /** Sets the value of "columns" */ |
| set columns(String value) { |
| setProperty('columns', value, ''); |
| } |
| |
| /** Gets the value of "content" */ |
| String get content => getPropertyValue('content'); |
| |
| /** Sets the value of "content" */ |
| set content(String value) { |
| setProperty('content', value, ''); |
| } |
| |
| /** Gets the value of "counter-increment" */ |
| String get counterIncrement => getPropertyValue('counter-increment'); |
| |
| /** Sets the value of "counter-increment" */ |
| set counterIncrement(String value) { |
| setProperty('counter-increment', value, ''); |
| } |
| |
| /** Gets the value of "counter-reset" */ |
| String get counterReset => getPropertyValue('counter-reset'); |
| |
| /** Sets the value of "counter-reset" */ |
| set counterReset(String value) { |
| setProperty('counter-reset', value, ''); |
| } |
| |
| /** Gets the value of "cursor" */ |
| String get cursor => getPropertyValue('cursor'); |
| |
| /** Sets the value of "cursor" */ |
| set cursor(String value) { |
| setProperty('cursor', value, ''); |
| } |
| |
| /** Gets the value of "direction" */ |
| String get direction => getPropertyValue('direction'); |
| |
| /** Sets the value of "direction" */ |
| set direction(String value) { |
| setProperty('direction', value, ''); |
| } |
| |
| /** Gets the value of "display" */ |
| String get display => getPropertyValue('display'); |
| |
| /** Sets the value of "display" */ |
| set display(String value) { |
| setProperty('display', value, ''); |
| } |
| |
| /** Gets the value of "empty-cells" */ |
| String get emptyCells => getPropertyValue('empty-cells'); |
| |
| /** Sets the value of "empty-cells" */ |
| set emptyCells(String value) { |
| setProperty('empty-cells', value, ''); |
| } |
| |
| /** Gets the value of "filter" */ |
| String get filter => getPropertyValue('filter'); |
| |
| /** Sets the value of "filter" */ |
| set filter(String value) { |
| setProperty('filter', value, ''); |
| } |
| |
| /** Gets the value of "flex" */ |
| String get flex => getPropertyValue('flex'); |
| |
| /** Sets the value of "flex" */ |
| set flex(String value) { |
| setProperty('flex', value, ''); |
| } |
| |
| /** Gets the value of "flex-basis" */ |
| String get flexBasis => getPropertyValue('flex-basis'); |
| |
| /** Sets the value of "flex-basis" */ |
| set flexBasis(String value) { |
| setProperty('flex-basis', value, ''); |
| } |
| |
| /** Gets the value of "flex-direction" */ |
| String get flexDirection => getPropertyValue('flex-direction'); |
| |
| /** Sets the value of "flex-direction" */ |
| set flexDirection(String value) { |
| setProperty('flex-direction', value, ''); |
| } |
| |
| /** Gets the value of "flex-flow" */ |
| String get flexFlow => getPropertyValue('flex-flow'); |
| |
| /** Sets the value of "flex-flow" */ |
| set flexFlow(String value) { |
| setProperty('flex-flow', value, ''); |
| } |
| |
| /** Gets the value of "flex-grow" */ |
| String get flexGrow => getPropertyValue('flex-grow'); |
| |
| /** Sets the value of "flex-grow" */ |
| set flexGrow(String value) { |
| setProperty('flex-grow', value, ''); |
| } |
| |
| /** Gets the value of "flex-shrink" */ |
| String get flexShrink => getPropertyValue('flex-shrink'); |
| |
| /** Sets the value of "flex-shrink" */ |
| set flexShrink(String value) { |
| setProperty('flex-shrink', value, ''); |
| } |
| |
| /** Gets the value of "flex-wrap" */ |
| String get flexWrap => getPropertyValue('flex-wrap'); |
| |
| /** Sets the value of "flex-wrap" */ |
| set flexWrap(String value) { |
| setProperty('flex-wrap', value, ''); |
| } |
| |
| /** Gets the value of "float" */ |
| String get float => getPropertyValue('float'); |
| |
| /** Sets the value of "float" */ |
| set float(String value) { |
| setProperty('float', value, ''); |
| } |
| |
| /** Gets the value of "font" */ |
| String get font => getPropertyValue('font'); |
| |
| /** Sets the value of "font" */ |
| set font(String value) { |
| setProperty('font', value, ''); |
| } |
| |
| /** Gets the value of "font-family" */ |
| String get fontFamily => getPropertyValue('font-family'); |
| |
| /** Sets the value of "font-family" */ |
| set fontFamily(String value) { |
| setProperty('font-family', value, ''); |
| } |
| |
| /** Gets the value of "font-feature-settings" */ |
| String get fontFeatureSettings => getPropertyValue('font-feature-settings'); |
| |
| /** Sets the value of "font-feature-settings" */ |
| set fontFeatureSettings(String value) { |
| setProperty('font-feature-settings', value, ''); |
| } |
| |
| /** Gets the value of "font-kerning" */ |
| String get fontKerning => getPropertyValue('font-kerning'); |
| |
| /** Sets the value of "font-kerning" */ |
| set fontKerning(String value) { |
| setProperty('font-kerning', value, ''); |
| } |
| |
| /** Gets the value of "font-size" */ |
| String get fontSize => getPropertyValue('font-size'); |
| |
| /** Sets the value of "font-size" */ |
| set fontSize(String value) { |
| setProperty('font-size', value, ''); |
| } |
| |
| /** Gets the value of "font-size-delta" */ |
| String get fontSizeDelta => getPropertyValue('font-size-delta'); |
| |
| /** Sets the value of "font-size-delta" */ |
| set fontSizeDelta(String value) { |
| setProperty('font-size-delta', value, ''); |
| } |
| |
| /** Gets the value of "font-smoothing" */ |
| String get fontSmoothing => getPropertyValue('font-smoothing'); |
| |
| /** Sets the value of "font-smoothing" */ |
| set fontSmoothing(String value) { |
| setProperty('font-smoothing', value, ''); |
| } |
| |
| /** Gets the value of "font-stretch" */ |
| String get fontStretch => getPropertyValue('font-stretch'); |
| |
| /** Sets the value of "font-stretch" */ |
| set fontStretch(String value) { |
| setProperty('font-stretch', value, ''); |
| } |
| |
| /** Gets the value of "font-style" */ |
| String get fontStyle => getPropertyValue('font-style'); |
| |
| /** Sets the value of "font-style" */ |
| set fontStyle(String value) { |
| setProperty('font-style', value, ''); |
| } |
| |
| /** Gets the value of "font-variant" */ |
| String get fontVariant => getPropertyValue('font-variant'); |
| |
| /** Sets the value of "font-variant" */ |
| set fontVariant(String value) { |
| setProperty('font-variant', value, ''); |
| } |
| |
| /** Gets the value of "font-variant-ligatures" */ |
| String get fontVariantLigatures => getPropertyValue('font-variant-ligatures'); |
| |
| /** Sets the value of "font-variant-ligatures" */ |
| set fontVariantLigatures(String value) { |
| setProperty('font-variant-ligatures', value, ''); |
| } |
| |
| /** Gets the value of "font-weight" */ |
| String get fontWeight => getPropertyValue('font-weight'); |
| |
| /** Sets the value of "font-weight" */ |
| set fontWeight(String value) { |
| setProperty('font-weight', value, ''); |
| } |
| |
| /** Gets the value of "grid" */ |
| String get grid => getPropertyValue('grid'); |
| |
| /** Sets the value of "grid" */ |
| set grid(String value) { |
| setProperty('grid', value, ''); |
| } |
| |
| /** Gets the value of "grid-area" */ |
| String get gridArea => getPropertyValue('grid-area'); |
| |
| /** Sets the value of "grid-area" */ |
| set gridArea(String value) { |
| setProperty('grid-area', value, ''); |
| } |
| |
| /** Gets the value of "grid-auto-columns" */ |
| String get gridAutoColumns => getPropertyValue('grid-auto-columns'); |
| |
| /** Sets the value of "grid-auto-columns" */ |
| set gridAutoColumns(String value) { |
| setProperty('grid-auto-columns', value, ''); |
| } |
| |
| /** Gets the value of "grid-auto-flow" */ |
| String get gridAutoFlow => getPropertyValue('grid-auto-flow'); |
| |
| /** Sets the value of "grid-auto-flow" */ |
| set gridAutoFlow(String value) { |
| setProperty('grid-auto-flow', value, ''); |
| } |
| |
| /** Gets the value of "grid-auto-rows" */ |
| String get gridAutoRows => getPropertyValue('grid-auto-rows'); |
| |
| /** Sets the value of "grid-auto-rows" */ |
| set gridAutoRows(String value) { |
| setProperty('grid-auto-rows', value, ''); |
| } |
| |
| /** Gets the value of "grid-column" */ |
| String get gridColumn => getPropertyValue('grid-column'); |
| |
| /** Sets the value of "grid-column" */ |
| set gridColumn(String value) { |
| setProperty('grid-column', value, ''); |
| } |
| |
| /** Gets the value of "grid-column-end" */ |
| String get gridColumnEnd => getPropertyValue('grid-column-end'); |
| |
| /** Sets the value of "grid-column-end" */ |
| set gridColumnEnd(String value) { |
| setProperty('grid-column-end', value, ''); |
| } |
| |
| /** Gets the value of "grid-column-start" */ |
| String get gridColumnStart => getPropertyValue('grid-column-start'); |
| |
| /** Sets the value of "grid-column-start" */ |
| set gridColumnStart(String value) { |
| setProperty('grid-column-start', value, ''); |
| } |
| |
| /** Gets the value of "grid-row" */ |
| String get gridRow => getPropertyValue('grid-row'); |
| |
| /** Sets the value of "grid-row" */ |
| set gridRow(String value) { |
| setProperty('grid-row', value, ''); |
| } |
| |
| /** Gets the value of "grid-row-end" */ |
| String get gridRowEnd => getPropertyValue('grid-row-end'); |
| |
| /** Sets the value of "grid-row-end" */ |
| set gridRowEnd(String value) { |
| setProperty('grid-row-end', value, ''); |
| } |
| |
| /** Gets the value of "grid-row-start" */ |
| String get gridRowStart => getPropertyValue('grid-row-start'); |
| |
| /** Sets the value of "grid-row-start" */ |
| set gridRowStart(String value) { |
| setProperty('grid-row-start', value, ''); |
| } |
| |
| /** Gets the value of "grid-template" */ |
| String get gridTemplate => getPropertyValue('grid-template'); |
| |
| /** Sets the value of "grid-template" */ |
| set gridTemplate(String value) { |
| setProperty('grid-template', value, ''); |
| } |
| |
| /** Gets the value of "grid-template-areas" */ |
| String get gridTemplateAreas => getPropertyValue('grid-template-areas'); |
| |
| /** Sets the value of "grid-template-areas" */ |
| set gridTemplateAreas(String value) { |
| setProperty('grid-template-areas', value, ''); |
| } |
| |
| /** Gets the value of "grid-template-columns" */ |
| String get gridTemplateColumns => getPropertyValue('grid-template-columns'); |
| |
| /** Sets the value of "grid-template-columns" */ |
| set gridTemplateColumns(String value) { |
| setProperty('grid-template-columns', value, ''); |
| } |
| |
| /** Gets the value of "grid-template-rows" */ |
| String get gridTemplateRows => getPropertyValue('grid-template-rows'); |
| |
| /** Sets the value of "grid-template-rows" */ |
| set gridTemplateRows(String value) { |
| setProperty('grid-template-rows', value, ''); |
| } |
| |
| /** Gets the value of "height" */ |
| String get height => getPropertyValue('height'); |
| |
| /** Sets the value of "height" */ |
| set height(String value) { |
| setProperty('height', value, ''); |
| } |
| |
| /** Gets the value of "highlight" */ |
| String get highlight => getPropertyValue('highlight'); |
| |
| /** Sets the value of "highlight" */ |
| set highlight(String value) { |
| setProperty('highlight', value, ''); |
| } |
| |
| /** Gets the value of "hyphenate-character" */ |
| String get hyphenateCharacter => getPropertyValue('hyphenate-character'); |
| |
| /** Sets the value of "hyphenate-character" */ |
| set hyphenateCharacter(String value) { |
| setProperty('hyphenate-character', value, ''); |
| } |
| |
| /** Gets the value of "image-rendering" */ |
| String get imageRendering => getPropertyValue('image-rendering'); |
| |
| /** Sets the value of "image-rendering" */ |
| set imageRendering(String value) { |
| setProperty('image-rendering', value, ''); |
| } |
| |
| /** Gets the value of "isolation" */ |
| String get isolation => getPropertyValue('isolation'); |
| |
| /** Sets the value of "isolation" */ |
| set isolation(String value) { |
| setProperty('isolation', value, ''); |
| } |
| |
| /** Gets the value of "justify-content" */ |
| String get justifyContent => getPropertyValue('justify-content'); |
| |
| /** Sets the value of "justify-content" */ |
| set justifyContent(String value) { |
| setProperty('justify-content', value, ''); |
| } |
| |
| /** Gets the value of "justify-self" */ |
| String get justifySelf => getPropertyValue('justify-self'); |
| |
| /** Sets the value of "justify-self" */ |
| set justifySelf(String value) { |
| setProperty('justify-self', value, ''); |
| } |
| |
| /** Gets the value of "left" */ |
| String get left => getPropertyValue('left'); |
| |
| /** Sets the value of "left" */ |
| set left(String value) { |
| setProperty('left', value, ''); |
| } |
| |
| /** Gets the value of "letter-spacing" */ |
| String get letterSpacing => getPropertyValue('letter-spacing'); |
| |
| /** Sets the value of "letter-spacing" */ |
| set letterSpacing(String value) { |
| setProperty('letter-spacing', value, ''); |
| } |
| |
| /** Gets the value of "line-box-contain" */ |
| String get lineBoxContain => getPropertyValue('line-box-contain'); |
| |
| /** Sets the value of "line-box-contain" */ |
| set lineBoxContain(String value) { |
| setProperty('line-box-contain', value, ''); |
| } |
| |
| /** Gets the value of "line-break" */ |
| String get lineBreak => getPropertyValue('line-break'); |
| |
| /** Sets the value of "line-break" */ |
| set lineBreak(String value) { |
| setProperty('line-break', value, ''); |
| } |
| |
| /** Gets the value of "line-clamp" */ |
| String get lineClamp => getPropertyValue('line-clamp'); |
| |
| /** Sets the value of "line-clamp" */ |
| set lineClamp(String value) { |
| setProperty('line-clamp', value, ''); |
| } |
| |
| /** Gets the value of "line-height" */ |
| String get lineHeight => getPropertyValue('line-height'); |
| |
| /** Sets the value of "line-height" */ |
| set lineHeight(String value) { |
| setProperty('line-height', value, ''); |
| } |
| |
| /** Gets the value of "list-style" */ |
| String get listStyle => getPropertyValue('list-style'); |
| |
| /** Sets the value of "list-style" */ |
| set listStyle(String value) { |
| setProperty('list-style', value, ''); |
| } |
| |
| /** Gets the value of "list-style-image" */ |
| String get listStyleImage => getPropertyValue('list-style-image'); |
| |
| /** Sets the value of "list-style-image" */ |
| set listStyleImage(String value) { |
| setProperty('list-style-image', value, ''); |
| } |
| |
| /** Gets the value of "list-style-position" */ |
| String get listStylePosition => getPropertyValue('list-style-position'); |
| |
| /** Sets the value of "list-style-position" */ |
| set listStylePosition(String value) { |
| setProperty('list-style-position', value, ''); |
| } |
| |
| /** Gets the value of "list-style-type" */ |
| String get listStyleType => getPropertyValue('list-style-type'); |
| |
| /** Sets the value of "list-style-type" */ |
| set listStyleType(String value) { |
| setProperty('list-style-type', value, ''); |
| } |
| |
| /** Gets the value of "locale" */ |
| String get locale => getPropertyValue('locale'); |
| |
| /** Sets the value of "locale" */ |
| set locale(String value) { |
| setProperty('locale', value, ''); |
| } |
| |
| /** Gets the value of "logical-height" */ |
| String get logicalHeight => getPropertyValue('logical-height'); |
| |
| /** Sets the value of "logical-height" */ |
| set logicalHeight(String value) { |
| setProperty('logical-height', value, ''); |
| } |
| |
| /** Gets the value of "logical-width" */ |
| String get logicalWidth => getPropertyValue('logical-width'); |
| |
| /** Sets the value of "logical-width" */ |
| set logicalWidth(String value) { |
| setProperty('logical-width', value, ''); |
| } |
| |
| /** Gets the value of "margin" */ |
| String get margin => getPropertyValue('margin'); |
| |
| /** Sets the value of "margin" */ |
| set margin(String value) { |
| setProperty('margin', value, ''); |
| } |
| |
| /** Gets the value of "margin-after" */ |
| String get marginAfter => getPropertyValue('margin-after'); |
| |
| /** Sets the value of "margin-after" */ |
| set marginAfter(String value) { |
| setProperty('margin-after', value, ''); |
| } |
| |
| /** Gets the value of "margin-after-collapse" */ |
| String get marginAfterCollapse => getPropertyValue('margin-after-collapse'); |
| |
| /** Sets the value of "margin-after-collapse" */ |
| set marginAfterCollapse(String value) { |
| setProperty('margin-after-collapse', value, ''); |
| } |
| |
| /** Gets the value of "margin-before" */ |
| String get marginBefore => getPropertyValue('margin-before'); |
| |
| /** Sets the value of "margin-before" */ |
| set marginBefore(String value) { |
| setProperty('margin-before', value, ''); |
| } |
| |
| /** Gets the value of "margin-before-collapse" */ |
| String get marginBeforeCollapse => getPropertyValue('margin-before-collapse'); |
| |
| /** Sets the value of "margin-before-collapse" */ |
| set marginBeforeCollapse(String value) { |
| setProperty('margin-before-collapse', value, ''); |
| } |
| |
| /** Gets the value of "margin-bottom" */ |
| String get marginBottom => getPropertyValue('margin-bottom'); |
| |
| /** Sets the value of "margin-bottom" */ |
| set marginBottom(String value) { |
| setProperty('margin-bottom', value, ''); |
| } |
| |
| /** Gets the value of "margin-bottom-collapse" */ |
| String get marginBottomCollapse => getPropertyValue('margin-bottom-collapse'); |
| |
| /** Sets the value of "margin-bottom-collapse" */ |
| set marginBottomCollapse(String value) { |
| setProperty('margin-bottom-collapse', value, ''); |
| } |
| |
| /** Gets the value of "margin-collapse" */ |
| String get marginCollapse => getPropertyValue('margin-collapse'); |
| |
| /** Sets the value of "margin-collapse" */ |
| set marginCollapse(String value) { |
| setProperty('margin-collapse', value, ''); |
| } |
| |
| /** Gets the value of "margin-end" */ |
| String get marginEnd => getPropertyValue('margin-end'); |
| |
| /** Sets the value of "margin-end" */ |
| set marginEnd(String value) { |
| setProperty('margin-end', value, ''); |
| } |
| |
| /** Gets the value of "margin-left" */ |
| String get marginLeft => getPropertyValue('margin-left'); |
| |
| /** Sets the value of "margin-left" */ |
| set marginLeft(String value) { |
| setProperty('margin-left', value, ''); |
| } |
| |
| /** Gets the value of "margin-right" */ |
| String get marginRight => getPropertyValue('margin-right'); |
| |
| /** Sets the value of "margin-right" */ |
| set marginRight(String value) { |
| setProperty('margin-right', value, ''); |
| } |
| |
| /** Gets the value of "margin-start" */ |
| String get marginStart => getPropertyValue('margin-start'); |
| |
| /** Sets the value of "margin-start" */ |
| set marginStart(String value) { |
| setProperty('margin-start', value, ''); |
| } |
| |
| /** Gets the value of "margin-top" */ |
| String get marginTop => getPropertyValue('margin-top'); |
| |
| /** Sets the value of "margin-top" */ |
| set marginTop(String value) { |
| setProperty('margin-top', value, ''); |
| } |
| |
| /** Gets the value of "margin-top-collapse" */ |
| String get marginTopCollapse => getPropertyValue('margin-top-collapse'); |
| |
| /** Sets the value of "margin-top-collapse" */ |
| set marginTopCollapse(String value) { |
| setProperty('margin-top-collapse', value, ''); |
| } |
| |
| /** Gets the value of "mask" */ |
| String get mask => getPropertyValue('mask'); |
| |
| /** Sets the value of "mask" */ |
| set mask(String value) { |
| setProperty('mask', value, ''); |
| } |
| |
| /** Gets the value of "mask-box-image" */ |
| String get maskBoxImage => getPropertyValue('mask-box-image'); |
| |
| /** Sets the value of "mask-box-image" */ |
| set maskBoxImage(String value) { |
| setProperty('mask-box-image', value, ''); |
| } |
| |
| /** Gets the value of "mask-box-image-outset" */ |
| String get maskBoxImageOutset => getPropertyValue('mask-box-image-outset'); |
| |
| /** Sets the value of "mask-box-image-outset" */ |
| set maskBoxImageOutset(String value) { |
| setProperty('mask-box-image-outset', value, ''); |
| } |
| |
| /** Gets the value of "mask-box-image-repeat" */ |
| String get maskBoxImageRepeat => getPropertyValue('mask-box-image-repeat'); |
| |
| /** Sets the value of "mask-box-image-repeat" */ |
| set maskBoxImageRepeat(String value) { |
| setProperty('mask-box-image-repeat', value, ''); |
| } |
| |
| /** Gets the value of "mask-box-image-slice" */ |
| String get maskBoxImageSlice => getPropertyValue('mask-box-image-slice'); |
| |
| /** Sets the value of "mask-box-image-slice" */ |
| set maskBoxImageSlice(String value) { |
| setProperty('mask-box-image-slice', value, ''); |
| } |
| |
| /** Gets the value of "mask-box-image-source" */ |
| String get maskBoxImageSource => getPropertyValue('mask-box-image-source'); |
| |
| /** Sets the value of "mask-box-image-source" */ |
| set maskBoxImageSource(String value) { |
| setProperty('mask-box-image-source', value, ''); |
| } |
| |
| /** Gets the value of "mask-box-image-width" */ |
| String get maskBoxImageWidth => getPropertyValue('mask-box-image-width'); |
| |
| /** Sets the value of "mask-box-image-width" */ |
| set maskBoxImageWidth(String value) { |
| setProperty('mask-box-image-width', value, ''); |
| } |
| |
| /** Gets the value of "mask-clip" */ |
| String get maskClip => getPropertyValue('mask-clip'); |
| |
| /** Sets the value of "mask-clip" */ |
| set maskClip(String value) { |
| setProperty('mask-clip', value, ''); |
| } |
| |
| /** Gets the value of "mask-composite" */ |
| String get maskComposite => getPropertyValue('mask-composite'); |
| |
| /** Sets the value of "mask-composite" */ |
| set maskComposite(String value) { |
| setProperty('mask-composite', value, ''); |
| } |
| |
| /** Gets the value of "mask-image" */ |
| String get maskImage => getPropertyValue('mask-image'); |
| |
| /** Sets the value of "mask-image" */ |
| set maskImage(String value) { |
| setProperty('mask-image', value, ''); |
| } |
| |
| /** Gets the value of "mask-origin" */ |
| String get maskOrigin => getPropertyValue('mask-origin'); |
| |
| /** Sets the value of "mask-origin" */ |
| set maskOrigin(String value) { |
| setProperty('mask-origin', value, ''); |
| } |
| |
| /** Gets the value of "mask-position" */ |
| String get maskPosition => getPropertyValue('mask-position'); |
| |
| /** Sets the value of "mask-position" */ |
| set maskPosition(String value) { |
| setProperty('mask-position', value, ''); |
| } |
| |
| /** Gets the value of "mask-position-x" */ |
| String get maskPositionX => getPropertyValue('mask-position-x'); |
| |
| /** Sets the value of "mask-position-x" */ |
| set maskPositionX(String value) { |
| setProperty('mask-position-x', value, ''); |
| } |
| |
| /** Gets the value of "mask-position-y" */ |
| String get maskPositionY => getPropertyValue('mask-position-y'); |
| |
| /** Sets the value of "mask-position-y" */ |
| set maskPositionY(String value) { |
| setProperty('mask-position-y', value, ''); |
| } |
| |
| /** Gets the value of "mask-repeat" */ |
| String get maskRepeat => getPropertyValue('mask-repeat'); |
| |
| /** Sets the value of "mask-repeat" */ |
| set maskRepeat(String value) { |
| setProperty('mask-repeat', value, ''); |
| } |
| |
| /** Gets the value of "mask-repeat-x" */ |
| String get maskRepeatX => getPropertyValue('mask-repeat-x'); |
| |
| /** Sets the value of "mask-repeat-x" */ |
| set maskRepeatX(String value) { |
| setProperty('mask-repeat-x', value, ''); |
| } |
| |
| /** Gets the value of "mask-repeat-y" */ |
| String get maskRepeatY => getPropertyValue('mask-repeat-y'); |
| |
| /** Sets the value of "mask-repeat-y" */ |
| set maskRepeatY(String value) { |
| setProperty('mask-repeat-y', value, ''); |
| } |
| |
| /** Gets the value of "mask-size" */ |
| String get maskSize => getPropertyValue('mask-size'); |
| |
| /** Sets the value of "mask-size" */ |
| set maskSize(String value) { |
| setProperty('mask-size', value, ''); |
| } |
| |
| /** Gets the value of "mask-source-type" */ |
| String get maskSourceType => getPropertyValue('mask-source-type'); |
| |
| /** Sets the value of "mask-source-type" */ |
| set maskSourceType(String value) { |
| setProperty('mask-source-type', value, ''); |
| } |
| |
| /** Gets the value of "max-height" */ |
| String get maxHeight => getPropertyValue('max-height'); |
| |
| /** Sets the value of "max-height" */ |
| set maxHeight(String value) { |
| setProperty('max-height', value, ''); |
| } |
| |
| /** Gets the value of "max-logical-height" */ |
| String get maxLogicalHeight => getPropertyValue('max-logical-height'); |
| |
| /** Sets the value of "max-logical-height" */ |
| set maxLogicalHeight(String value) { |
| setProperty('max-logical-height', value, ''); |
| } |
| |
| /** Gets the value of "max-logical-width" */ |
| String get maxLogicalWidth => getPropertyValue('max-logical-width'); |
| |
| /** Sets the value of "max-logical-width" */ |
| set maxLogicalWidth(String value) { |
| setProperty('max-logical-width', value, ''); |
| } |
| |
| /** Gets the value of "max-width" */ |
| String get maxWidth => getPropertyValue('max-width'); |
| |
| /** Sets the value of "max-width" */ |
| set maxWidth(String value) { |
| setProperty('max-width', value, ''); |
| } |
| |
| /** Gets the value of "max-zoom" */ |
| String get maxZoom => getPropertyValue('max-zoom'); |
| |
| /** Sets the value of "max-zoom" */ |
| set maxZoom(String value) { |
| setProperty('max-zoom', value, ''); |
| } |
| |
| /** Gets the value of "min-height" */ |
| String get minHeight => getPropertyValue('min-height'); |
| |
| /** Sets the value of "min-height" */ |
| set minHeight(String value) { |
| setProperty('min-height', value, ''); |
| } |
| |
| /** Gets the value of "min-logical-height" */ |
| String get minLogicalHeight => getPropertyValue('min-logical-height'); |
| |
| /** Sets the value of "min-logical-height" */ |
| set minLogicalHeight(String value) { |
| setProperty('min-logical-height', value, ''); |
| } |
| |
| /** Gets the value of "min-logical-width" */ |
| String get minLogicalWidth => getPropertyValue('min-logical-width'); |
| |
| /** Sets the value of "min-logical-width" */ |
| set minLogicalWidth(String value) { |
| setProperty('min-logical-width', value, ''); |
| } |
| |
| /** Gets the value of "min-width" */ |
| String get minWidth => getPropertyValue('min-width'); |
| |
| /** Sets the value of "min-width" */ |
| set minWidth(String value) { |
| setProperty('min-width', value, ''); |
| } |
| |
| /** Gets the value of "min-zoom" */ |
| String get minZoom => getPropertyValue('min-zoom'); |
| |
| /** Sets the value of "min-zoom" */ |
| set minZoom(String value) { |
| setProperty('min-zoom', value, ''); |
| } |
| |
| /** Gets the value of "mix-blend-mode" */ |
| String get mixBlendMode => getPropertyValue('mix-blend-mode'); |
| |
| /** Sets the value of "mix-blend-mode" */ |
| set mixBlendMode(String value) { |
| setProperty('mix-blend-mode', value, ''); |
| } |
| |
| /** Gets the value of "object-fit" */ |
| String get objectFit => getPropertyValue('object-fit'); |
| |
| /** Sets the value of "object-fit" */ |
| set objectFit(String value) { |
| setProperty('object-fit', value, ''); |
| } |
| |
| /** Gets the value of "object-position" */ |
| String get objectPosition => getPropertyValue('object-position'); |
| |
| /** Sets the value of "object-position" */ |
| set objectPosition(String value) { |
| setProperty('object-position', value, ''); |
| } |
| |
| /** Gets the value of "opacity" */ |
| String get opacity => getPropertyValue('opacity'); |
| |
| /** Sets the value of "opacity" */ |
| set opacity(String value) { |
| setProperty('opacity', value, ''); |
| } |
| |
| /** Gets the value of "order" */ |
| String get order => getPropertyValue('order'); |
| |
| /** Sets the value of "order" */ |
| set order(String value) { |
| setProperty('order', value, ''); |
| } |
| |
| /** Gets the value of "orientation" */ |
| String get orientation => getPropertyValue('orientation'); |
| |
| /** Sets the value of "orientation" */ |
| set orientation(String value) { |
| setProperty('orientation', value, ''); |
| } |
| |
| /** Gets the value of "orphans" */ |
| String get orphans => getPropertyValue('orphans'); |
| |
| /** Sets the value of "orphans" */ |
| set orphans(String value) { |
| setProperty('orphans', value, ''); |
| } |
| |
| /** Gets the value of "outline" */ |
| String get outline => getPropertyValue('outline'); |
| |
| /** Sets the value of "outline" */ |
| set outline(String value) { |
| setProperty('outline', value, ''); |
| } |
| |
| /** Gets the value of "outline-color" */ |
| String get outlineColor => getPropertyValue('outline-color'); |
| |
| /** Sets the value of "outline-color" */ |
| set outlineColor(String value) { |
| setProperty('outline-color', value, ''); |
| } |
| |
| /** Gets the value of "outline-offset" */ |
| String get outlineOffset => getPropertyValue('outline-offset'); |
| |
| /** Sets the value of "outline-offset" */ |
| set outlineOffset(String value) { |
| setProperty('outline-offset', value, ''); |
| } |
| |
| /** Gets the value of "outline-style" */ |
| String get outlineStyle => getPropertyValue('outline-style'); |
| |
| /** Sets the value of "outline-style" */ |
| set outlineStyle(String value) { |
| setProperty('outline-style', value, ''); |
| } |
| |
| /** Gets the value of "outline-width" */ |
| String get outlineWidth => getPropertyValue('outline-width'); |
| |
| /** Sets the value of "outline-width" */ |
| set outlineWidth(String value) { |
| setProperty('outline-width', value, ''); |
| } |
| |
| /** Gets the value of "overflow" */ |
| String get overflow => getPropertyValue('overflow'); |
| |
| /** Sets the value of "overflow" */ |
| set overflow(String value) { |
| setProperty('overflow', value, ''); |
| } |
| |
| /** Gets the value of "overflow-wrap" */ |
| String get overflowWrap => getPropertyValue('overflow-wrap'); |
| |
| /** Sets the value of "overflow-wrap" */ |
| set overflowWrap(String value) { |
| setProperty('overflow-wrap', value, ''); |
| } |
| |
| /** Gets the value of "overflow-x" */ |
| String get overflowX => getPropertyValue('overflow-x'); |
| |
| /** Sets the value of "overflow-x" */ |
| set overflowX(String value) { |
| setProperty('overflow-x', value, ''); |
| } |
| |
| /** Gets the value of "overflow-y" */ |
| String get overflowY => getPropertyValue('overflow-y'); |
| |
| /** Sets the value of "overflow-y" */ |
| set overflowY(String value) { |
| setProperty('overflow-y', value, ''); |
| } |
| |
| /** Gets the value of "padding" */ |
| String get padding => getPropertyValue('padding'); |
| |
| /** Sets the value of "padding" */ |
| set padding(String value) { |
| setProperty('padding', value, ''); |
| } |
| |
| /** Gets the value of "padding-after" */ |
| String get paddingAfter => getPropertyValue('padding-after'); |
| |
| /** Sets the value of "padding-after" */ |
| set paddingAfter(String value) { |
| setProperty('padding-after', value, ''); |
| } |
| |
| /** Gets the value of "padding-before" */ |
| String get paddingBefore => getPropertyValue('padding-before'); |
| |
| /** Sets the value of "padding-before" */ |
| set paddingBefore(String value) { |
| setProperty('padding-before', value, ''); |
| } |
| |
| /** Gets the value of "padding-bottom" */ |
| String get paddingBottom => getPropertyValue('padding-bottom'); |
| |
| /** Sets the value of "padding-bottom" */ |
| set paddingBottom(String value) { |
| setProperty('padding-bottom', value, ''); |
| } |
| |
| /** Gets the value of "padding-end" */ |
| String get paddingEnd => getPropertyValue('padding-end'); |
| |
| /** Sets the value of "padding-end" */ |
| set paddingEnd(String value) { |
| setProperty('padding-end', value, ''); |
| } |
| |
| /** Gets the value of "padding-left" */ |
| String get paddingLeft => getPropertyValue('padding-left'); |
| |
| /** Sets the value of "padding-left" */ |
| set paddingLeft(String value) { |
| setProperty('padding-left', value, ''); |
| } |
| |
| /** Gets the value of "padding-right" */ |
| String get paddingRight => getPropertyValue('padding-right'); |
| |
| /** Sets the value of "padding-right" */ |
| set paddingRight(String value) { |
| setProperty('padding-right', value, ''); |
| } |
| |
| /** Gets the value of "padding-start" */ |
| String get paddingStart => getPropertyValue('padding-start'); |
| |
| /** Sets the value of "padding-start" */ |
| set paddingStart(String value) { |
| setProperty('padding-start', value, ''); |
| } |
| |
| /** Gets the value of "padding-top" */ |
| String get paddingTop => getPropertyValue('padding-top'); |
| |
| /** Sets the value of "padding-top" */ |
| set paddingTop(String value) { |
| setProperty('padding-top', value, ''); |
| } |
| |
| /** Gets the value of "page" */ |
| String get page => getPropertyValue('page'); |
| |
| /** Sets the value of "page" */ |
| set page(String value) { |
| setProperty('page', value, ''); |
| } |
| |
| /** Gets the value of "page-break-after" */ |
| String get pageBreakAfter => getPropertyValue('page-break-after'); |
| |
| /** Sets the value of "page-break-after" */ |
| set pageBreakAfter(String value) { |
| setProperty('page-break-after', value, ''); |
| } |
| |
| /** Gets the value of "page-break-before" */ |
| String get pageBreakBefore => getPropertyValue('page-break-before'); |
| |
| /** Sets the value of "page-break-before" */ |
| set pageBreakBefore(String value) { |
| setProperty('page-break-before', value, ''); |
| } |
| |
| /** Gets the value of "page-break-inside" */ |
| String get pageBreakInside => getPropertyValue('page-break-inside'); |
| |
| /** Sets the value of "page-break-inside" */ |
| set pageBreakInside(String value) { |
| setProperty('page-break-inside', value, ''); |
| } |
| |
| /** Gets the value of "perspective" */ |
| String get perspective => getPropertyValue('perspective'); |
| |
| /** Sets the value of "perspective" */ |
| set perspective(String value) { |
| setProperty('perspective', value, ''); |
| } |
| |
| /** Gets the value of "perspective-origin" */ |
| String get perspectiveOrigin => getPropertyValue('perspective-origin'); |
| |
| /** Sets the value of "perspective-origin" */ |
| set perspectiveOrigin(String value) { |
| setProperty('perspective-origin', value, ''); |
| } |
| |
| /** Gets the value of "perspective-origin-x" */ |
| String get perspectiveOriginX => getPropertyValue('perspective-origin-x'); |
| |
| /** Sets the value of "perspective-origin-x" */ |
| set perspectiveOriginX(String value) { |
| setProperty('perspective-origin-x', value, ''); |
| } |
| |
| /** Gets the value of "perspective-origin-y" */ |
| String get perspectiveOriginY => getPropertyValue('perspective-origin-y'); |
| |
| /** Sets the value of "perspective-origin-y" */ |
| set perspectiveOriginY(String value) { |
| setProperty('perspective-origin-y', value, ''); |
| } |
| |
| /** Gets the value of "pointer-events" */ |
| String get pointerEvents => getPropertyValue('pointer-events'); |
| |
| /** Sets the value of "pointer-events" */ |
| set pointerEvents(String value) { |
| setProperty('pointer-events', value, ''); |
| } |
| |
| /** Gets the value of "position" */ |
| String get position => getPropertyValue('position'); |
| |
| /** Sets the value of "position" */ |
| set position(String value) { |
| setProperty('position', value, ''); |
| } |
| |
| /** Gets the value of "print-color-adjust" */ |
| String get printColorAdjust => getPropertyValue('print-color-adjust'); |
| |
| /** Sets the value of "print-color-adjust" */ |
| set printColorAdjust(String value) { |
| setProperty('print-color-adjust', value, ''); |
| } |
| |
| /** Gets the value of "quotes" */ |
| String get quotes => getPropertyValue('quotes'); |
| |
| /** Sets the value of "quotes" */ |
| set quotes(String value) { |
| setProperty('quotes', value, ''); |
| } |
| |
| /** Gets the value of "resize" */ |
| String get resize => getPropertyValue('resize'); |
| |
| /** Sets the value of "resize" */ |
| set resize(String value) { |
| setProperty('resize', value, ''); |
| } |
| |
| /** Gets the value of "right" */ |
| String get right => getPropertyValue('right'); |
| |
| /** Sets the value of "right" */ |
| set right(String value) { |
| setProperty('right', value, ''); |
| } |
| |
| /** Gets the value of "rtl-ordering" */ |
| String get rtlOrdering => getPropertyValue('rtl-ordering'); |
| |
| /** Sets the value of "rtl-ordering" */ |
| set rtlOrdering(String value) { |
| setProperty('rtl-ordering', value, ''); |
| } |
| |
| /** Gets the value of "ruby-position" */ |
| String get rubyPosition => getPropertyValue('ruby-position'); |
| |
| /** Sets the value of "ruby-position" */ |
| set rubyPosition(String value) { |
| setProperty('ruby-position', value, ''); |
| } |
| |
| /** Gets the value of "scroll-behavior" */ |
| String get scrollBehavior => getPropertyValue('scroll-behavior'); |
| |
| /** Sets the value of "scroll-behavior" */ |
| set scrollBehavior(String value) { |
| setProperty('scroll-behavior', value, ''); |
| } |
| |
| /** Gets the value of "shape-image-threshold" */ |
| String get shapeImageThreshold => getPropertyValue('shape-image-threshold'); |
| |
| /** Sets the value of "shape-image-threshold" */ |
| set shapeImageThreshold(String value) { |
| setProperty('shape-image-threshold', value, ''); |
| } |
| |
| /** Gets the value of "shape-margin" */ |
| String get shapeMargin => getPropertyValue('shape-margin'); |
| |
| /** Sets the value of "shape-margin" */ |
| set shapeMargin(String value) { |
| setProperty('shape-margin', value, ''); |
| } |
| |
| /** Gets the value of "shape-outside" */ |
| String get shapeOutside => getPropertyValue('shape-outside'); |
| |
| /** Sets the value of "shape-outside" */ |
| set shapeOutside(String value) { |
| setProperty('shape-outside', value, ''); |
| } |
| |
| /** Gets the value of "size" */ |
| String get size => getPropertyValue('size'); |
| |
| /** Sets the value of "size" */ |
| set size(String value) { |
| setProperty('size', value, ''); |
| } |
| |
| /** Gets the value of "speak" */ |
| String get speak => getPropertyValue('speak'); |
| |
| /** Sets the value of "speak" */ |
| set speak(String value) { |
| setProperty('speak', value, ''); |
| } |
| |
| /** Gets the value of "src" */ |
| String get src => getPropertyValue('src'); |
| |
| /** Sets the value of "src" */ |
| set src(String value) { |
| setProperty('src', value, ''); |
| } |
| |
| /** Gets the value of "tab-size" */ |
| String get tabSize => getPropertyValue('tab-size'); |
| |
| /** Sets the value of "tab-size" */ |
| set tabSize(String value) { |
| setProperty('tab-size', value, ''); |
| } |
| |
| /** Gets the value of "table-layout" */ |
| String get tableLayout => getPropertyValue('table-layout'); |
| |
| /** Sets the value of "table-layout" */ |
| set tableLayout(String value) { |
| setProperty('table-layout', value, ''); |
| } |
| |
| /** Gets the value of "tap-highlight-color" */ |
| String get tapHighlightColor => getPropertyValue('tap-highlight-color'); |
| |
| /** Sets the value of "tap-highlight-color" */ |
| set tapHighlightColor(String value) { |
| setProperty('tap-highlight-color', value, ''); |
| } |
| |
| /** Gets the value of "text-align" */ |
| String get textAlign => getPropertyValue('text-align'); |
| |
| /** Sets the value of "text-align" */ |
| set textAlign(String value) { |
| setProperty('text-align', value, ''); |
| } |
| |
| /** Gets the value of "text-align-last" */ |
| String get textAlignLast => getPropertyValue('text-align-last'); |
| |
| /** Sets the value of "text-align-last" */ |
| set textAlignLast(String value) { |
| setProperty('text-align-last', value, ''); |
| } |
| |
| /** Gets the value of "text-combine" */ |
| String get textCombine => getPropertyValue('text-combine'); |
| |
| /** Sets the value of "text-combine" */ |
| set textCombine(String value) { |
| setProperty('text-combine', value, ''); |
| } |
| |
| /** Gets the value of "text-decoration" */ |
| String get textDecoration => getPropertyValue('text-decoration'); |
| |
| /** Sets the value of "text-decoration" */ |
| set textDecoration(String value) { |
| setProperty('text-decoration', value, ''); |
| } |
| |
| /** Gets the value of "text-decoration-color" */ |
| String get textDecorationColor => getPropertyValue('text-decoration-color'); |
| |
| /** Sets the value of "text-decoration-color" */ |
| set textDecorationColor(String value) { |
| setProperty('text-decoration-color', value, ''); |
| } |
| |
| /** Gets the value of "text-decoration-line" */ |
| String get textDecorationLine => getPropertyValue('text-decoration-line'); |
| |
| /** Sets the value of "text-decoration-line" */ |
| set textDecorationLine(String value) { |
| setProperty('text-decoration-line', value, ''); |
| } |
| |
| /** Gets the value of "text-decoration-style" */ |
| String get textDecorationStyle => getPropertyValue('text-decoration-style'); |
| |
| /** Sets the value of "text-decoration-style" */ |
| set textDecorationStyle(String value) { |
| setProperty('text-decoration-style', value, ''); |
| } |
| |
| /** Gets the value of "text-decorations-in-effect" */ |
| String get textDecorationsInEffect => |
| getPropertyValue('text-decorations-in-effect'); |
| |
| /** Sets the value of "text-decorations-in-effect" */ |
| set textDecorationsInEffect(String value) { |
| setProperty('text-decorations-in-effect', value, ''); |
| } |
| |
| /** Gets the value of "text-emphasis" */ |
| String get textEmphasis => getPropertyValue('text-emphasis'); |
| |
| /** Sets the value of "text-emphasis" */ |
| set textEmphasis(String value) { |
| setProperty('text-emphasis', value, ''); |
| } |
| |
| /** Gets the value of "text-emphasis-color" */ |
| String get textEmphasisColor => getPropertyValue('text-emphasis-color'); |
| |
| /** Sets the value of "text-emphasis-color" */ |
| set textEmphasisColor(String value) { |
| setProperty('text-emphasis-color', value, ''); |
| } |
| |
| /** Gets the value of "text-emphasis-position" */ |
| String get textEmphasisPosition => getPropertyValue('text-emphasis-position'); |
| |
| /** Sets the value of "text-emphasis-position" */ |
| set textEmphasisPosition(String value) { |
| setProperty('text-emphasis-position', value, ''); |
| } |
| |
| /** Gets the value of "text-emphasis-style" */ |
| String get textEmphasisStyle => getPropertyValue('text-emphasis-style'); |
| |
| /** Sets the value of "text-emphasis-style" */ |
| set textEmphasisStyle(String value) { |
| setProperty('text-emphasis-style', value, ''); |
| } |
| |
| /** Gets the value of "text-fill-color" */ |
| String get textFillColor => getPropertyValue('text-fill-color'); |
| |
| /** Sets the value of "text-fill-color" */ |
| set textFillColor(String value) { |
| setProperty('text-fill-color', value, ''); |
| } |
| |
| /** Gets the value of "text-indent" */ |
| String get textIndent => getPropertyValue('text-indent'); |
| |
| /** Sets the value of "text-indent" */ |
| set textIndent(String value) { |
| setProperty('text-indent', value, ''); |
| } |
| |
| /** Gets the value of "text-justify" */ |
| String get textJustify => getPropertyValue('text-justify'); |
| |
| /** Sets the value of "text-justify" */ |
| set textJustify(String value) { |
| setProperty('text-justify', value, ''); |
| } |
| |
| /** Gets the value of "text-line-through-color" */ |
| String get textLineThroughColor => |
| getPropertyValue('text-line-through-color'); |
| |
| /** Sets the value of "text-line-through-color" */ |
| set textLineThroughColor(String value) { |
| setProperty('text-line-through-color', value, ''); |
| } |
| |
| /** Gets the value of "text-line-through-mode" */ |
| String get textLineThroughMode => getPropertyValue('text-line-through-mode'); |
| |
| /** Sets the value of "text-line-through-mode" */ |
| set textLineThroughMode(String value) { |
| setProperty('text-line-through-mode', value, ''); |
| } |
| |
| /** Gets the value of "text-line-through-style" */ |
| String get textLineThroughStyle => |
| getPropertyValue('text-line-through-style'); |
| |
| /** Sets the value of "text-line-through-style" */ |
| set textLineThroughStyle(String value) { |
| setProperty('text-line-through-style', value, ''); |
| } |
| |
| /** Gets the value of "text-line-through-width" */ |
| String get textLineThroughWidth => |
| getPropertyValue('text-line-through-width'); |
| |
| /** Sets the value of "text-line-through-width" */ |
| set textLineThroughWidth(String value) { |
| setProperty('text-line-through-width', value, ''); |
| } |
| |
| /** Gets the value of "text-orientation" */ |
| String get textOrientation => getPropertyValue('text-orientation'); |
| |
| /** Sets the value of "text-orientation" */ |
| set textOrientation(String value) { |
| setProperty('text-orientation', value, ''); |
| } |
| |
| /** Gets the value of "text-overflow" */ |
| String get textOverflow => getPropertyValue('text-overflow'); |
| |
| /** Sets the value of "text-overflow" */ |
| set textOverflow(String value) { |
| setProperty('text-overflow', value, ''); |
| } |
| |
| /** Gets the value of "text-overline-color" */ |
| String get textOverlineColor => getPropertyValue('text-overline-color'); |
| |
| /** Sets the value of "text-overline-color" */ |
| set textOverlineColor(String value) { |
| setProperty('text-overline-color', value, ''); |
| } |
| |
| /** Gets the value of "text-overline-mode" */ |
| String get textOverlineMode => getPropertyValue('text-overline-mode'); |
| |
| /** Sets the value of "text-overline-mode" */ |
| set textOverlineMode(String value) { |
| setProperty('text-overline-mode', value, ''); |
| } |
| |
| /** Gets the value of "text-overline-style" */ |
| String get textOverlineStyle => getPropertyValue('text-overline-style'); |
| |
| /** Sets the value of "text-overline-style" */ |
| set textOverlineStyle(String value) { |
| setProperty('text-overline-style', value, ''); |
| } |
| |
| /** Gets the value of "text-overline-width" */ |
| String get textOverlineWidth => getPropertyValue('text-overline-width'); |
| |
| /** Sets the value of "text-overline-width" */ |
| set textOverlineWidth(String value) { |
| setProperty('text-overline-width', value, ''); |
| } |
| |
| /** Gets the value of "text-rendering" */ |
| String get textRendering => getPropertyValue('text-rendering'); |
| |
| /** Sets the value of "text-rendering" */ |
| set textRendering(String value) { |
| setProperty('text-rendering', value, ''); |
| } |
| |
| /** Gets the value of "text-security" */ |
| String get textSecurity => getPropertyValue('text-security'); |
| |
| /** Sets the value of "text-security" */ |
| set textSecurity(String value) { |
| setProperty('text-security', value, ''); |
| } |
| |
| /** Gets the value of "text-shadow" */ |
| String get textShadow => getPropertyValue('text-shadow'); |
| |
| /** Sets the value of "text-shadow" */ |
| set textShadow(String value) { |
| setProperty('text-shadow', value, ''); |
| } |
| |
| /** Gets the value of "text-stroke" */ |
| String get textStroke => getPropertyValue('text-stroke'); |
| |
| /** Sets the value of "text-stroke" */ |
| set textStroke(String value) { |
| setProperty('text-stroke', value, ''); |
| } |
| |
| /** Gets the value of "text-stroke-color" */ |
| String get textStrokeColor => getPropertyValue('text-stroke-color'); |
| |
| /** Sets the value of "text-stroke-color" */ |
| set textStrokeColor(String value) { |
| setProperty('text-stroke-color', value, ''); |
| } |
| |
| /** Gets the value of "text-stroke-width" */ |
| String get textStrokeWidth => getPropertyValue('text-stroke-width'); |
| |
| /** Sets the value of "text-stroke-width" */ |
| set textStrokeWidth(String value) { |
| setProperty('text-stroke-width', value, ''); |
| } |
| |
| /** Gets the value of "text-transform" */ |
| String get textTransform => getPropertyValue('text-transform'); |
| |
| /** Sets the value of "text-transform" */ |
| set textTransform(String value) { |
| setProperty('text-transform', value, ''); |
| } |
| |
| /** Gets the value of "text-underline-color" */ |
| String get textUnderlineColor => getPropertyValue('text-underline-color'); |
| |
| /** Sets the value of "text-underline-color" */ |
| set textUnderlineColor(String value) { |
| setProperty('text-underline-color', value, ''); |
| } |
| |
| /** Gets the value of "text-underline-mode" */ |
| String get textUnderlineMode => getPropertyValue('text-underline-mode'); |
| |
| /** Sets the value of "text-underline-mode" */ |
| set textUnderlineMode(String value) { |
| setProperty('text-underline-mode', value, ''); |
| } |
| |
| /** Gets the value of "text-underline-position" */ |
| String get textUnderlinePosition => |
| getPropertyValue('text-underline-position'); |
| |
| /** Sets the value of "text-underline-position" */ |
| set textUnderlinePosition(String value) { |
| setProperty('text-underline-position', value, ''); |
| } |
| |
| /** Gets the value of "text-underline-style" */ |
| String get textUnderlineStyle => getPropertyValue('text-underline-style'); |
| |
| /** Sets the value of "text-underline-style" */ |
| set textUnderlineStyle(String value) { |
| setProperty('text-underline-style', value, ''); |
| } |
| |
| /** Gets the value of "text-underline-width" */ |
| String get textUnderlineWidth => getPropertyValue('text-underline-width'); |
| |
| /** Sets the value of "text-underline-width" */ |
| set textUnderlineWidth(String value) { |
| setProperty('text-underline-width', value, ''); |
| } |
| |
| /** Gets the value of "top" */ |
| String get top => getPropertyValue('top'); |
| |
| /** Sets the value of "top" */ |
| set top(String value) { |
| setProperty('top', value, ''); |
| } |
| |
| /** Gets the value of "touch-action" */ |
| String get touchAction => getPropertyValue('touch-action'); |
| |
| /** Sets the value of "touch-action" */ |
| set touchAction(String value) { |
| setProperty('touch-action', value, ''); |
| } |
| |
| /** Gets the value of "touch-action-delay" */ |
| String get touchActionDelay => getPropertyValue('touch-action-delay'); |
| |
| /** Sets the value of "touch-action-delay" */ |
| set touchActionDelay(String value) { |
| setProperty('touch-action-delay', value, ''); |
| } |
| |
| /** Gets the value of "transform" */ |
| String get transform => getPropertyValue('transform'); |
| |
| /** Sets the value of "transform" */ |
| set transform(String value) { |
| setProperty('transform', value, ''); |
| } |
| |
| /** Gets the value of "transform-origin" */ |
| String get transformOrigin => getPropertyValue('transform-origin'); |
| |
| /** Sets the value of "transform-origin" */ |
| set transformOrigin(String value) { |
| setProperty('transform-origin', value, ''); |
| } |
| |
| /** Gets the value of "transform-origin-x" */ |
| String get transformOriginX => getPropertyValue('transform-origin-x'); |
| |
| /** Sets the value of "transform-origin-x" */ |
| set transformOriginX(String value) { |
| setProperty('transform-origin-x', value, ''); |
| } |
| |
| /** Gets the value of "transform-origin-y" */ |
| String get transformOriginY => getPropertyValue('transform-origin-y'); |
| |
| /** Sets the value of "transform-origin-y" */ |
| set transformOriginY(String value) { |
| setProperty('transform-origin-y', value, ''); |
| } |
| |
| /** Gets the value of "transform-origin-z" */ |
| String get transformOriginZ => getPropertyValue('transform-origin-z'); |
| |
| /** Sets the value of "transform-origin-z" */ |
| set transformOriginZ(String value) { |
| setProperty('transform-origin-z', value, ''); |
| } |
| |
| /** Gets the value of "transform-style" */ |
| String get transformStyle => getPropertyValue('transform-style'); |
| |
| /** Sets the value of "transform-style" */ |
| set transformStyle(String value) { |
| setProperty('transform-style', value, ''); |
| } |
| |
| /** Gets the value of "transition" */ @SupportedBrowser( |
| SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| String get transition => getPropertyValue('transition'); |
| |
| /** Sets the value of "transition" */ @SupportedBrowser( |
| SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| set transition(String value) { |
| setProperty('transition', value, ''); |
| } |
| |
| /** Gets the value of "transition-delay" */ |
| String get transitionDelay => getPropertyValue('transition-delay'); |
| |
| /** Sets the value of "transition-delay" */ |
| set transitionDelay(String value) { |
| setProperty('transition-delay', value, ''); |
| } |
| |
| /** Gets the value of "transition-duration" */ |
| String get transitionDuration => getPropertyValue('transition-duration'); |
| |
| /** Sets the value of "transition-duration" */ |
| set transitionDuration(String value) { |
| setProperty('transition-duration', value, ''); |
| } |
| |
| /** Gets the value of "transition-property" */ |
| String get transitionProperty => getPropertyValue('transition-property'); |
| |
| /** Sets the value of "transition-property" */ |
| set transitionProperty(String value) { |
| setProperty('transition-property', value, ''); |
| } |
| |
| /** Gets the value of "transition-timing-function" */ |
| String get transitionTimingFunction => |
| getPropertyValue('transition-timing-function'); |
| |
| /** Sets the value of "transition-timing-function" */ |
| set transitionTimingFunction(String value) { |
| setProperty('transition-timing-function', value, ''); |
| } |
| |
| /** Gets the value of "unicode-bidi" */ |
| String get unicodeBidi => getPropertyValue('unicode-bidi'); |
| |
| /** Sets the value of "unicode-bidi" */ |
| set unicodeBidi(String value) { |
| setProperty('unicode-bidi', value, ''); |
| } |
| |
| /** Gets the value of "unicode-range" */ |
| String get unicodeRange => getPropertyValue('unicode-range'); |
| |
| /** Sets the value of "unicode-range" */ |
| set unicodeRange(String value) { |
| setProperty('unicode-range', value, ''); |
| } |
| |
| /** Gets the value of "user-drag" */ |
| String get userDrag => getPropertyValue('user-drag'); |
| |
| /** Sets the value of "user-drag" */ |
| set userDrag(String value) { |
| setProperty('user-drag', value, ''); |
| } |
| |
| /** Gets the value of "user-modify" */ |
| String get userModify => getPropertyValue('user-modify'); |
| |
| /** Sets the value of "user-modify" */ |
| set userModify(String value) { |
| setProperty('user-modify', value, ''); |
| } |
| |
| /** Gets the value of "user-select" */ |
| String get userSelect => getPropertyValue('user-select'); |
| |
| /** Sets the value of "user-select" */ |
| set userSelect(String value) { |
| setProperty('user-select', value, ''); |
| } |
| |
| /** Gets the value of "user-zoom" */ |
| String get userZoom => getPropertyValue('user-zoom'); |
| |
| /** Sets the value of "user-zoom" */ |
| set userZoom(String value) { |
| setProperty('user-zoom', value, ''); |
| } |
| |
| /** Gets the value of "vertical-align" */ |
| String get verticalAlign => getPropertyValue('vertical-align'); |
| |
| /** Sets the value of "vertical-align" */ |
| set verticalAlign(String value) { |
| setProperty('vertical-align', value, ''); |
| } |
| |
| /** Gets the value of "visibility" */ |
| String get visibility => getPropertyValue('visibility'); |
| |
| /** Sets the value of "visibility" */ |
| set visibility(String value) { |
| setProperty('visibility', value, ''); |
| } |
| |
| /** Gets the value of "white-space" */ |
| String get whiteSpace => getPropertyValue('white-space'); |
| |
| /** Sets the value of "white-space" */ |
| set whiteSpace(String value) { |
| setProperty('white-space', value, ''); |
| } |
| |
| /** Gets the value of "widows" */ |
| String get widows => getPropertyValue('widows'); |
| |
| /** Sets the value of "widows" */ |
| set widows(String value) { |
| setProperty('widows', value, ''); |
| } |
| |
| /** Gets the value of "width" */ |
| String get width => getPropertyValue('width'); |
| |
| /** Sets the value of "width" */ |
| set width(String value) { |
| setProperty('width', value, ''); |
| } |
| |
| /** Gets the value of "will-change" */ |
| String get willChange => getPropertyValue('will-change'); |
| |
| /** Sets the value of "will-change" */ |
| set willChange(String value) { |
| setProperty('will-change', value, ''); |
| } |
| |
| /** Gets the value of "word-break" */ |
| String get wordBreak => getPropertyValue('word-break'); |
| |
| /** Sets the value of "word-break" */ |
| set wordBreak(String value) { |
| setProperty('word-break', value, ''); |
| } |
| |
| /** Gets the value of "word-spacing" */ |
| String get wordSpacing => getPropertyValue('word-spacing'); |
| |
| /** Sets the value of "word-spacing" */ |
| set wordSpacing(String value) { |
| setProperty('word-spacing', value, ''); |
| } |
| |
| /** Gets the value of "word-wrap" */ |
| String get wordWrap => getPropertyValue('word-wrap'); |
| |
| /** Sets the value of "word-wrap" */ |
| set wordWrap(String value) { |
| setProperty('word-wrap', value, ''); |
| } |
| |
| /** Gets the value of "wrap-flow" */ |
| String get wrapFlow => getPropertyValue('wrap-flow'); |
| |
| /** Sets the value of "wrap-flow" */ |
| set wrapFlow(String value) { |
| setProperty('wrap-flow', value, ''); |
| } |
| |
| /** Gets the value of "wrap-through" */ |
| String get wrapThrough => getPropertyValue('wrap-through'); |
| |
| /** Sets the value of "wrap-through" */ |
| set wrapThrough(String value) { |
| setProperty('wrap-through', value, ''); |
| } |
| |
| /** Gets the value of "writing-mode" */ |
| String get writingMode => getPropertyValue('writing-mode'); |
| |
| /** Sets the value of "writing-mode" */ |
| set writingMode(String value) { |
| setProperty('writing-mode', value, ''); |
| } |
| |
| /** Gets the value of "z-index" */ |
| String get zIndex => getPropertyValue('z-index'); |
| |
| /** Sets the value of "z-index" */ |
| set zIndex(String value) { |
| setProperty('z-index', value, ''); |
| } |
| |
| /** Gets the value of "zoom" */ |
| String get zoom => getPropertyValue('zoom'); |
| |
| /** Sets the value of "zoom" */ |
| set zoom(String value) { |
| setProperty('zoom', 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. |
| |
| @DocsEditable() |
| @DomName('CSSStyleRule') |
| @Native("CSSStyleRule") |
| class CssStyleRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssStyleRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSStyleRule.selectorText') |
| @DocsEditable() |
| String selectorText; |
| |
| @DomName('CSSStyleRule.style') |
| @DocsEditable() |
| final CssStyleDeclaration style; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSStyleSheet') |
| @Native("CSSStyleSheet") |
| class CssStyleSheet extends StyleSheet { |
| // To suppress missing implicit constructor warnings. |
| factory CssStyleSheet._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSStyleSheet.cssRules') |
| @DocsEditable() |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| final List<CssRule> cssRules; |
| |
| @DomName('CSSStyleSheet.ownerRule') |
| @DocsEditable() |
| final CssRule ownerRule; |
| |
| @DomName('CSSStyleSheet.rules') |
| @DocsEditable() |
| @Experimental() // non-standard |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| final List<CssRule> rules; |
| |
| @DomName('CSSStyleSheet.addRule') |
| @DocsEditable() |
| @Experimental() // non-standard |
| int addRule(String selector, String style, [int index]) native ; |
| |
| @DomName('CSSStyleSheet.deleteRule') |
| @DocsEditable() |
| void deleteRule(int index) native ; |
| |
| @DomName('CSSStyleSheet.insertRule') |
| @DocsEditable() |
| int insertRule(String rule, [int index]) native ; |
| |
| @DomName('CSSStyleSheet.removeRule') |
| @DocsEditable() |
| @Experimental() // non-standard |
| void removeRule(int index) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSSupportsRule') |
| @Native("CSSSupportsRule") |
| class CssSupportsRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssSupportsRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSSupportsRule.conditionText') |
| @DocsEditable() |
| final String conditionText; |
| |
| @DomName('CSSSupportsRule.cssRules') |
| @DocsEditable() |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| final List<CssRule> cssRules; |
| |
| @DomName('CSSSupportsRule.deleteRule') |
| @DocsEditable() |
| void deleteRule(int index) native ; |
| |
| @DomName('CSSSupportsRule.insertRule') |
| @DocsEditable() |
| int insertRule(String rule, int index) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('CSSViewportRule') |
| @Experimental() // untriaged |
| @Native("CSSViewportRule") |
| class CssViewportRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssViewportRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('CSSViewportRule.style') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final CssStyleDeclaration style; |
| } |
| // 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. |
| |
| @DomName('CustomEvent') |
| @Native("CustomEvent") |
| class CustomEvent extends Event { |
| @Creates('Null') // Set from Dart code; does not instantiate a native type. |
| var _dartDetail; |
| |
| factory CustomEvent(String type, |
| {bool canBubble: true, bool cancelable: true, Object detail}) { |
| final CustomEvent e = document._createEvent('CustomEvent'); |
| |
| e._dartDetail = detail; |
| |
| // Only try setting the detail if it's one of these types to avoid |
| // first-chance exceptions. Can expand this list in the future as needed. |
| if (detail is List || detail is Map || detail is String || detail is num) { |
| try { |
| detail = convertDartToNative_SerializedScriptValue(detail); |
| e._initCustomEvent(type, canBubble, cancelable, detail); |
| } catch (_) { |
| e._initCustomEvent(type, canBubble, cancelable, null); |
| } |
| } else { |
| e._initCustomEvent(type, canBubble, cancelable, null); |
| } |
| |
| return e; |
| } |
| |
| @DomName('CustomEvent.detail') |
| get detail { |
| if (_dartDetail != null) { |
| return _dartDetail; |
| } |
| return _detail; |
| } |
| |
| @DomName('CustomEvent.CustomEvent') |
| @DocsEditable() |
| factory CustomEvent._(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return CustomEvent._create_1(type, eventInitDict_1); |
| } |
| return CustomEvent._create_2(type); |
| } |
| static CustomEvent _create_1(type, eventInitDict) => |
| JS('CustomEvent', 'new CustomEvent(#,#)', type, eventInitDict); |
| static CustomEvent _create_2(type) => |
| JS('CustomEvent', 'new CustomEvent(#)', type); |
| |
| @DomName('CustomEvent._detail') |
| @DocsEditable() |
| @Experimental() // untriaged |
| dynamic get _detail => |
| convertNativeToDart_SerializedScriptValue(this._get__detail); |
| @JSName('detail') |
| @DomName('CustomEvent._detail') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Creates('Null') |
| final dynamic _get__detail; |
| |
| @JSName('initCustomEvent') |
| @DomName('CustomEvent.initCustomEvent') |
| @DocsEditable() |
| void _initCustomEvent( |
| String type, bool bubbles, bool cancelable, Object detail) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLDListElement') |
| @Native("HTMLDListElement") |
| class DListElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DListElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('HTMLDListElement.HTMLDListElement') |
| @DocsEditable() |
| factory DListElement() => document.createElement("dl"); |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| DListElement.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. |
| |
| @DocsEditable() |
| @DomName('HTMLDataListElement') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Native("HTMLDataListElement") |
| class DataListElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DataListElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('HTMLDataListElement.HTMLDataListElement') |
| @DocsEditable() |
| factory DataListElement() => document.createElement("datalist"); |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| DataListElement.created() : super.created(); |
| |
| /// Checks if this type is supported on the current platform. |
| static bool get supported => Element.isTagSupported('datalist'); |
| |
| @DomName('HTMLDataListElement.options') |
| @DocsEditable() |
| @Returns('HtmlCollection') |
| @Creates('HtmlCollection') |
| final List<Node> options; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DataTransfer') |
| @Experimental() // untriaged |
| @Native("DataTransfer") |
| class DataTransfer extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DataTransfer._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DataTransfer.dropEffect') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String dropEffect; |
| |
| @DomName('DataTransfer.effectAllowed') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String effectAllowed; |
| |
| @DomName('DataTransfer.files') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Returns('FileList') |
| @Creates('FileList') |
| final List<File> files; |
| |
| @DomName('DataTransfer.items') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final DataTransferItemList items; |
| |
| @DomName('DataTransfer.types') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final List<String> types; |
| |
| @DomName('DataTransfer.clearData') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void clearData([String format]) native ; |
| |
| @DomName('DataTransfer.getData') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String getData(String format) native ; |
| |
| @DomName('DataTransfer.setData') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void setData(String format, String data) native ; |
| |
| @DomName('DataTransfer.setDragImage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void setDragImage(Element image, int x, int y) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DataTransferItem') |
| // http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#the-datatransferitem-interface |
| @Experimental() |
| @Native("DataTransferItem") |
| class DataTransferItem extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DataTransferItem._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DataTransferItem.kind') |
| @DocsEditable() |
| final String kind; |
| |
| @DomName('DataTransferItem.type') |
| @DocsEditable() |
| final String type; |
| |
| @DomName('DataTransferItem.getAsFile') |
| @DocsEditable() |
| Blob getAsFile() native ; |
| |
| @JSName('getAsString') |
| @DomName('DataTransferItem.getAsString') |
| @DocsEditable() |
| void _getAsString(_StringCallback callback) native ; |
| |
| @JSName('getAsString') |
| @DomName('DataTransferItem.getAsString') |
| @DocsEditable() |
| Future<String> getAsString() { |
| var completer = new Completer<String>(); |
| _getAsString((value) { |
| completer.complete(value); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('webkitGetAsEntry') |
| @DomName('DataTransferItem.webkitGetAsEntry') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| Entry getAsEntry() native ; |
| } |
| // 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('DataTransferItemList') |
| // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-datatransferitemlist-interface |
| @Experimental() |
| @Native("DataTransferItemList") |
| class DataTransferItemList extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DataTransferItemList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DataTransferItemList.length') |
| @DocsEditable() |
| final int length; |
| |
| @DomName('DataTransferItemList.add') |
| @DocsEditable() |
| DataTransferItem add(data_OR_file, [String type]) native ; |
| |
| @JSName('add') |
| @DomName('DataTransferItemList.add') |
| @DocsEditable() |
| DataTransferItem addData(String data, String type) native ; |
| |
| @JSName('add') |
| @DomName('DataTransferItemList.add') |
| @DocsEditable() |
| DataTransferItem addFile(File file) native ; |
| |
| @DomName('DataTransferItemList.clear') |
| @DocsEditable() |
| void clear() native ; |
| |
| @DomName('DataTransferItemList.item') |
| @DocsEditable() |
| DataTransferItem item(int index) native ; |
| |
| @DomName('DataTransferItemList.remove') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void remove(int index) native ; |
| |
| DataTransferItem operator [](int index) { |
| return JS('DataTransferItem', '#[#]', this, index); |
| } |
| } |
| // 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. |
| |
| @DomName('DatabaseCallback') |
| // http://www.w3.org/TR/webdatabase/#databasecallback |
| @Experimental() // deprecated |
| typedef void DatabaseCallback(SqlDatabase database); |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DedicatedWorkerGlobalScope') |
| @Experimental() // untriaged |
| @Native("DedicatedWorkerGlobalScope") |
| class DedicatedWorkerGlobalScope extends WorkerGlobalScope { |
| // To suppress missing implicit constructor warnings. |
| factory DedicatedWorkerGlobalScope._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| /** |
| * Static factory designed to expose `message` events to event |
| * handlers that are not necessarily instances of [DedicatedWorkerGlobalScope]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('DedicatedWorkerGlobalScope.messageEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<MessageEvent> messageEvent = |
| const EventStreamProvider<MessageEvent>('message'); |
| |
| @DomName('DedicatedWorkerGlobalScope.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void postMessage(/*any*/ message, [List<MessagePort> transfer]) { |
| if (transfer != null) { |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_1(message_1, transfer); |
| return; |
| } |
| var message_1 = convertDartToNative_SerializedScriptValue(message); |
| _postMessage_2(message_1); |
| return; |
| } |
| |
| @JSName('postMessage') |
| @DomName('DedicatedWorkerGlobalScope.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_1(message, List<MessagePort> transfer) native ; |
| @JSName('postMessage') |
| @DomName('DedicatedWorkerGlobalScope.postMessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _postMessage_2(message) native ; |
| |
| /// Stream of `message` events handled by this [DedicatedWorkerGlobalScope]. |
| @DomName('DedicatedWorkerGlobalScope.onmessage') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<MessageEvent> get onMessage => messageEvent.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. |
| |
| @DocsEditable() |
| @DomName('DefaultSessionStartEvent') |
| @Experimental() // untriaged |
| @Native("DefaultSessionStartEvent") |
| class DefaultSessionStartEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory DefaultSessionStartEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DefaultSessionStartEvent.DefaultSessionStartEvent') |
| @DocsEditable() |
| factory DefaultSessionStartEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return DefaultSessionStartEvent._create_1(type, eventInitDict_1); |
| } |
| return DefaultSessionStartEvent._create_2(type); |
| } |
| static DefaultSessionStartEvent _create_1(type, eventInitDict) => JS( |
| 'DefaultSessionStartEvent', |
| 'new DefaultSessionStartEvent(#,#)', |
| type, |
| eventInitDict); |
| static DefaultSessionStartEvent _create_2(type) => |
| JS('DefaultSessionStartEvent', 'new DefaultSessionStartEvent(#)', type); |
| |
| @DomName('DefaultSessionStartEvent.session') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final PresentationSession session; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DeprecatedStorageInfo') |
| @Experimental() // untriaged |
| @Native("DeprecatedStorageInfo") |
| class DeprecatedStorageInfo extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DeprecatedStorageInfo._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DeprecatedStorageInfo.PERSISTENT') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const int PERSISTENT = 1; |
| |
| @DomName('DeprecatedStorageInfo.TEMPORARY') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const int TEMPORARY = 0; |
| |
| @DomName('DeprecatedStorageInfo.queryUsageAndQuota') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void queryUsageAndQuota(int storageType, |
| [StorageUsageCallback usageCallback, |
| StorageErrorCallback errorCallback]) native ; |
| |
| @DomName('DeprecatedStorageInfo.requestQuota') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void requestQuota(int storageType, int newQuotaInBytes, |
| [StorageQuotaCallback quotaCallback, |
| StorageErrorCallback errorCallback]) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DeprecatedStorageQuota') |
| @Experimental() // untriaged |
| @Native("DeprecatedStorageQuota") |
| class DeprecatedStorageQuota extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DeprecatedStorageQuota._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DeprecatedStorageQuota.queryUsageAndQuota') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void queryUsageAndQuota(StorageUsageCallback usageCallback, |
| [StorageErrorCallback errorCallback]) native ; |
| |
| @DomName('DeprecatedStorageQuota.requestQuota') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void requestQuota(int newQuotaInBytes, |
| [StorageQuotaCallback quotaCallback, |
| StorageErrorCallback errorCallback]) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLDetailsElement') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| @Native("HTMLDetailsElement") |
| class DetailsElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DetailsElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('HTMLDetailsElement.HTMLDetailsElement') |
| @DocsEditable() |
| factory DetailsElement() => document.createElement("details"); |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| DetailsElement.created() : super.created(); |
| |
| /// Checks if this type is supported on the current platform. |
| static bool get supported => Element.isTagSupported('details'); |
| |
| @DomName('HTMLDetailsElement.open') |
| @DocsEditable() |
| bool open; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DeviceAcceleration') |
| // http://dev.w3.org/geo/api/spec-source-orientation.html#devicemotion |
| @Experimental() |
| @Native("DeviceAcceleration") |
| class DeviceAcceleration extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DeviceAcceleration._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DeviceAcceleration.x') |
| @DocsEditable() |
| final double x; |
| |
| @DomName('DeviceAcceleration.y') |
| @DocsEditable() |
| final double y; |
| |
| @DomName('DeviceAcceleration.z') |
| @DocsEditable() |
| final double z; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DeviceLightEvent') |
| @Experimental() // untriaged |
| @Native("DeviceLightEvent") |
| class DeviceLightEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory DeviceLightEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DeviceLightEvent.DeviceLightEvent') |
| @DocsEditable() |
| factory DeviceLightEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return DeviceLightEvent._create_1(type, eventInitDict_1); |
| } |
| return DeviceLightEvent._create_2(type); |
| } |
| static DeviceLightEvent _create_1(type, eventInitDict) => |
| JS('DeviceLightEvent', 'new DeviceLightEvent(#,#)', type, eventInitDict); |
| static DeviceLightEvent _create_2(type) => |
| JS('DeviceLightEvent', 'new DeviceLightEvent(#)', type); |
| |
| @DomName('DeviceLightEvent.value') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final double 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. |
| |
| @DocsEditable() |
| @DomName('DeviceMotionEvent') |
| // http://dev.w3.org/geo/api/spec-source-orientation.html#devicemotion |
| @Experimental() |
| @Native("DeviceMotionEvent") |
| class DeviceMotionEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory DeviceMotionEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DeviceMotionEvent.acceleration') |
| @DocsEditable() |
| final DeviceAcceleration acceleration; |
| |
| @DomName('DeviceMotionEvent.accelerationIncludingGravity') |
| @DocsEditable() |
| final DeviceAcceleration accelerationIncludingGravity; |
| |
| @DomName('DeviceMotionEvent.interval') |
| @DocsEditable() |
| final double interval; |
| |
| @DomName('DeviceMotionEvent.rotationRate') |
| @DocsEditable() |
| final DeviceRotationRate rotationRate; |
| |
| @DomName('DeviceMotionEvent.initDeviceMotionEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void initDeviceMotionEvent( |
| String type, |
| bool bubbles, |
| bool cancelable, |
| DeviceAcceleration acceleration, |
| DeviceAcceleration accelerationIncludingGravity, |
| DeviceRotationRate rotationRate, |
| num interval) native ; |
| } |
| // 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. |
| |
| // WARNING: Do not edit - generated code. |
| |
| @DomName('DeviceOrientationEvent') |
| // http://dev.w3.org/geo/api/spec-source-orientation.html#devicemotion |
| @Experimental() |
| @Native("DeviceOrientationEvent") |
| class DeviceOrientationEvent extends Event { |
| factory DeviceOrientationEvent(String type, |
| {bool canBubble: true, |
| bool cancelable: true, |
| num alpha: 0, |
| num beta: 0, |
| num gamma: 0, |
| bool absolute: false}) { |
| DeviceOrientationEvent e = document._createEvent("DeviceOrientationEvent"); |
| e._initDeviceOrientationEvent( |
| type, canBubble, cancelable, alpha, beta, gamma, absolute); |
| return e; |
| } |
| // To suppress missing implicit constructor warnings. |
| factory DeviceOrientationEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DeviceOrientationEvent.absolute') |
| @DocsEditable() |
| final bool absolute; |
| |
| @DomName('DeviceOrientationEvent.alpha') |
| @DocsEditable() |
| final double alpha; |
| |
| @DomName('DeviceOrientationEvent.beta') |
| @DocsEditable() |
| final double beta; |
| |
| @DomName('DeviceOrientationEvent.gamma') |
| @DocsEditable() |
| final double gamma; |
| |
| @JSName('initDeviceOrientationEvent') |
| @DomName('DeviceOrientationEvent.initDeviceOrientationEvent') |
| @DocsEditable() |
| void _initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, |
| num alpha, num beta, num gamma, bool absolute) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DeviceRotationRate') |
| // http://dev.w3.org/geo/api/spec-source-orientation.html#devicemotion |
| @Experimental() |
| @Native("DeviceRotationRate") |
| class DeviceRotationRate extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DeviceRotationRate._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DeviceRotationRate.alpha') |
| @DocsEditable() |
| final double alpha; |
| |
| @DomName('DeviceRotationRate.beta') |
| @DocsEditable() |
| final double beta; |
| |
| @DomName('DeviceRotationRate.gamma') |
| @DocsEditable() |
| final double gamma; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLDialogElement') |
| @Unstable() |
| @Native("HTMLDialogElement") |
| class DialogElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DialogElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| DialogElement.created() : super.created(); |
| |
| @DomName('HTMLDialogElement.open') |
| @DocsEditable() |
| bool open; |
| |
| @DomName('HTMLDialogElement.returnValue') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String returnValue; |
| |
| @DomName('HTMLDialogElement.close') |
| @DocsEditable() |
| void close(String returnValue) native ; |
| |
| @DomName('HTMLDialogElement.show') |
| @DocsEditable() |
| void show() native ; |
| |
| @DomName('HTMLDialogElement.showModal') |
| @DocsEditable() |
| void showModal() native ; |
| } |
| // 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. |
| |
| @DomName('DirectoryEntry') |
| // http://www.w3.org/TR/file-system-api/#the-directoryentry-interface |
| @Experimental() |
| @Native("DirectoryEntry") |
| class DirectoryEntry extends Entry { |
| /** |
| * Create a new directory with the specified `path`. If `exclusive` is true, |
| * the returned Future will complete with an error if a directory already |
| * exists with the specified `path`. |
| */ |
| Future<Entry> createDirectory(String path, {bool exclusive: false}) { |
| return _getDirectory(path, |
| options: {'create': true, 'exclusive': exclusive}); |
| } |
| |
| /** |
| * Retrieve an already existing directory entry. The returned future will |
| * result in an error if a directory at `path` does not exist or if the item |
| * at `path` is not a directory. |
| */ |
| Future<Entry> getDirectory(String path) { |
| return _getDirectory(path); |
| } |
| |
| /** |
| * Create a new file with the specified `path`. If `exclusive` is true, |
| * the returned Future will complete with an error if a file already |
| * exists at the specified `path`. |
| */ |
| Future<Entry> createFile(String path, {bool exclusive: false}) { |
| return _getFile(path, options: {'create': true, 'exclusive': exclusive}); |
| } |
| |
| /** |
| * Retrieve an already existing file entry. The returned future will |
| * result in an error if a file at `path` does not exist or if the item at |
| * `path` is not a file. |
| */ |
| Future<Entry> getFile(String path) { |
| return _getFile(path); |
| } |
| |
| // To suppress missing implicit constructor warnings. |
| factory DirectoryEntry._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DirectoryEntry.createReader') |
| @DocsEditable() |
| DirectoryReader createReader() native ; |
| |
| @DomName('DirectoryEntry.getDirectory') |
| @DocsEditable() |
| void __getDirectory(String path, |
| {Map options, |
| _EntryCallback successCallback, |
| _ErrorCallback errorCallback}) { |
| if (errorCallback != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| __getDirectory_1(path, options_1, successCallback, errorCallback); |
| return; |
| } |
| if (successCallback != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| __getDirectory_2(path, options_1, successCallback); |
| return; |
| } |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| __getDirectory_3(path, options_1); |
| return; |
| } |
| __getDirectory_4(path); |
| return; |
| } |
| |
| @JSName('getDirectory') |
| @DomName('DirectoryEntry.getDirectory') |
| @DocsEditable() |
| void __getDirectory_1(path, options, _EntryCallback successCallback, |
| _ErrorCallback errorCallback) native ; |
| @JSName('getDirectory') |
| @DomName('DirectoryEntry.getDirectory') |
| @DocsEditable() |
| void __getDirectory_2(path, options, _EntryCallback successCallback) native ; |
| @JSName('getDirectory') |
| @DomName('DirectoryEntry.getDirectory') |
| @DocsEditable() |
| void __getDirectory_3(path, options) native ; |
| @JSName('getDirectory') |
| @DomName('DirectoryEntry.getDirectory') |
| @DocsEditable() |
| void __getDirectory_4(path) native ; |
| |
| @JSName('getDirectory') |
| @DomName('DirectoryEntry.getDirectory') |
| @DocsEditable() |
| Future<Entry> _getDirectory(String path, {Map options}) { |
| var completer = new Completer<Entry>(); |
| __getDirectory(path, options: options, successCallback: (value) { |
| completer.complete(value); |
| }, errorCallback: (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @DomName('DirectoryEntry.getFile') |
| @DocsEditable() |
| void __getFile(String path, |
| {Map options, |
| _EntryCallback successCallback, |
| _ErrorCallback errorCallback}) { |
| if (errorCallback != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| __getFile_1(path, options_1, successCallback, errorCallback); |
| return; |
| } |
| if (successCallback != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| __getFile_2(path, options_1, successCallback); |
| return; |
| } |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| __getFile_3(path, options_1); |
| return; |
| } |
| __getFile_4(path); |
| return; |
| } |
| |
| @JSName('getFile') |
| @DomName('DirectoryEntry.getFile') |
| @DocsEditable() |
| void __getFile_1(path, options, _EntryCallback successCallback, |
| _ErrorCallback errorCallback) native ; |
| @JSName('getFile') |
| @DomName('DirectoryEntry.getFile') |
| @DocsEditable() |
| void __getFile_2(path, options, _EntryCallback successCallback) native ; |
| @JSName('getFile') |
| @DomName('DirectoryEntry.getFile') |
| @DocsEditable() |
| void __getFile_3(path, options) native ; |
| @JSName('getFile') |
| @DomName('DirectoryEntry.getFile') |
| @DocsEditable() |
| void __getFile_4(path) native ; |
| |
| @JSName('getFile') |
| @DomName('DirectoryEntry.getFile') |
| @DocsEditable() |
| Future<Entry> _getFile(String path, {Map options}) { |
| var completer = new Completer<Entry>(); |
| __getFile(path, options: options, successCallback: (value) { |
| completer.complete(value); |
| }, errorCallback: (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('removeRecursively') |
| @DomName('DirectoryEntry.removeRecursively') |
| @DocsEditable() |
| void _removeRecursively(VoidCallback successCallback, |
| [_ErrorCallback errorCallback]) native ; |
| |
| @JSName('removeRecursively') |
| @DomName('DirectoryEntry.removeRecursively') |
| @DocsEditable() |
| Future removeRecursively() { |
| var completer = new Completer(); |
| _removeRecursively(() { |
| completer.complete(); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DirectoryReader') |
| // http://www.w3.org/TR/file-system-api/#the-directoryreader-interface |
| @Experimental() |
| @Native("DirectoryReader") |
| class DirectoryReader extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DirectoryReader._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('readEntries') |
| @DomName('DirectoryReader.readEntries') |
| @DocsEditable() |
| void _readEntries(_EntriesCallback successCallback, |
| [_ErrorCallback errorCallback]) native ; |
| |
| @JSName('readEntries') |
| @DomName('DirectoryReader.readEntries') |
| @DocsEditable() |
| Future<List<Entry>> readEntries() { |
| var completer = new Completer<List<Entry>>(); |
| _readEntries((value) { |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| /** |
| * A generic container for content on an HTML page; |
| * corresponds to the <div> tag. |
| * |
| * The [DivElement] is a generic container and does not have any semantic |
| * significance. It is functionally similar to [SpanElement]. |
| * |
| * The [DivElement] is a block-level element, as opposed to [SpanElement], |
| * which is an inline-level element. |
| * |
| * Example usage: |
| * |
| * DivElement div = new DivElement(); |
| * div.text = 'Here's my new DivElem |
| * document.body.elements.add(elem); |
| * |
| * See also: |
| * |
| * * [HTML `<div>` element](http://www.w3.org/TR/html-markup/div.html) from W3C. |
| * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) from W3C. |
| * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes) from W3C. |
| */ |
| @DomName('HTMLDivElement') |
| @Native("HTMLDivElement") |
| class DivElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DivElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('HTMLDivElement.HTMLDivElement') |
| @DocsEditable() |
| factory DivElement() => document.createElement("div"); |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| DivElement.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. |
| |
| @DocsEditable() |
| /** |
| * The base class for all documents. |
| * |
| * Each web page loaded in the browser has its own [Document] object, which is |
| * typically an [HtmlDocument]. |
| * |
| * If you aren't comfortable with DOM concepts, see the Dart tutorial |
| * [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connect-dart-html/). |
| */ |
| @DomName('Document') |
| @Native("Document") |
| class Document extends Node { |
| // To suppress missing implicit constructor warnings. |
| factory Document._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Document.pointerlockchangeEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> pointerLockChangeEvent = |
| const EventStreamProvider<Event>('pointerlockchange'); |
| |
| @DomName('Document.pointerlockerrorEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> pointerLockErrorEvent = |
| const EventStreamProvider<Event>('pointerlockerror'); |
| |
| /** |
| * Static factory designed to expose `readystatechange` events to event |
| * handlers that are not necessarily instances of [Document]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Document.readystatechangeEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> readyStateChangeEvent = |
| const EventStreamProvider<Event>('readystatechange'); |
| |
| /** |
| * Static factory designed to expose `securitypolicyviolation` events to event |
| * handlers that are not necessarily instances of [Document]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Document.securitypolicyviolationEvent') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#widl-Document-onsecuritypolicyviolation |
| @Experimental() |
| static const EventStreamProvider<SecurityPolicyViolationEvent> |
| securityPolicyViolationEvent = |
| const EventStreamProvider<SecurityPolicyViolationEvent>( |
| 'securitypolicyviolation'); |
| |
| /** |
| * Static factory designed to expose `selectionchange` events to event |
| * handlers that are not necessarily instances of [Document]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Document.selectionchangeEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> selectionChangeEvent = |
| const EventStreamProvider<Event>('selectionchange'); |
| |
| @DomName('Document.activeElement') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final Element activeElement; |
| |
| @JSName('body') |
| @DomName('Document.body') |
| @DocsEditable() |
| HtmlElement _body; |
| |
| @DomName('Document.contentType') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String contentType; |
| |
| @DomName('Document.cookie') |
| @DocsEditable() |
| String cookie; |
| |
| @DomName('Document.currentScript') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final ScriptElement currentScript; |
| |
| @DomName('Document.window') |
| @DocsEditable() |
| @Experimental() // untriaged |
| WindowBase get window => _convertNativeToDart_Window(this._get_window); |
| @JSName('defaultView') |
| @DomName('Document.window') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Creates('Window|=Object') |
| @Returns('Window|=Object') |
| @Creates('Window|=Object|Null') |
| @Returns('Window|=Object|Null') |
| final dynamic _get_window; |
| |
| @DomName('Document.documentElement') |
| @DocsEditable() |
| final Element documentElement; |
| |
| @DomName('Document.domain') |
| @DocsEditable() |
| final String domain; |
| |
| @DomName('Document.fonts') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final FontFaceSet fonts; |
| |
| @DomName('Document.fullscreenElement') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final Element fullscreenElement; |
| |
| @DomName('Document.fullscreenEnabled') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final bool fullscreenEnabled; |
| |
| @JSName('head') |
| @DomName('Document.head') |
| @DocsEditable() |
| final HeadElement _head; |
| |
| @DomName('Document.hidden') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final bool hidden; |
| |
| @DomName('Document.implementation') |
| @DocsEditable() |
| final DomImplementation implementation; |
| |
| @JSName('lastModified') |
| @DomName('Document.lastModified') |
| @DocsEditable() |
| final String _lastModified; |
| |
| @DomName('Document.origin') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String origin; |
| |
| @DomName('Document.pointerLockElement') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final Element pointerLockElement; |
| |
| @JSName('preferredStylesheetSet') |
| @DomName('Document.preferredStylesheetSet') |
| @DocsEditable() |
| final String _preferredStylesheetSet; |
| |
| @DomName('Document.readyState') |
| @DocsEditable() |
| final String readyState; |
| |
| @JSName('referrer') |
| @DomName('Document.referrer') |
| @DocsEditable() |
| final String _referrer; |
| |
| @DomName('Document.rootElement') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final SvgSvgElement rootElement; |
| |
| @DomName('Document.scrollingElement') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final Element scrollingElement; |
| |
| @JSName('selectedStylesheetSet') |
| @DomName('Document.selectedStylesheetSet') |
| @DocsEditable() |
| String _selectedStylesheetSet; |
| |
| @JSName('styleSheets') |
| @DomName('Document.styleSheets') |
| @DocsEditable() |
| @Returns('_StyleSheetList') |
| @Creates('_StyleSheetList') |
| final List<StyleSheet> _styleSheets; |
| |
| @DomName('Document.timeline') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final AnimationTimeline timeline; |
| |
| @JSName('title') |
| @DomName('Document.title') |
| @DocsEditable() |
| String _title; |
| |
| @JSName('visibilityState') |
| @DomName('Document.visibilityState') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String _visibilityState; |
| |
| @JSName('webkitFullscreenElement') |
| @DomName('Document.webkitFullscreenElement') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-fullscreenelement |
| final Element _webkitFullscreenElement; |
| |
| @JSName('webkitFullscreenEnabled') |
| @DomName('Document.webkitFullscreenEnabled') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-fullscreenenabled |
| final bool _webkitFullscreenEnabled; |
| |
| @JSName('webkitHidden') |
| @DomName('Document.webkitHidden') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#document |
| final bool _webkitHidden; |
| |
| @JSName('webkitVisibilityState') |
| @DomName('Document.webkitVisibilityState') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#dom-document-visibilitystate |
| final String _webkitVisibilityState; |
| |
| @DomName('Document.adoptNode') |
| @DocsEditable() |
| Node adoptNode(Node node) native ; |
| |
| @JSName('caretRangeFromPoint') |
| @DomName('Document.caretRangeFromPoint') |
| @DocsEditable() |
| // http://www.w3.org/TR/2009/WD-cssom-view-20090804/#dom-documentview-caretrangefrompoint |
| @Experimental() |
| Range _caretRangeFromPoint(int x, int y) native ; |
| |
| @DomName('Document.createDocumentFragment') |
| @DocsEditable() |
| DocumentFragment createDocumentFragment() native ; |
| |
| @JSName('createElement') |
| @DomName('Document.createElement') |
| @DocsEditable() |
| Element _createElement(String localName_OR_tagName, [String typeExtension]) |
| native ; |
| |
| @JSName('createElementNS') |
| @DomName('Document.createElementNS') |
| @DocsEditable() |
| Element _createElementNS(String namespaceURI, String qualifiedName, |
| [String typeExtension]) native ; |
| |
| @JSName('createEvent') |
| @DomName('Document.createEvent') |
| @DocsEditable() |
| Event _createEvent(String eventType) native ; |
| |
| @DomName('Document.createRange') |
| @DocsEditable() |
| Range createRange() native ; |
| |
| @JSName('createTextNode') |
| @DomName('Document.createTextNode') |
| @DocsEditable() |
| Text _createTextNode(String data) native ; |
| |
| @DomName('Document.createTouch') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| Touch _createTouch( |
| Window window, |
| EventTarget target, |
| int identifier, |
| num pageX, |
| num pageY, |
| num screenX, |
| num screenY, |
| num radiusX, |
| num radiusY, |
| num rotationAngle, |
| num force) { |
| var target_1 = _convertDartToNative_EventTarget(target); |
| return _createTouch_1(window, target_1, identifier, pageX, pageY, screenX, |
| screenY, radiusX, radiusY, rotationAngle, force); |
| } |
| |
| @JSName('createTouch') |
| @DomName('Document.createTouch') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| Touch _createTouch_1(Window window, target, identifier, pageX, pageY, screenX, |
| screenY, radiusX, radiusY, rotationAngle, force) native ; |
| |
| @JSName('createTouchList') |
| @DomName('Document.createTouchList') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| TouchList _createTouchList(Touch touches) native ; |
| |
| @JSName('elementFromPoint') |
| @DomName('Document.elementFromPoint') |
| @DocsEditable() |
| Element _elementFromPoint(int x, int y) native ; |
| |
| @DomName('Document.elementsFromPoint') |
| @DocsEditable() |
| @Experimental() // untriaged |
| List<Element> elementsFromPoint(int x, int y) native ; |
| |
| @DomName('Document.execCommand') |
| @DocsEditable() |
| bool execCommand(String commandId, [bool showUI, String value]) native ; |
| |
| @DomName('Document.exitFullscreen') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void exitFullscreen() native ; |
| |
| @DomName('Document.exitPointerLock') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void exitPointerLock() native ; |
| |
| @JSName('getCSSCanvasContext') |
| @DomName('Document.getCSSCanvasContext') |
| @DocsEditable() |
| // https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/Functions.html |
| @Experimental() // non-standard |
| Object _getCssCanvasContext( |
| String contextId, String name, int width, int height) native ; |
| |
| @DomName('Document.getElementsByClassName') |
| @DocsEditable() |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> getElementsByClassName(String classNames) native ; |
| |
| @DomName('Document.getElementsByName') |
| @DocsEditable() |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> getElementsByName(String elementName) native ; |
| |
| @DomName('Document.getElementsByTagName') |
| @DocsEditable() |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> getElementsByTagName(String localName) native ; |
| |
| @DomName('Document.importNode') |
| @DocsEditable() |
| Node importNode(Node node, [bool deep]) native ; |
| |
| @DomName('Document.queryCommandEnabled') |
| @DocsEditable() |
| bool queryCommandEnabled(String commandId) native ; |
| |
| @DomName('Document.queryCommandIndeterm') |
| @DocsEditable() |
| bool queryCommandIndeterm(String commandId) native ; |
| |
| @DomName('Document.queryCommandState') |
| @DocsEditable() |
| bool queryCommandState(String commandId) native ; |
| |
| @DomName('Document.queryCommandSupported') |
| @DocsEditable() |
| bool queryCommandSupported(String commandId) native ; |
| |
| @DomName('Document.queryCommandValue') |
| @DocsEditable() |
| String queryCommandValue(String commandId) native ; |
| |
| @DomName('Document.transformDocumentToTreeView') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void transformDocumentToTreeView(String noStyleMessage) native ; |
| |
| @JSName('webkitExitFullscreen') |
| @DomName('Document.webkitExitFullscreen') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-exitfullscreen |
| void _webkitExitFullscreen() native ; |
| |
| // From NonElementParentNode |
| |
| @DomName('Document.getElementById') |
| @DocsEditable() |
| Element getElementById(String elementId) native ; |
| |
| // From ParentNode |
| |
| @JSName('childElementCount') |
| @DomName('Document.childElementCount') |
| @DocsEditable() |
| final int _childElementCount; |
| |
| @JSName('children') |
| @DomName('Document.children') |
| @DocsEditable() |
| @Returns('HtmlCollection') |
| @Creates('HtmlCollection') |
| final List<Node> _children; |
| |
| @JSName('firstElementChild') |
| @DomName('Document.firstElementChild') |
| @DocsEditable() |
| final Element _firstElementChild; |
| |
| @JSName('lastElementChild') |
| @DomName('Document.lastElementChild') |
| @DocsEditable() |
| final Element _lastElementChild; |
| |
| /** |
| * Finds the first descendant element of this document that matches the |
| * specified group of selectors. |
| * |
| * Unless your webpage contains multiple documents, the top-level |
| * [querySelector] |
| * method behaves the same as this method, so you should use it instead to |
| * save typing a few characters. |
| * |
| * [selectors] should be a string using CSS selector syntax. |
| * |
| * var element1 = document.querySelector('.className'); |
| * var element2 = document.querySelector('#id'); |
| * |
| * For details about CSS selector syntax, see the |
| * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). |
| */ |
| @DomName('Document.querySelector') |
| @DocsEditable() |
| Element querySelector(String selectors) native ; |
| |
| @JSName('querySelectorAll') |
| @DomName('Document.querySelectorAll') |
| @DocsEditable() |
| @Returns('NodeList') |
| @Creates('NodeList') |
| List<Node> _querySelectorAll(String selectors) native ; |
| |
| /// Stream of `abort` events handled by this [Document]. |
| @DomName('Document.onabort') |
| @DocsEditable() |
| Stream<Event> get onAbort => Element.abortEvent.forTarget(this); |
| |
| /// Stream of `beforecopy` events handled by this [Document]. |
| @DomName('Document.onbeforecopy') |
| @DocsEditable() |
| Stream<Event> get onBeforeCopy => Element.beforeCopyEvent.forTarget(this); |
| |
| /// Stream of `beforecut` events handled by this [Document]. |
| @DomName('Document.onbeforecut') |
| @DocsEditable() |
| Stream<Event> get onBeforeCut => Element.beforeCutEvent.forTarget(this); |
| |
| /// Stream of `beforepaste` events handled by this [Document]. |
| @DomName('Document.onbeforepaste') |
| @DocsEditable() |
| Stream<Event> get onBeforePaste => Element.beforePasteEvent.forTarget(this); |
| |
| /// Stream of `blur` events handled by this [Document]. |
| @DomName('Document.onblur') |
| @DocsEditable() |
| Stream<Event> get onBlur => Element.blurEvent.forTarget(this); |
| |
| @DomName('Document.oncanplay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onCanPlay => Element.canPlayEvent.forTarget(this); |
| |
| @DomName('Document.oncanplaythrough') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onCanPlayThrough => |
| Element.canPlayThroughEvent.forTarget(this); |
| |
| /// Stream of `change` events handled by this [Document]. |
| @DomName('Document.onchange') |
| @DocsEditable() |
| Stream<Event> get onChange => Element.changeEvent.forTarget(this); |
| |
| /// Stream of `click` events handled by this [Document]. |
| @DomName('Document.onclick') |
| @DocsEditable() |
| Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this); |
| |
| /// Stream of `contextmenu` events handled by this [Document]. |
| @DomName('Document.oncontextmenu') |
| @DocsEditable() |
| Stream<MouseEvent> get onContextMenu => |
| Element.contextMenuEvent.forTarget(this); |
| |
| /// Stream of `copy` events handled by this [Document]. |
| @DomName('Document.oncopy') |
| @DocsEditable() |
| Stream<ClipboardEvent> get onCopy => Element.copyEvent.forTarget(this); |
| |
| /// Stream of `cut` events handled by this [Document]. |
| @DomName('Document.oncut') |
| @DocsEditable() |
| Stream<ClipboardEvent> get onCut => Element.cutEvent.forTarget(this); |
| |
| /// Stream of `doubleclick` events handled by this [Document]. |
| @DomName('Document.ondblclick') |
| @DocsEditable() |
| Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this); |
| |
| /// Stream of `drag` events handled by this [Document]. |
| @DomName('Document.ondrag') |
| @DocsEditable() |
| Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this); |
| |
| /// Stream of `dragend` events handled by this [Document]. |
| @DomName('Document.ondragend') |
| @DocsEditable() |
| Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this); |
| |
| /// Stream of `dragenter` events handled by this [Document]. |
| @DomName('Document.ondragenter') |
| @DocsEditable() |
| Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this); |
| |
| /// Stream of `dragleave` events handled by this [Document]. |
| @DomName('Document.ondragleave') |
| @DocsEditable() |
| Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this); |
| |
| /// Stream of `dragover` events handled by this [Document]. |
| @DomName('Document.ondragover') |
| @DocsEditable() |
| Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this); |
| |
| /// Stream of `dragstart` events handled by this [Document]. |
| @DomName('Document.ondragstart') |
| @DocsEditable() |
| Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this); |
| |
| /// Stream of `drop` events handled by this [Document]. |
| @DomName('Document.ondrop') |
| @DocsEditable() |
| Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this); |
| |
| @DomName('Document.ondurationchange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onDurationChange => |
| Element.durationChangeEvent.forTarget(this); |
| |
| @DomName('Document.onemptied') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onEmptied => Element.emptiedEvent.forTarget(this); |
| |
| @DomName('Document.onended') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onEnded => Element.endedEvent.forTarget(this); |
| |
| /// Stream of `error` events handled by this [Document]. |
| @DomName('Document.onerror') |
| @DocsEditable() |
| Stream<Event> get onError => Element.errorEvent.forTarget(this); |
| |
| /// Stream of `focus` events handled by this [Document]. |
| @DomName('Document.onfocus') |
| @DocsEditable() |
| Stream<Event> get onFocus => Element.focusEvent.forTarget(this); |
| |
| /// Stream of `input` events handled by this [Document]. |
| @DomName('Document.oninput') |
| @DocsEditable() |
| Stream<Event> get onInput => Element.inputEvent.forTarget(this); |
| |
| /// Stream of `invalid` events handled by this [Document]. |
| @DomName('Document.oninvalid') |
| @DocsEditable() |
| Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this); |
| |
| /// Stream of `keydown` events handled by this [Document]. |
| @DomName('Document.onkeydown') |
| @DocsEditable() |
| Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this); |
| |
| /// Stream of `keypress` events handled by this [Document]. |
| @DomName('Document.onkeypress') |
| @DocsEditable() |
| Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this); |
| |
| /// Stream of `keyup` events handled by this [Document]. |
| @DomName('Document.onkeyup') |
| @DocsEditable() |
| Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this); |
| |
| /// Stream of `load` events handled by this [Document]. |
| @DomName('Document.onload') |
| @DocsEditable() |
| Stream<Event> get onLoad => Element.loadEvent.forTarget(this); |
| |
| @DomName('Document.onloadeddata') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onLoadedData => Element.loadedDataEvent.forTarget(this); |
| |
| @DomName('Document.onloadedmetadata') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onLoadedMetadata => |
| Element.loadedMetadataEvent.forTarget(this); |
| |
| /// Stream of `mousedown` events handled by this [Document]. |
| @DomName('Document.onmousedown') |
| @DocsEditable() |
| Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this); |
| |
| /// Stream of `mouseenter` events handled by this [Document]. |
| @DomName('Document.onmouseenter') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<MouseEvent> get onMouseEnter => |
| Element.mouseEnterEvent.forTarget(this); |
| |
| /// Stream of `mouseleave` events handled by this [Document]. |
| @DomName('Document.onmouseleave') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<MouseEvent> get onMouseLeave => |
| Element.mouseLeaveEvent.forTarget(this); |
| |
| /// Stream of `mousemove` events handled by this [Document]. |
| @DomName('Document.onmousemove') |
| @DocsEditable() |
| Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this); |
| |
| /// Stream of `mouseout` events handled by this [Document]. |
| @DomName('Document.onmouseout') |
| @DocsEditable() |
| Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this); |
| |
| /// Stream of `mouseover` events handled by this [Document]. |
| @DomName('Document.onmouseover') |
| @DocsEditable() |
| Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this); |
| |
| /// Stream of `mouseup` events handled by this [Document]. |
| @DomName('Document.onmouseup') |
| @DocsEditable() |
| Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this); |
| |
| /// Stream of `mousewheel` events handled by this [Document]. |
| @DomName('Document.onmousewheel') |
| @DocsEditable() |
| Stream<WheelEvent> get onMouseWheel => |
| Element.mouseWheelEvent.forTarget(this); |
| |
| /// Stream of `paste` events handled by this [Document]. |
| @DomName('Document.onpaste') |
| @DocsEditable() |
| Stream<ClipboardEvent> get onPaste => Element.pasteEvent.forTarget(this); |
| |
| @DomName('Document.onpause') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onPause => Element.pauseEvent.forTarget(this); |
| |
| @DomName('Document.onplay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onPlay => Element.playEvent.forTarget(this); |
| |
| @DomName('Document.onplaying') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onPlaying => Element.playingEvent.forTarget(this); |
| |
| @DomName('Document.onpointerlockchange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onPointerLockChange => |
| pointerLockChangeEvent.forTarget(this); |
| |
| @DomName('Document.onpointerlockerror') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onPointerLockError => pointerLockErrorEvent.forTarget(this); |
| |
| @DomName('Document.onratechange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onRateChange => Element.rateChangeEvent.forTarget(this); |
| |
| /// Stream of `readystatechange` events handled by this [Document]. |
| @DomName('Document.onreadystatechange') |
| @DocsEditable() |
| Stream<Event> get onReadyStateChange => readyStateChangeEvent.forTarget(this); |
| |
| /// Stream of `reset` events handled by this [Document]. |
| @DomName('Document.onreset') |
| @DocsEditable() |
| Stream<Event> get onReset => Element.resetEvent.forTarget(this); |
| |
| @DomName('Document.onresize') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onResize => Element.resizeEvent.forTarget(this); |
| |
| /// Stream of `scroll` events handled by this [Document]. |
| @DomName('Document.onscroll') |
| @DocsEditable() |
| Stream<Event> get onScroll => Element.scrollEvent.forTarget(this); |
| |
| /// Stream of `search` events handled by this [Document]. |
| @DomName('Document.onsearch') |
| @DocsEditable() |
| // http://www.w3.org/TR/html-markup/input.search.html |
| @Experimental() |
| Stream<Event> get onSearch => Element.searchEvent.forTarget(this); |
| |
| /// Stream of `securitypolicyviolation` events handled by this [Document]. |
| @DomName('Document.onsecuritypolicyviolation') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#widl-Document-onsecuritypolicyviolation |
| @Experimental() |
| Stream<SecurityPolicyViolationEvent> get onSecurityPolicyViolation => |
| securityPolicyViolationEvent.forTarget(this); |
| |
| @DomName('Document.onseeked') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onSeeked => Element.seekedEvent.forTarget(this); |
| |
| @DomName('Document.onseeking') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onSeeking => Element.seekingEvent.forTarget(this); |
| |
| /// Stream of `select` events handled by this [Document]. |
| @DomName('Document.onselect') |
| @DocsEditable() |
| Stream<Event> get onSelect => Element.selectEvent.forTarget(this); |
| |
| /// Stream of `selectionchange` events handled by this [Document]. |
| @DomName('Document.onselectionchange') |
| @DocsEditable() |
| Stream<Event> get onSelectionChange => selectionChangeEvent.forTarget(this); |
| |
| /// Stream of `selectstart` events handled by this [Document]. |
| @DomName('Document.onselectstart') |
| @DocsEditable() |
| Stream<Event> get onSelectStart => Element.selectStartEvent.forTarget(this); |
| |
| @DomName('Document.onstalled') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onStalled => Element.stalledEvent.forTarget(this); |
| |
| /// Stream of `submit` events handled by this [Document]. |
| @DomName('Document.onsubmit') |
| @DocsEditable() |
| Stream<Event> get onSubmit => Element.submitEvent.forTarget(this); |
| |
| @DomName('Document.onsuspend') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onSuspend => Element.suspendEvent.forTarget(this); |
| |
| @DomName('Document.ontimeupdate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onTimeUpdate => Element.timeUpdateEvent.forTarget(this); |
| |
| /// Stream of `touchcancel` events handled by this [Document]. |
| @DomName('Document.ontouchcancel') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| Stream<TouchEvent> get onTouchCancel => |
| Element.touchCancelEvent.forTarget(this); |
| |
| /// Stream of `touchend` events handled by this [Document]. |
| @DomName('Document.ontouchend') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this); |
| |
| /// Stream of `touchmove` events handled by this [Document]. |
| @DomName('Document.ontouchmove') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this); |
| |
| /// Stream of `touchstart` events handled by this [Document]. |
| @DomName('Document.ontouchstart') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| Stream<TouchEvent> get onTouchStart => |
| Element.touchStartEvent.forTarget(this); |
| |
| @DomName('Document.onvolumechange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onVolumeChange => Element.volumeChangeEvent.forTarget(this); |
| |
| @DomName('Document.onwaiting') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Stream<Event> get onWaiting => Element.waitingEvent.forTarget(this); |
| |
| /// Stream of `fullscreenchange` events handled by this [Document]. |
| @DomName('Document.onwebkitfullscreenchange') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| @Experimental() |
| Stream<Event> get onFullscreenChange => |
| Element.fullscreenChangeEvent.forTarget(this); |
| |
| /// Stream of `fullscreenerror` events handled by this [Document]. |
| @DomName('Document.onwebkitfullscreenerror') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| @Experimental() |
| Stream<Event> get onFullscreenError => |
| Element.fullscreenErrorEvent.forTarget(this); |
| |
| /** |
| * Finds all descendant elements of this document that match the specified |
| * group of selectors. |
| * |
| * Unless your webpage contains multiple documents, the top-level |
| * [querySelectorAll] |
| * method behaves the same as this method, so you should use it instead to |
| * save typing a few characters. |
| * |
| * [selectors] should be a string using CSS selector syntax. |
| * |
| * var items = document.querySelectorAll('.itemClassName'); |
| * |
| * For details about CSS selector syntax, see the |
| * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). |
| */ |
| ElementList<Element/*=T*/ > querySelectorAll/*<T extends Element>*/( |
| String selectors) => |
| new _FrozenElementList/*<T>*/ ._wrap(_querySelectorAll(selectors)); |
| |
| /** |
| * Alias for [querySelector]. Note this function is deprecated because its |
| * semantics will be changing in the future. |
| */ |
| @deprecated |
| @Experimental() |
| @DomName('Document.querySelector') |
| Element query(String relativeSelectors) => querySelector(relativeSelectors); |
| |
| /** |
| * Alias for [querySelectorAll]. Note this function is deprecated because its |
| * semantics will be changing in the future. |
| */ |
| @deprecated |
| @Experimental() |
| @DomName('Document.querySelectorAll') |
| ElementList<Element/*=T*/ > queryAll/*<T extends Element>*/( |
| String relativeSelectors) => |
| querySelectorAll(relativeSelectors); |
| |
| /// Checks if [registerElement] is supported on the current platform. |
| bool get supportsRegisterElement { |
| return JS('bool', '("registerElement" in #)', this); |
| } |
| |
| /// *Deprecated*: use [supportsRegisterElement] instead. |
| @deprecated |
| bool get supportsRegister => supportsRegisterElement; |
| |
| @DomName('Document.createElement') |
| Element createElement(String tagName, [String typeExtension]) { |
| return (typeExtension == null) |
| ? _createElement_2(tagName) |
| : _createElement(tagName, typeExtension); |
| } |
| |
| // The two-argument version of this is automatically generated, but we need to |
| // omit the typeExtension if it's null on Firefox or we get an is="null" attribute. |
| @DomName('Document.createElement') |
| _createElement_2(String tagName) => |
| JS('Element', '#.createElement(#)', this, tagName); |
| |
| // The three-argument version of this is automatically generated, but we need to |
| // omit the typeExtension if it's null on Firefox or we get an is="null" attribute. |
| @DomName('Document.createElementNS') |
| _createElementNS_2(String namespaceURI, String qualifiedName) => JS( |
| 'Element', '#.createElementNS(#, #)', this, namespaceURI, qualifiedName); |
| |
| @DomName('Document.createElementNS') |
| @DocsEditable() |
| Element createElementNS(String namespaceURI, String qualifiedName, |
| [String typeExtension]) { |
| return (typeExtension == null) |
| ? _createElementNS_2(namespaceURI, qualifiedName) |
| : _createElementNS(namespaceURI, qualifiedName, typeExtension); |
| } |
| |
| @DomName('Document.createNodeIterator') |
| NodeIterator _createNodeIterator(Node root, |
| [int whatToShow, NodeFilter filter]) => |
| JS('NodeIterator', '#.createNodeIterator(#, #, #, false)', this, root, |
| whatToShow, filter); |
| |
| @DomName('Document.createTreeWalker') |
| TreeWalker _createTreeWalker(Node root, |
| [int whatToShow, NodeFilter filter]) => |
| JS('TreeWalker', '#.createTreeWalker(#, #, #, false)', this, root, |
| whatToShow, filter); |
| |
| @DomName('Document.visibilityState') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @Experimental() |
| String get visibilityState => JS( |
| 'String', |
| '(#.visibilityState || #.mozVisibilityState || #.msVisibilityState ||' |
| '#.webkitVisibilityState)', |
| this, |
| this, |
| this, |
| this); |
| } |
| // Copyright (c) 2011, 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('DocumentFragment') |
| @Native("DocumentFragment") |
| class DocumentFragment extends Node |
| implements NonElementParentNode, ParentNode { |
| factory DocumentFragment() => document.createDocumentFragment(); |
| |
| factory DocumentFragment.html(String html, |
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
| return document.body.createFragment(html, |
| validator: validator, treeSanitizer: treeSanitizer); |
| } |
| |
| factory DocumentFragment.svg(String svgContent, |
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
| return new svg.SvgSvgElement().createFragment(svgContent, |
| validator: validator, treeSanitizer: treeSanitizer); |
| } |
| |
| HtmlCollection get _children => |
| throw new UnimplementedError('Use _docChildren instead'); |
| |
| // Native field is used only by Dart code so does not lead to instantiation |
| // of native classes |
| @Creates('Null') |
| List<Element> _docChildren; |
| |
| List<Element> get children { |
| if (_docChildren == null) { |
| _docChildren = new FilteredElementList(this); |
| } |
| return _docChildren; |
| } |
| |
| set children(List<Element> value) { |
| // Copy list first since we don't want liveness during iteration. |
| var copy = value.toList(); |
| var children = this.children; |
| children.clear(); |
| children.addAll(copy); |
| } |
| |
| /** |
| * Finds all descendant elements of this document fragment that match the |
| * specified group of selectors. |
| * |
| * [selectors] should be a string using CSS selector syntax. |
| * |
| * var items = document.querySelectorAll('.itemClassName'); |
| * |
| * For details about CSS selector syntax, see the |
| * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). |
| */ |
| ElementList<Element/*=T*/ > querySelectorAll/*<T extends Element>*/( |
| String selectors) => |
| new _FrozenElementList/*<T>*/ ._wrap(_querySelectorAll(selectors)); |
| |
| String get innerHtml { |
| final e = new Element.tag("div"); |
| e.append(this.clone(true)); |
| return e.innerHtml; |
| } |
| |
| set innerHtml(String value) { |
| this.setInnerHtml(value); |
| } |
| |
| void setInnerHtml(String html, |
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
| this.nodes.clear(); |
| append(document.body.createFragment(html, |
| validator: validator, treeSanitizer: treeSanitizer)); |
| } |
| |
| /** |
| * Adds the specified text as a text node after the last child of this |
| * document fragment. |
| */ |
| void appendText(String text) { |
| this.append(new Text(text)); |
| } |
| |
| /** |
| * Parses the specified text as HTML and adds the resulting node after the |
| * last child of this document fragment. |
| */ |
| void appendHtml(String text, |
| {NodeValidator validator, NodeTreeSanitizer, treeSanitizer}) { |
| this.append(new DocumentFragment.html(text, |
| validator: validator, treeSanitizer: treeSanitizer)); |
| } |
| |
| /** |
| * Alias for [querySelector]. Note this function is deprecated because its |
| * semantics will be changing in the future. |
| */ |
| @deprecated |
| @Experimental() |
| @DomName('DocumentFragment.querySelector') |
| Element query(String relativeSelectors) { |
| return querySelector(relativeSelectors); |
| } |
| |
| /** |
| * Alias for [querySelectorAll]. Note this function is deprecated because its |
| * semantics will be changing in the future. |
| */ |
| @deprecated |
| @Experimental() |
| @DomName('DocumentFragment.querySelectorAll') |
| ElementList<Element/*=T*/ > queryAll/*<T extends Element>*/( |
| String relativeSelectors) => |
| querySelectorAll(relativeSelectors); |
| // To suppress missing implicit constructor warnings. |
| factory DocumentFragment._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| // From NonElementParentNode |
| |
| @DomName('DocumentFragment.getElementById') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Element getElementById(String elementId) native ; |
| |
| // From ParentNode |
| |
| @JSName('childElementCount') |
| @DomName('DocumentFragment.childElementCount') |
| @DocsEditable() |
| final int _childElementCount; |
| |
| @JSName('firstElementChild') |
| @DomName('DocumentFragment.firstElementChild') |
| @DocsEditable() |
| final Element _firstElementChild; |
| |
| @JSName('lastElementChild') |
| @DomName('DocumentFragment.lastElementChild') |
| @DocsEditable() |
| final Element _lastElementChild; |
| |
| /** |
| * Finds the first descendant element of this document fragment that matches |
| * the specified group of selectors. |
| * |
| * [selectors] should be a string using CSS selector syntax. |
| * |
| * var element1 = fragment.querySelector('.className'); |
| * var element2 = fragment.querySelector('#id'); |
| * |
| * For details about CSS selector syntax, see the |
| * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). |
| */ |
| @DomName('DocumentFragment.querySelector') |
| @DocsEditable() |
| Element querySelector(String selectors) native ; |
| |
| @JSName('querySelectorAll') |
| @DomName('DocumentFragment.querySelectorAll') |
| @DocsEditable() |
| @Returns('NodeList') |
| @Creates('NodeList') |
| List<Node> _querySelectorAll(String selectors) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMError') |
| @Native("DOMError") |
| class DomError extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomError._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMError.DOMError') |
| @DocsEditable() |
| factory DomError(String name, [String message]) { |
| if (message != null) { |
| return DomError._create_1(name, message); |
| } |
| return DomError._create_2(name); |
| } |
| static DomError _create_1(name, message) => |
| JS('DomError', 'new DOMError(#,#)', name, message); |
| static DomError _create_2(name) => JS('DomError', 'new DOMError(#)', name); |
| |
| @DomName('DOMError.message') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String message; |
| |
| @DomName('DOMError.name') |
| @DocsEditable() |
| final String name; |
| } |
| // 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. |
| |
| @DomName('DOMException') |
| @Unstable() |
| @Native("DOMException") |
| class DomException extends Interceptor { |
| static const String INDEX_SIZE = 'IndexSizeError'; |
| static const String HIERARCHY_REQUEST = 'HierarchyRequestError'; |
| static const String WRONG_DOCUMENT = 'WrongDocumentError'; |
| static const String INVALID_CHARACTER = 'InvalidCharacterError'; |
| static const String NO_MODIFICATION_ALLOWED = 'NoModificationAllowedError'; |
| static const String NOT_FOUND = 'NotFoundError'; |
| static const String NOT_SUPPORTED = 'NotSupportedError'; |
| static const String INVALID_STATE = 'InvalidStateError'; |
| static const String SYNTAX = 'SyntaxError'; |
| static const String INVALID_MODIFICATION = 'InvalidModificationError'; |
| static const String NAMESPACE = 'NamespaceError'; |
| static const String INVALID_ACCESS = 'InvalidAccessError'; |
| static const String TYPE_MISMATCH = 'TypeMismatchError'; |
| static const String SECURITY = 'SecurityError'; |
| static const String NETWORK = 'NetworkError'; |
| static const String ABORT = 'AbortError'; |
| static const String URL_MISMATCH = 'URLMismatchError'; |
| static const String QUOTA_EXCEEDED = 'QuotaExceededError'; |
| static const String TIMEOUT = 'TimeoutError'; |
| static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError'; |
| static const String DATA_CLONE = 'DataCloneError'; |
| |
| String get name { |
| var errorName = JS('String', '#.name', this); |
| // Although Safari nightly has updated the name to SecurityError, Safari 5 |
| // and 6 still return SECURITY_ERR. |
| if (Device.isWebKit && errorName == 'SECURITY_ERR') return 'SecurityError'; |
| // Chrome release still uses old string, remove this line when Chrome stable |
| // also prints out SyntaxError. |
| if (Device.isWebKit && errorName == 'SYNTAX_ERR') return 'SyntaxError'; |
| return errorName; |
| } |
| |
| // To suppress missing implicit constructor warnings. |
| factory DomException._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMException.message') |
| @DocsEditable() |
| final String message; |
| |
| @DomName('DOMException.toString') |
| @DocsEditable() |
| String toString() => JS('String', 'String(#)', this); |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMImplementation') |
| @Native("DOMImplementation") |
| class DomImplementation extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomImplementation._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMImplementation.createDocument') |
| @DocsEditable() |
| XmlDocument createDocument( |
| String namespaceURI, String qualifiedName, _DocumentType doctype) native ; |
| |
| @DomName('DOMImplementation.createDocumentType') |
| @DocsEditable() |
| _DocumentType createDocumentType( |
| String qualifiedName, String publicId, String systemId) native ; |
| |
| @JSName('createHTMLDocument') |
| @DomName('DOMImplementation.createHTMLDocument') |
| @DocsEditable() |
| HtmlDocument createHtmlDocument(String title) native ; |
| |
| @DomName('DOMImplementation.hasFeature') |
| @DocsEditable() |
| bool hasFeature() native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Iterator') |
| @Experimental() // untriaged |
| @Native("Iterator") |
| class DomIterator extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomIterator._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Iterator.next') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Object next([Object value]) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMMatrix') |
| @Experimental() // untriaged |
| @Native("DOMMatrix") |
| class DomMatrix extends DomMatrixReadOnly { |
| // To suppress missing implicit constructor warnings. |
| factory DomMatrix._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMMatrix.DOMMatrix') |
| @DocsEditable() |
| factory DomMatrix([DomMatrixReadOnly other]) { |
| if (other == null) { |
| return DomMatrix._create_1(); |
| } |
| if ((other is DomMatrixReadOnly || other == null)) { |
| return DomMatrix._create_2(other); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| static DomMatrix _create_1() => JS('DomMatrix', 'new DOMMatrix()'); |
| static DomMatrix _create_2(other) => |
| JS('DomMatrix', 'new DOMMatrix(#)', other); |
| |
| // Shadowing definition. |
| num get a => JS("num", "#.a", this); |
| |
| set a(num value) { |
| JS("void", "#.a = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get b => JS("num", "#.b", this); |
| |
| set b(num value) { |
| JS("void", "#.b = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get c => JS("num", "#.c", this); |
| |
| set c(num value) { |
| JS("void", "#.c = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get d => JS("num", "#.d", this); |
| |
| set d(num value) { |
| JS("void", "#.d = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get e => JS("num", "#.e", this); |
| |
| set e(num value) { |
| JS("void", "#.e = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get f => JS("num", "#.f", this); |
| |
| set f(num value) { |
| JS("void", "#.f = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m11 => JS("num", "#.m11", this); |
| |
| set m11(num value) { |
| JS("void", "#.m11 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m12 => JS("num", "#.m12", this); |
| |
| set m12(num value) { |
| JS("void", "#.m12 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m13 => JS("num", "#.m13", this); |
| |
| set m13(num value) { |
| JS("void", "#.m13 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m14 => JS("num", "#.m14", this); |
| |
| set m14(num value) { |
| JS("void", "#.m14 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m21 => JS("num", "#.m21", this); |
| |
| set m21(num value) { |
| JS("void", "#.m21 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m22 => JS("num", "#.m22", this); |
| |
| set m22(num value) { |
| JS("void", "#.m22 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m23 => JS("num", "#.m23", this); |
| |
| set m23(num value) { |
| JS("void", "#.m23 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m24 => JS("num", "#.m24", this); |
| |
| set m24(num value) { |
| JS("void", "#.m24 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m31 => JS("num", "#.m31", this); |
| |
| set m31(num value) { |
| JS("void", "#.m31 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m32 => JS("num", "#.m32", this); |
| |
| set m32(num value) { |
| JS("void", "#.m32 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m33 => JS("num", "#.m33", this); |
| |
| set m33(num value) { |
| JS("void", "#.m33 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m34 => JS("num", "#.m34", this); |
| |
| set m34(num value) { |
| JS("void", "#.m34 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m41 => JS("num", "#.m41", this); |
| |
| set m41(num value) { |
| JS("void", "#.m41 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m42 => JS("num", "#.m42", this); |
| |
| set m42(num value) { |
| JS("void", "#.m42 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m43 => JS("num", "#.m43", this); |
| |
| set m43(num value) { |
| JS("void", "#.m43 = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get m44 => JS("num", "#.m44", this); |
| |
| set m44(num value) { |
| JS("void", "#.m44 = #", this, value); |
| } |
| |
| @DomName('DOMMatrix.multiplySelf') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix multiplySelf(DomMatrix other) native ; |
| |
| @DomName('DOMMatrix.preMultiplySelf') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix preMultiplySelf(DomMatrix other) native ; |
| |
| @DomName('DOMMatrix.scale3dSelf') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix scale3dSelf(num scale, [num originX, num originY, num originZ]) |
| native ; |
| |
| @DomName('DOMMatrix.scaleNonUniformSelf') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix scaleNonUniformSelf(num scaleX, |
| [num scaleY, num scaleZ, num originX, num originY, num originZ]) native ; |
| |
| @DomName('DOMMatrix.scaleSelf') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix scaleSelf(num scale, [num originX, num originY]) native ; |
| |
| @DomName('DOMMatrix.translateSelf') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix translateSelf(num tx, num ty, [num tz]) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMMatrixReadOnly') |
| @Experimental() // untriaged |
| @Native("DOMMatrixReadOnly") |
| class DomMatrixReadOnly extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomMatrixReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| num get a => JS("num", "#.a", this); |
| |
| num get b => JS("num", "#.b", this); |
| |
| num get c => JS("num", "#.c", this); |
| |
| num get d => JS("num", "#.d", this); |
| |
| num get e => JS("num", "#.e", this); |
| |
| num get f => JS("num", "#.f", this); |
| |
| bool get is2D => JS("bool", "#.is2D", this); |
| |
| bool get isIdentity => JS("bool", "#.isIdentity", this); |
| |
| num get m11 => JS("num", "#.m11", this); |
| |
| num get m12 => JS("num", "#.m12", this); |
| |
| num get m13 => JS("num", "#.m13", this); |
| |
| num get m14 => JS("num", "#.m14", this); |
| |
| num get m21 => JS("num", "#.m21", this); |
| |
| num get m22 => JS("num", "#.m22", this); |
| |
| num get m23 => JS("num", "#.m23", this); |
| |
| num get m24 => JS("num", "#.m24", this); |
| |
| num get m31 => JS("num", "#.m31", this); |
| |
| num get m32 => JS("num", "#.m32", this); |
| |
| num get m33 => JS("num", "#.m33", this); |
| |
| num get m34 => JS("num", "#.m34", this); |
| |
| num get m41 => JS("num", "#.m41", this); |
| |
| num get m42 => JS("num", "#.m42", this); |
| |
| num get m43 => JS("num", "#.m43", this); |
| |
| num get m44 => JS("num", "#.m44", this); |
| |
| @DomName('DOMMatrixReadOnly.multiply') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix multiply(DomMatrix other) native ; |
| |
| @DomName('DOMMatrixReadOnly.scale') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix scale(num scale, [num originX, num originY]) native ; |
| |
| @DomName('DOMMatrixReadOnly.scale3d') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix scale3d(num scale, [num originX, num originY, num originZ]) native ; |
| |
| @DomName('DOMMatrixReadOnly.scaleNonUniform') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix scaleNonUniform(num scaleX, |
| [num scaleY, num scaleZn, num originX, num originY, num originZ]) native ; |
| |
| @DomName('DOMMatrixReadOnly.toFloat32Array') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Float32List toFloat32Array() native ; |
| |
| @DomName('DOMMatrixReadOnly.toFloat64Array') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Float64List toFloat64Array() native ; |
| |
| @DomName('DOMMatrixReadOnly.translate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| DomMatrix translate(num tx, num ty, [num tz]) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMParser') |
| @Native("DOMParser") |
| class DomParser extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomParser._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMParser.DOMParser') |
| @DocsEditable() |
| factory DomParser() { |
| return DomParser._create_1(); |
| } |
| static DomParser _create_1() => JS('DomParser', 'new DOMParser()'); |
| |
| @DomName('DOMParser.parseFromString') |
| @DocsEditable() |
| Document parseFromString(String str, String type) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMPoint') |
| @Experimental() // untriaged |
| @Native("DOMPoint") |
| class DomPoint extends DomPointReadOnly { |
| // To suppress missing implicit constructor warnings. |
| factory DomPoint._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMPoint.DOMPoint') |
| @DocsEditable() |
| factory DomPoint([point_OR_x, num y, num z, num w]) { |
| if ((point_OR_x is Map || point_OR_x == null) && |
| y == null && |
| z == null && |
| w == null) { |
| var point_1 = convertDartToNative_Dictionary(point_OR_x); |
| return DomPoint._create_1(point_1); |
| } |
| if (point_OR_x == null && y == null && z == null && w == null) { |
| return DomPoint._create_2(); |
| } |
| if ((point_OR_x is num || point_OR_x == null) && |
| y == null && |
| z == null && |
| w == null) { |
| return DomPoint._create_3(point_OR_x); |
| } |
| if ((y is num || y == null) && |
| (point_OR_x is num || point_OR_x == null) && |
| z == null && |
| w == null) { |
| return DomPoint._create_4(point_OR_x, y); |
| } |
| if ((z is num || z == null) && |
| (y is num || y == null) && |
| (point_OR_x is num || point_OR_x == null) && |
| w == null) { |
| return DomPoint._create_5(point_OR_x, y, z); |
| } |
| if ((w is num || w == null) && |
| (z is num || z == null) && |
| (y is num || y == null) && |
| (point_OR_x is num || point_OR_x == null)) { |
| return DomPoint._create_6(point_OR_x, y, z, w); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| static DomPoint _create_1(point_OR_x) => |
| JS('DomPoint', 'new DOMPoint(#)', point_OR_x); |
| static DomPoint _create_2() => JS('DomPoint', 'new DOMPoint()'); |
| static DomPoint _create_3(point_OR_x) => |
| JS('DomPoint', 'new DOMPoint(#)', point_OR_x); |
| static DomPoint _create_4(point_OR_x, y) => |
| JS('DomPoint', 'new DOMPoint(#,#)', point_OR_x, y); |
| static DomPoint _create_5(point_OR_x, y, z) => |
| JS('DomPoint', 'new DOMPoint(#,#,#)', point_OR_x, y, z); |
| static DomPoint _create_6(point_OR_x, y, z, w) => |
| JS('DomPoint', 'new DOMPoint(#,#,#,#)', point_OR_x, y, z, w); |
| |
| /// Checks if this type is supported on the current platform. |
| static bool get supported => |
| JS('bool', '!!(window.DOMPoint) || !!(window.WebKitPoint)'); |
| |
| // Shadowing definition. |
| num get w => JS("num", "#.w", this); |
| |
| set w(num value) { |
| JS("void", "#.w = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get x => JS("num", "#.x", this); |
| |
| set x(num value) { |
| JS("void", "#.x = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get y => JS("num", "#.y", this); |
| |
| set y(num value) { |
| JS("void", "#.y = #", this, value); |
| } |
| |
| // Shadowing definition. |
| num get z => JS("num", "#.z", this); |
| |
| set z(num value) { |
| JS("void", "#.z = #", 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. |
| |
| @DocsEditable() |
| @DomName('DOMPointReadOnly') |
| @Experimental() // untriaged |
| @Native("DOMPointReadOnly") |
| class DomPointReadOnly extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomPointReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMPointReadOnly.DOMPointReadOnly') |
| @DocsEditable() |
| factory DomPointReadOnly(num x, num y, num z, num w) { |
| return DomPointReadOnly._create_1(x, y, z, w); |
| } |
| static DomPointReadOnly _create_1(x, y, z, w) => |
| JS('DomPointReadOnly', 'new DOMPointReadOnly(#,#,#,#)', x, y, z, w); |
| |
| num get w => JS("num", "#.w", this); |
| |
| num get x => JS("num", "#.x", this); |
| |
| num get y => JS("num", "#.y", this); |
| |
| num get z => JS("num", "#.z", this); |
| } |
| // 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('DOMRectReadOnly') |
| @Experimental() // untriaged |
| @Native("DOMRectReadOnly") |
| class DomRectReadOnly extends Interceptor implements Rectangle { |
| // NOTE! All code below should be common with RectangleBase. |
| String toString() { |
| return 'Rectangle ($left, $top) $width x $height'; |
| } |
| |
| bool operator ==(other) { |
| if (other is! Rectangle) return false; |
| return left == other.left && |
| top == other.top && |
| width == other.width && |
| height == other.height; |
| } |
| |
| int get hashCode => _JenkinsSmiHash.hash4( |
| left.hashCode, top.hashCode, width.hashCode, height.hashCode); |
| |
| /** |
| * Computes the intersection of `this` and [other]. |
| * |
| * The intersection of two axis-aligned rectangles, if any, is always another |
| * axis-aligned rectangle. |
| * |
| * Returns the intersection of this and `other`, or null if they don't |
| * intersect. |
| */ |
| Rectangle intersection(Rectangle other) { |
| var x0 = max(left, other.left); |
| var x1 = min(left + width, other.left + other.width); |
| |
| if (x0 <= x1) { |
| var y0 = max(top, other.top); |
| var y1 = min(top + height, other.top + other.height); |
| |
| if (y0 <= y1) { |
| return new Rectangle(x0, y0, x1 - x0, y1 - y0); |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns true if `this` intersects [other]. |
| */ |
| bool intersects(Rectangle<num> other) { |
| return (left <= other.left + other.width && |
| other.left <= left + width && |
| top <= other.top + other.height && |
| other.top <= top + height); |
| } |
| |
| /** |
| * Returns a new rectangle which completely contains `this` and [other]. |
| */ |
| Rectangle boundingBox(Rectangle other) { |
| var right = max(this.left + this.width, other.left + other.width); |
| var bottom = max(this.top + this.height, other.top + other.height); |
| |
| var left = min(this.left, other.left); |
| var top = min(this.top, other.top); |
| |
| return new Rectangle(left, top, right - left, bottom - top); |
| } |
| |
| /** |
| * Tests whether `this` entirely contains [another]. |
| */ |
| bool containsRectangle(Rectangle<num> another) { |
| return left <= another.left && |
| left + width >= another.left + another.width && |
| top <= another.top && |
| top + height >= another.top + another.height; |
| } |
| |
| /** |
| * Tests whether [another] is inside or along the edges of `this`. |
| */ |
| bool containsPoint(Point<num> another) { |
| return another.x >= left && |
| another.x <= left + width && |
| another.y >= top && |
| another.y <= top + height; |
| } |
| |
| Point get topLeft => new Point/*<num>*/(this.left, this.top); |
| Point get topRight => new Point/*<num>*/(this.left + this.width, this.top); |
| Point get bottomRight => |
| new Point/*<num>*/(this.left + this.width, this.top + this.height); |
| Point get bottomLeft => new Point/*<num>*/(this.left, this.top + this.height); |
| |
| // To suppress missing implicit constructor warnings. |
| factory DomRectReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMRectReadOnly.DOMRectReadOnly') |
| @DocsEditable() |
| factory DomRectReadOnly(num x, num y, num width, num height) { |
| return DomRectReadOnly._create_1(x, y, width, height); |
| } |
| static DomRectReadOnly _create_1(x, y, width, height) => JS( |
| 'DomRectReadOnly', 'new DOMRectReadOnly(#,#,#,#)', x, y, width, height); |
| |
| num get bottom => JS("num", "#.bottom", this); |
| |
| num get height => JS("num", "#.height", this); |
| |
| num get left => JS("num", "#.left", this); |
| |
| num get right => JS("num", "#.right", this); |
| |
| num get top => JS("num", "#.top", this); |
| |
| num get width => JS("num", "#.width", this); |
| |
| num get x => JS("num", "#.x", this); |
| |
| num get y => JS("num", "#.y", this); |
| } |
| |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMSettableTokenList') |
| @Native("DOMSettableTokenList") |
| class DomSettableTokenList extends DomTokenList { |
| // To suppress missing implicit constructor warnings. |
| factory DomSettableTokenList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMSettableTokenList.value') |
| @DocsEditable() |
| String 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. |
| |
| @DocsEditable() |
| @DomName('DOMStringList') |
| @Native("DOMStringList") |
| class DomStringList extends Interceptor |
| with ListMixin<String>, ImmutableListMixin<String> |
| implements List<String> { |
| // To suppress missing implicit constructor warnings. |
| factory DomStringList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMStringList.length') |
| @DocsEditable() |
| int get length => JS("int", "#.length", this); |
| |
| String operator [](int index) { |
| if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) |
| throw new RangeError.index(index, this); |
| return this.item(index); |
| } |
| |
| void operator []=(int index, String value) { |
| throw new UnsupportedError("Cannot assign element of immutable List."); |
| } |
| // -- start List<String> mixins. |
| // String is the element type. |
| |
| set length(int value) { |
| throw new UnsupportedError("Cannot resize immutable List."); |
| } |
| |
| String get first { |
| if (this.length > 0) { |
| return JS('String', '#[0]', this); |
| } |
| throw new StateError("No elements"); |
| } |
| |
| String get last { |
| int len = this.length; |
| if (len > 0) { |
| return JS('String', '#[#]', this, len - 1); |
| } |
| throw new StateError("No elements"); |
| } |
| |
| String get single { |
| int len = this.length; |
| if (len == 1) { |
| return JS('String', '#[0]', this); |
| } |
| if (len == 0) throw new StateError("No elements"); |
| throw new StateError("More than one element"); |
| } |
| |
| String elementAt(int index) => this[index]; |
| // -- end List<String> mixins. |
| |
| @DomName('DOMStringList.__getter__') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String __getter__(int index) native ; |
| |
| @DomName('DOMStringList.item') |
| @DocsEditable() |
| String item(int index) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMStringMap') |
| abstract class DomStringMap extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomStringMap._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| void __delete__(index_OR_name); |
| |
| String __getter__(int index); |
| |
| void __setter__(index_OR_name, String value); |
| |
| String item(String name); |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('DOMTokenList') |
| @Native("DOMTokenList") |
| class DomTokenList extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomTokenList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('DOMTokenList.length') |
| @DocsEditable() |
| final int length; |
| |
| @DomName('DOMTokenList.add') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void add(String tokens) native ; |
| |
| @DomName('DOMTokenList.contains') |
| @DocsEditable() |
| bool contains(String token) native ; |
| |
| @DomName('DOMTokenList.item') |
| @DocsEditable() |
| String item(int index) native ; |
| |
| @DomName('DOMTokenList.remove') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void remove(String tokens) native ; |
| |
| @DomName('DOMTokenList.toggle') |
| @DocsEditable() |
| bool toggle(String token, [bool force]) native ; |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('EffectModel') |
| @Experimental() // untriaged |
| @Native("EffectModel") |
| class EffectModel extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory EffectModel._() { |
| 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. |
| |
| class _ChildrenElementList extends ListBase<Element> |
| implements NodeListWrapper { |
| // Raw Element. |
| final Element _element; |
| final HtmlCollection _childElements; |
| |
| _ChildrenElementList._wrap(Element element) |
| : _childElements = element._children, |
| _element = element; |
| |
| bool contains(Object element) => _childElements.contains(element); |
| |
| bool get isEmpty { |
| return _element._firstElementChild == null; |
| } |
| |
| int get length { |
| return _childElements.length; |
| } |
| |
| Element operator [](int index) { |
| return _childElements[index]; |
| } |
| |
| void operator []=(int index, Element value) { |
| _element._replaceChild(value, _childElements[index]); |
| } |
| |
| set length(int newLength) { |
| // TODO(jacobr): remove children when length is reduced. |
| throw new UnsupportedError('Cannot resize element lists'); |
| } |
| |
| Element add(Element value) { |
| _element.append(value); |
| return value; |
| } |
| |
| Iterator<Element> get iterator => toList().iterator; |
| |
| void addAll(Iterable<Element> iterable) { |
| if (iterable is _ChildNodeListLazy) { |
| iterable = new List.from(iterable); |
| } |
| |
| for (Element element in iterable) { |
| _element.append(element); |
| } |
| } |
| |
| void sort([int compare(Element a, Element b)]) { |
| throw new UnsupportedError('Cannot sort element lists'); |
| } |
| |
| void shuffle([Random random]) { |
| throw new UnsupportedError('Cannot shuffle element lists'); |
| } |
| |
| void removeWhere(bool test(Element element)) { |
| _filter(test, false); |
| } |
| |
| void retainWhere(bool test(Element element)) { |
| _filter(test, true); |
| } |
| |
| void _filter(bool test(Element element), bool retainMatching) { |
| var removed; |
| if (retainMatching) { |
| removed = _element.children.where((e) => !test(e)); |
| } else { |
| removed = _element.children.where(test); |
| } |
| for (var e in removed) e.remove(); |
| } |
| |
| void setRange(int start, int end, Iterable<Element> iterable, |
| [int skipCount = 0]) { |
| throw new UnimplementedError(); |
| } |
| |
| void replaceRange(int start, int end, Iterable<Element> iterable) { |
| throw new UnimplementedError(); |
| } |
| |
| void fillRange(int start, int end, [Element fillValue]) { |
| throw new UnimplementedError(); |
| } |
| |
| bool remove(Object object) { |
| if (object is Element) { |
| Element element = object; |
| if (identical(element.parentNode, _element)) { |
| _element._removeChild(element); |
| return true; |
| } |
| } |
| return false; |
| } |
| |
| void insert(int index, Element element) { |
| if (index < 0 || index > length) { |
| throw new RangeError.range(index, 0, length); |
| } |
| if (index == length) { |
| _element.append(element); |
| } else { |
| _element.insertBefore(element, this[index]); |
| } |
| } |
| |
| void setAll(int index, Iterable<Element> iterable) { |
| throw new UnimplementedError(); |
| } |
| |
| void clear() { |
| _element._clearChildren(); |
| } |
| |
| Element removeAt(int index) { |
| final result = this[index]; |
| if (result != null) { |
| _element._removeChild(result); |
| } |
| return result; |
| } |
| |
| Element removeLast() { |
| final result = this.last; |
| if (result != null) { |
| _element._removeChild(result); |
| } |
| return result; |
| } |
| |
| Element get first { |
| Element result = _element._firstElementChild; |
| if (result == null) throw new StateError("No elements"); |
| return result; |
| } |
| |
| Element get last { |
| Element result = _element._lastElementChild; |
| if (result == null) throw new StateError("No elements"); |
| return result; |
| } |
| |
| Element get single { |
| if (length > 1) throw new StateError("More than one element"); |
| return first; |
| } |
| |
| List<Node> get rawList => _childElements; |
| } |
| |
| /** |
| * An immutable list containing HTML elements. This list contains some |
| * additional methods when compared to regular lists for ease of CSS |
| * manipulation on a group of elements. |
| */ |
| abstract class ElementList<T extends Element> extends ListBase<T> { |
| /** |
| * The union of all CSS classes applied to the elements in this list. |
| * |
| * This set makes it easy to add, remove or toggle (add if not present, remove |
| * if present) the classes applied to a collection of elements. |
| * |
| * htmlList.classes.add('selected'); |
| * htmlList.classes.toggle('isOnline'); |
| * htmlList.classes.remove('selected'); |
| */ |
| CssClassSet get classes; |
| |
| /** Replace the classes with `value` for every element in this list. */ |
| set classes(Iterable<String> value); |
| |
| /** |
| * Access the union of all [CssStyleDeclaration]s that are associated with an |
| * [ElementList]. |
| * |
| * Grouping the style objects all together provides easy editing of specific |
| * properties of a collection of elements. Setting a specific property value |
| * will set that property in all [Element]s in the [ElementList]. Getting a |
| * specific property value will return the value of the property of the first |
| * element in the [ElementList]. |
| */ |
| CssStyleDeclarationBase get style; |
| |
| /** |
| * Access dimensions and position of the Elements in this list. |
| * |
| * Setting the height or width properties will set the height or width |
| * property for all elements in the list. This returns a rectangle with the |
| * dimenions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Getting the height or width returns the height or width of the |
| * first Element in this list. |
| * |
| * Unlike [getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. |
| */ |
| @Experimental() |
| CssRect get contentEdge; |
| |
| /** |
| * Access dimensions and position of the first Element's content + padding box |
| * in this list. |
| * |
| * This returns a rectangle with the dimenions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. This |
| * can be used to retrieve jQuery's `innerHeight` value for an element. This |
| * is also a rectangle equalling the dimensions of clientHeight and |
| * clientWidth. |
| */ |
| @Experimental() |
| CssRect get paddingEdge; |
| |
| /** |
| * Access dimensions and position of the first Element's content + padding + |
| * border box in this list. |
| * |
| * This returns a rectangle with the dimenions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. This |
| * can be used to retrieve jQuery's `outerHeight` value for an element. |
| */ |
| @Experimental() |
| CssRect get borderEdge; |
| |
| /** |
| * Access dimensions and position of the first Element's content + padding + |
| * border + margin box in this list. |
| * |
| * This returns a rectangle with the dimenions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. This |
| * can be used to retrieve jQuery's `outerHeight` value for an element. |
| */ |
| @Experimental() |
| CssRect get marginEdge; |
| |
| /// Stream of `abort` events handled by this [Element]. |
| @DomName('Element.onabort') |
| @DocsEditable() |
| ElementStream<Event> get onAbort; |
| |
| /// Stream of `beforecopy` events handled by this [Element]. |
| @DomName('Element.onbeforecopy') |
| @DocsEditable() |
| ElementStream<Event> get onBeforeCopy; |
| |
| /// Stream of `beforecut` events handled by this [Element]. |
| @DomName('Element.onbeforecut') |
| @DocsEditable() |
| ElementStream<Event> get onBeforeCut; |
| |
| /// Stream of `beforepaste` events handled by this [Element]. |
| @DomName('Element.onbeforepaste') |
| @DocsEditable() |
| ElementStream<Event> get onBeforePaste; |
| |
| /// Stream of `blur` events handled by this [Element]. |
| @DomName('Element.onblur') |
| @DocsEditable() |
| ElementStream<Event> get onBlur; |
| |
| @DomName('Element.oncanplay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onCanPlay; |
| |
| @DomName('Element.oncanplaythrough') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onCanPlayThrough; |
| |
| /// Stream of `change` events handled by this [Element]. |
| @DomName('Element.onchange') |
| @DocsEditable() |
| ElementStream<Event> get onChange; |
| |
| /// Stream of `click` events handled by this [Element]. |
| @DomName('Element.onclick') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onClick; |
| |
| /// Stream of `contextmenu` events handled by this [Element]. |
| @DomName('Element.oncontextmenu') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onContextMenu; |
| |
| /// Stream of `copy` events handled by this [Element]. |
| @DomName('Element.oncopy') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onCopy; |
| |
| /// Stream of `cut` events handled by this [Element]. |
| @DomName('Element.oncut') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onCut; |
| |
| /// Stream of `doubleclick` events handled by this [Element]. |
| @DomName('Element.ondblclick') |
| @DocsEditable() |
| ElementStream<Event> get onDoubleClick; |
| |
| /** |
| * A stream of `drag` events fired when this element currently being dragged. |
| * |
| * A `drag` event is added to this stream as soon as the drag begins. |
| * A `drag` event is also added to this stream at intervals while the drag |
| * operation is still ongoing. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondrag') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDrag; |
| |
| /** |
| * A stream of `dragend` events fired when this element completes a drag |
| * operation. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragend') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragEnd; |
| |
| /** |
| * A stream of `dragenter` events fired when a dragged object is first dragged |
| * over this element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragenter') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragEnter; |
| |
| /** |
| * A stream of `dragleave` events fired when an object being dragged over this |
| * element leaves this element's target area. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragleave') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragLeave; |
| |
| /** |
| * A stream of `dragover` events fired when a dragged object is currently |
| * being dragged over this element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragover') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragOver; |
| |
| /** |
| * A stream of `dragstart` events fired when this element starts being |
| * dragged. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragstart') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragStart; |
| |
| /** |
| * A stream of `drop` events fired when a dragged object is dropped on this |
| * element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondrop') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDrop; |
| |
| @DomName('Element.ondurationchange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onDurationChange; |
| |
| @DomName('Element.onemptied') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onEmptied; |
| |
| @DomName('Element.onended') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onEnded; |
| |
| /// Stream of `error` events handled by this [Element]. |
| @DomName('Element.onerror') |
| @DocsEditable() |
| ElementStream<Event> get onError; |
| |
| /// Stream of `focus` events handled by this [Element]. |
| @DomName('Element.onfocus') |
| @DocsEditable() |
| ElementStream<Event> get onFocus; |
| |
| /// Stream of `input` events handled by this [Element]. |
| @DomName('Element.oninput') |
| @DocsEditable() |
| ElementStream<Event> get onInput; |
| |
| /// Stream of `invalid` events handled by this [Element]. |
| @DomName('Element.oninvalid') |
| @DocsEditable() |
| ElementStream<Event> get onInvalid; |
| |
| /// Stream of `keydown` events handled by this [Element]. |
| @DomName('Element.onkeydown') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyDown; |
| |
| /// Stream of `keypress` events handled by this [Element]. |
| @DomName('Element.onkeypress') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyPress; |
| |
| /// Stream of `keyup` events handled by this [Element]. |
| @DomName('Element.onkeyup') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyUp; |
| |
| /// Stream of `load` events handled by this [Element]. |
| @DomName('Element.onload') |
| @DocsEditable() |
| ElementStream<Event> get onLoad; |
| |
| @DomName('Element.onloadeddata') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onLoadedData; |
| |
| @DomName('Element.onloadedmetadata') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onLoadedMetadata; |
| |
| /// Stream of `mousedown` events handled by this [Element]. |
| @DomName('Element.onmousedown') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseDown; |
| |
| /// Stream of `mouseenter` events handled by this [Element]. |
| @DomName('Element.onmouseenter') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<MouseEvent> get onMouseEnter; |
| |
| /// Stream of `mouseleave` events handled by this [Element]. |
| @DomName('Element.onmouseleave') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<MouseEvent> get onMouseLeave; |
| |
| /// Stream of `mousemove` events handled by this [Element]. |
| @DomName('Element.onmousemove') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseMove; |
| |
| /// Stream of `mouseout` events handled by this [Element]. |
| @DomName('Element.onmouseout') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseOut; |
| |
| /// Stream of `mouseover` events handled by this [Element]. |
| @DomName('Element.onmouseover') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseOver; |
| |
| /// Stream of `mouseup` events handled by this [Element]. |
| @DomName('Element.onmouseup') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseUp; |
| |
| /// Stream of `mousewheel` events handled by this [Element]. |
| @DomName('Element.onmousewheel') |
| @DocsEditable() |
| // http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents |
| @Experimental() // non-standard |
| ElementStream<WheelEvent> get onMouseWheel; |
| |
| /// Stream of `paste` events handled by this [Element]. |
| @DomName('Element.onpaste') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onPaste; |
| |
| @DomName('Element.onpause') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPause; |
| |
| @DomName('Element.onplay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPlay; |
| |
| @DomName('Element.onplaying') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPlaying; |
| |
| @DomName('Element.onratechange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onRateChange; |
| |
| /// Stream of `reset` events handled by this [Element]. |
| @DomName('Element.onreset') |
| @DocsEditable() |
| ElementStream<Event> get onReset; |
| |
| @DomName('Element.onresize') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onResize; |
| |
| /// Stream of `scroll` events handled by this [Element]. |
| @DomName('Element.onscroll') |
| @DocsEditable() |
| ElementStream<Event> get onScroll; |
| |
| /// Stream of `search` events handled by this [Element]. |
| @DomName('Element.onsearch') |
| @DocsEditable() |
| // http://www.w3.org/TR/html-markup/input.search.html |
| @Experimental() |
| ElementStream<Event> get onSearch; |
| |
| @DomName('Element.onseeked') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSeeked; |
| |
| @DomName('Element.onseeking') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSeeking; |
| |
| /// Stream of `select` events handled by this [Element]. |
| @DomName('Element.onselect') |
| @DocsEditable() |
| ElementStream<Event> get onSelect; |
| |
| /// Stream of `selectstart` events handled by this [Element]. |
| @DomName('Element.onselectstart') |
| @DocsEditable() |
| @Experimental() // nonstandard |
| ElementStream<Event> get onSelectStart; |
| |
| @DomName('Element.onstalled') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onStalled; |
| |
| /// Stream of `submit` events handled by this [Element]. |
| @DomName('Element.onsubmit') |
| @DocsEditable() |
| ElementStream<Event> get onSubmit; |
| |
| @DomName('Element.onsuspend') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSuspend; |
| |
| @DomName('Element.ontimeupdate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onTimeUpdate; |
| |
| /// Stream of `touchcancel` events handled by this [Element]. |
| @DomName('Element.ontouchcancel') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchCancel; |
| |
| /// Stream of `touchend` events handled by this [Element]. |
| @DomName('Element.ontouchend') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchEnd; |
| |
| /// Stream of `touchenter` events handled by this [Element]. |
| @DomName('Element.ontouchenter') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchEnter; |
| |
| /// Stream of `touchleave` events handled by this [Element]. |
| @DomName('Element.ontouchleave') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchLeave; |
| |
| /// Stream of `touchmove` events handled by this [Element]. |
| @DomName('Element.ontouchmove') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchMove; |
| |
| /// Stream of `touchstart` events handled by this [Element]. |
| @DomName('Element.ontouchstart') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchStart; |
| |
| /// Stream of `transitionend` events handled by this [Element]. |
| @DomName('Element.ontransitionend') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| ElementStream<TransitionEvent> get onTransitionEnd; |
| |
| @DomName('Element.onvolumechange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onVolumeChange; |
| |
| @DomName('Element.onwaiting') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onWaiting; |
| |
| /// Stream of `fullscreenchange` events handled by this [Element]. |
| @DomName('Element.onwebkitfullscreenchange') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| @Experimental() |
| ElementStream<Event> get onFullscreenChange; |
| |
| /// Stream of `fullscreenerror` events handled by this [Element]. |
| @DomName('Element.onwebkitfullscreenerror') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| @Experimental() |
| ElementStream<Event> get onFullscreenError; |
| } |
| |
| // Wrapper over an immutable NodeList to make it implement ElementList. |
| // |
| // Clients are {`Document`, `DocumentFragment`}.`querySelectorAll` which are |
| // declared to return `ElementList`. This provides all the static analysis |
| // benefit so there is no need for this class have a constrained type parameter. |
| // |
| class _FrozenElementList<E extends Element> extends ListBase<E> |
| implements ElementList<E>, NodeListWrapper { |
| final List<Node> _nodeList; |
| |
| _FrozenElementList._wrap(this._nodeList); |
| |
| int get length => _nodeList.length; |
| |
| E operator [](int index) => _downcast/*<Node, E>*/(_nodeList[index]); |
| |
| void operator []=(int index, E value) { |
| throw new UnsupportedError('Cannot modify list'); |
| } |
| |
| set length(int newLength) { |
| throw new UnsupportedError('Cannot modify list'); |
| } |
| |
| void sort([Comparator<E> compare]) { |
| throw new UnsupportedError('Cannot sort list'); |
| } |
| |
| void shuffle([Random random]) { |
| throw new UnsupportedError('Cannot shuffle list'); |
| } |
| |
| E get first => _downcast/*<Node, E>*/(_nodeList.first); |
| |
| E get last => _downcast/*<Node, E>*/(_nodeList.last); |
| |
| E get single => _downcast/*<Node, E>*/(_nodeList.single); |
| |
| CssClassSet get classes => new _MultiElementCssClassSet(this); |
| |
| CssStyleDeclarationBase get style => new _CssStyleDeclarationSet(this); |
| |
| set classes(Iterable<String> value) { |
| // TODO(sra): This might be faster for Sets: |
| // |
| // new _MultiElementCssClassSet(this).writeClasses(value) |
| // |
| // as the code below converts the Iterable[value] to a string multiple |
| // times. Maybe compute the string and set className here. |
| forEach((e) => e.classes = value); |
| } |
| |
| CssRect get contentEdge => new _ContentCssListRect(this); |
| |
| CssRect get paddingEdge => this.first.paddingEdge; |
| |
| CssRect get borderEdge => this.first.borderEdge; |
| |
| CssRect get marginEdge => this.first.marginEdge; |
| |
| List<Node> get rawList => _nodeList; |
| |
| /// Stream of `abort` events handled by this [Element]. |
| @DomName('Element.onabort') |
| @DocsEditable() |
| ElementStream<Event> get onAbort => Element.abortEvent._forElementList(this); |
| |
| /// Stream of `beforecopy` events handled by this [Element]. |
| @DomName('Element.onbeforecopy') |
| @DocsEditable() |
| ElementStream<Event> get onBeforeCopy => |
| Element.beforeCopyEvent._forElementList(this); |
| |
| /// Stream of `beforecut` events handled by this [Element]. |
| @DomName('Element.onbeforecut') |
| @DocsEditable() |
| ElementStream<Event> get onBeforeCut => |
| Element.beforeCutEvent._forElementList(this); |
| |
| /// Stream of `beforepaste` events handled by this [Element]. |
| @DomName('Element.onbeforepaste') |
| @DocsEditable() |
| ElementStream<Event> get onBeforePaste => |
| Element.beforePasteEvent._forElementList(this); |
| |
| /// Stream of `blur` events handled by this [Element]. |
| @DomName('Element.onblur') |
| @DocsEditable() |
| ElementStream<Event> get onBlur => Element.blurEvent._forElementList(this); |
| |
| @DomName('Element.oncanplay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onCanPlay => |
| Element.canPlayEvent._forElementList(this); |
| |
| @DomName('Element.oncanplaythrough') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onCanPlayThrough => |
| Element.canPlayThroughEvent._forElementList(this); |
| |
| /// Stream of `change` events handled by this [Element]. |
| @DomName('Element.onchange') |
| @DocsEditable() |
| ElementStream<Event> get onChange => |
| Element.changeEvent._forElementList(this); |
| |
| /// Stream of `click` events handled by this [Element]. |
| @DomName('Element.onclick') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onClick => |
| Element.clickEvent._forElementList(this); |
| |
| /// Stream of `contextmenu` events handled by this [Element]. |
| @DomName('Element.oncontextmenu') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onContextMenu => |
| Element.contextMenuEvent._forElementList(this); |
| |
| /// Stream of `copy` events handled by this [Element]. |
| @DomName('Element.oncopy') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onCopy => |
| Element.copyEvent._forElementList(this); |
| |
| /// Stream of `cut` events handled by this [Element]. |
| @DomName('Element.oncut') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onCut => |
| Element.cutEvent._forElementList(this); |
| |
| /// Stream of `doubleclick` events handled by this [Element]. |
| @DomName('Element.ondblclick') |
| @DocsEditable() |
| ElementStream<Event> get onDoubleClick => |
| Element.doubleClickEvent._forElementList(this); |
| |
| /** |
| * A stream of `drag` events fired when this element currently being dragged. |
| * |
| * A `drag` event is added to this stream as soon as the drag begins. |
| * A `drag` event is also added to this stream at intervals while the drag |
| * operation is still ongoing. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondrag') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDrag => |
| Element.dragEvent._forElementList(this); |
| |
| /** |
| * A stream of `dragend` events fired when this element completes a drag |
| * operation. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragend') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragEnd => |
| Element.dragEndEvent._forElementList(this); |
| |
| /** |
| * A stream of `dragenter` events fired when a dragged object is first dragged |
| * over this element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragenter') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragEnter => |
| Element.dragEnterEvent._forElementList(this); |
| |
| /** |
| * A stream of `dragleave` events fired when an object being dragged over this |
| * element leaves this element's target area. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragleave') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragLeave => |
| Element.dragLeaveEvent._forElementList(this); |
| |
| /** |
| * A stream of `dragover` events fired when a dragged object is currently |
| * being dragged over this element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragover') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragOver => |
| Element.dragOverEvent._forElementList(this); |
| |
| /** |
| * A stream of `dragstart` events fired when this element starts being |
| * dragged. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragstart') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragStart => |
| Element.dragStartEvent._forElementList(this); |
| |
| /** |
| * A stream of `drop` events fired when a dragged object is dropped on this |
| * element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondrop') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDrop => |
| Element.dropEvent._forElementList(this); |
| |
| @DomName('Element.ondurationchange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onDurationChange => |
| Element.durationChangeEvent._forElementList(this); |
| |
| @DomName('Element.onemptied') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onEmptied => |
| Element.emptiedEvent._forElementList(this); |
| |
| @DomName('Element.onended') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onEnded => Element.endedEvent._forElementList(this); |
| |
| /// Stream of `error` events handled by this [Element]. |
| @DomName('Element.onerror') |
| @DocsEditable() |
| ElementStream<Event> get onError => Element.errorEvent._forElementList(this); |
| |
| /// Stream of `focus` events handled by this [Element]. |
| @DomName('Element.onfocus') |
| @DocsEditable() |
| ElementStream<Event> get onFocus => Element.focusEvent._forElementList(this); |
| |
| /// Stream of `input` events handled by this [Element]. |
| @DomName('Element.oninput') |
| @DocsEditable() |
| ElementStream<Event> get onInput => Element.inputEvent._forElementList(this); |
| |
| /// Stream of `invalid` events handled by this [Element]. |
| @DomName('Element.oninvalid') |
| @DocsEditable() |
| ElementStream<Event> get onInvalid => |
| Element.invalidEvent._forElementList(this); |
| |
| /// Stream of `keydown` events handled by this [Element]. |
| @DomName('Element.onkeydown') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyDown => |
| Element.keyDownEvent._forElementList(this); |
| |
| /// Stream of `keypress` events handled by this [Element]. |
| @DomName('Element.onkeypress') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyPress => |
| Element.keyPressEvent._forElementList(this); |
| |
| /// Stream of `keyup` events handled by this [Element]. |
| @DomName('Element.onkeyup') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyUp => |
| Element.keyUpEvent._forElementList(this); |
| |
| /// Stream of `load` events handled by this [Element]. |
| @DomName('Element.onload') |
| @DocsEditable() |
| ElementStream<Event> get onLoad => Element.loadEvent._forElementList(this); |
| |
| @DomName('Element.onloadeddata') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onLoadedData => |
| Element.loadedDataEvent._forElementList(this); |
| |
| @DomName('Element.onloadedmetadata') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onLoadedMetadata => |
| Element.loadedMetadataEvent._forElementList(this); |
| |
| /// Stream of `mousedown` events handled by this [Element]. |
| @DomName('Element.onmousedown') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseDown => |
| Element.mouseDownEvent._forElementList(this); |
| |
| /// Stream of `mouseenter` events handled by this [Element]. |
| @DomName('Element.onmouseenter') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<MouseEvent> get onMouseEnter => |
| Element.mouseEnterEvent._forElementList(this); |
| |
| /// Stream of `mouseleave` events handled by this [Element]. |
| @DomName('Element.onmouseleave') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<MouseEvent> get onMouseLeave => |
| Element.mouseLeaveEvent._forElementList(this); |
| |
| /// Stream of `mousemove` events handled by this [Element]. |
| @DomName('Element.onmousemove') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseMove => |
| Element.mouseMoveEvent._forElementList(this); |
| |
| /// Stream of `mouseout` events handled by this [Element]. |
| @DomName('Element.onmouseout') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseOut => |
| Element.mouseOutEvent._forElementList(this); |
| |
| /// Stream of `mouseover` events handled by this [Element]. |
| @DomName('Element.onmouseover') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseOver => |
| Element.mouseOverEvent._forElementList(this); |
| |
| /// Stream of `mouseup` events handled by this [Element]. |
| @DomName('Element.onmouseup') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseUp => |
| Element.mouseUpEvent._forElementList(this); |
| |
| /// Stream of `mousewheel` events handled by this [Element]. |
| @DomName('Element.onmousewheel') |
| @DocsEditable() |
| // http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents |
| @Experimental() // non-standard |
| ElementStream<WheelEvent> get onMouseWheel => |
| Element.mouseWheelEvent._forElementList(this); |
| |
| /// Stream of `paste` events handled by this [Element]. |
| @DomName('Element.onpaste') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onPaste => |
| Element.pasteEvent._forElementList(this); |
| |
| @DomName('Element.onpause') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPause => Element.pauseEvent._forElementList(this); |
| |
| @DomName('Element.onplay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPlay => Element.playEvent._forElementList(this); |
| |
| @DomName('Element.onplaying') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPlaying => |
| Element.playingEvent._forElementList(this); |
| |
| @DomName('Element.onratechange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onRateChange => |
| Element.rateChangeEvent._forElementList(this); |
| |
| /// Stream of `reset` events handled by this [Element]. |
| @DomName('Element.onreset') |
| @DocsEditable() |
| ElementStream<Event> get onReset => Element.resetEvent._forElementList(this); |
| |
| @DomName('Element.onresize') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onResize => |
| Element.resizeEvent._forElementList(this); |
| |
| /// Stream of `scroll` events handled by this [Element]. |
| @DomName('Element.onscroll') |
| @DocsEditable() |
| ElementStream<Event> get onScroll => |
| Element.scrollEvent._forElementList(this); |
| |
| /// Stream of `search` events handled by this [Element]. |
| @DomName('Element.onsearch') |
| @DocsEditable() |
| // http://www.w3.org/TR/html-markup/input.search.html |
| @Experimental() |
| ElementStream<Event> get onSearch => |
| Element.searchEvent._forElementList(this); |
| |
| @DomName('Element.onseeked') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSeeked => |
| Element.seekedEvent._forElementList(this); |
| |
| @DomName('Element.onseeking') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSeeking => |
| Element.seekingEvent._forElementList(this); |
| |
| /// Stream of `select` events handled by this [Element]. |
| @DomName('Element.onselect') |
| @DocsEditable() |
| ElementStream<Event> get onSelect => |
| Element.selectEvent._forElementList(this); |
| |
| /// Stream of `selectstart` events handled by this [Element]. |
| @DomName('Element.onselectstart') |
| @DocsEditable() |
| @Experimental() // nonstandard |
| ElementStream<Event> get onSelectStart => |
| Element.selectStartEvent._forElementList(this); |
| |
| @DomName('Element.onstalled') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onStalled => |
| Element.stalledEvent._forElementList(this); |
| |
| /// Stream of `submit` events handled by this [Element]. |
| @DomName('Element.onsubmit') |
| @DocsEditable() |
| ElementStream<Event> get onSubmit => |
| Element.submitEvent._forElementList(this); |
| |
| @DomName('Element.onsuspend') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSuspend => |
| Element.suspendEvent._forElementList(this); |
| |
| @DomName('Element.ontimeupdate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onTimeUpdate => |
| Element.timeUpdateEvent._forElementList(this); |
| |
| /// Stream of `touchcancel` events handled by this [Element]. |
| @DomName('Element.ontouchcancel') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchCancel => |
| Element.touchCancelEvent._forElementList(this); |
| |
| /// Stream of `touchend` events handled by this [Element]. |
| @DomName('Element.ontouchend') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchEnd => |
| Element.touchEndEvent._forElementList(this); |
| |
| /// Stream of `touchenter` events handled by this [Element]. |
| @DomName('Element.ontouchenter') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchEnter => |
| Element.touchEnterEvent._forElementList(this); |
| |
| /// Stream of `touchleave` events handled by this [Element]. |
| @DomName('Element.ontouchleave') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchLeave => |
| Element.touchLeaveEvent._forElementList(this); |
| |
| /// Stream of `touchmove` events handled by this [Element]. |
| @DomName('Element.ontouchmove') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchMove => |
| Element.touchMoveEvent._forElementList(this); |
| |
| /// Stream of `touchstart` events handled by this [Element]. |
| @DomName('Element.ontouchstart') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchStart => |
| Element.touchStartEvent._forElementList(this); |
| |
| /// Stream of `transitionend` events handled by this [Element]. |
| @DomName('Element.ontransitionend') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| ElementStream<TransitionEvent> get onTransitionEnd => |
| Element.transitionEndEvent._forElementList(this); |
| |
| @DomName('Element.onvolumechange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onVolumeChange => |
| Element.volumeChangeEvent._forElementList(this); |
| |
| @DomName('Element.onwaiting') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onWaiting => |
| Element.waitingEvent._forElementList(this); |
| |
| /// Stream of `fullscreenchange` events handled by this [Element]. |
| @DomName('Element.onwebkitfullscreenchange') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| @Experimental() |
| ElementStream<Event> get onFullscreenChange => |
| Element.fullscreenChangeEvent._forElementList(this); |
| |
| /// Stream of `fullscreenerror` events handled by this [Element]. |
| @DomName('Element.onwebkitfullscreenerror') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| @Experimental() |
| ElementStream<Event> get onFullscreenError => |
| Element.fullscreenErrorEvent._forElementList(this); |
| } |
| |
| @DocsEditable() |
| /** |
| * An abstract class, which all HTML elements extend. |
| */ |
| @DomName('Element') |
| @Native("Element") |
| class Element extends Node |
| implements |
| NonDocumentTypeChildNode, |
| GlobalEventHandlers, |
| ParentNode, |
| ChildNode { |
| /** |
| * Creates an HTML element from a valid fragment of HTML. |
| * |
| * var element = new Element.html('<div class="foo">content</div>'); |
| * |
| * The HTML fragment should contain only one single root element, any |
| * leading or trailing text nodes will be removed. |
| * |
| * The HTML fragment is parsed as if it occurred within the context of a |
| * `<body>` tag, this means that special elements such as `<caption>` which |
| * must be parsed within the scope of a `<table>` element will be dropped. Use |
| * [createFragment] to parse contextual HTML fragments. |
| * |
| * Unless a validator is provided this will perform the default validation |
| * and remove all scriptable elements and attributes. |
| * |
| * See also: |
| * |
| * * [NodeValidator] |
| * |
| */ |
| factory Element.html(String html, |
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
| var fragment = document.body.createFragment(html, |
| validator: validator, treeSanitizer: treeSanitizer); |
| |
| return fragment.nodes.where((e) => e is Element).single; |
| } |
| |
| /** |
| * Custom element creation constructor. |
| * |
| * This constructor is used by the DOM when a custom element has been |
| * created. It can only be invoked by subclasses of Element from |
| * that classes created constructor. |
| * |
| * class CustomElement extends Element { |
| * factory CustomElement() => new Element.tag('x-custom'); |
| * |
| * CustomElement.created() : super.created() { |
| * // Perform any element initialization. |
| * } |
| * } |
| * document.registerElement('x-custom', CustomElement); |
| */ |
| Element.created() : super._created(); |
| |
| /** |
| * Creates the HTML element specified by the tag name. |
| * |
| * This is similar to [Document.createElement]. |
| * [tag] should be a valid HTML tag name. If [tag] is an unknown tag then |
| * this will create an [UnknownElement]. |
| * |
| * var divElement = new Element.tag('div'); |
| * print(divElement is DivElement); // 'true' |
| * var myElement = new Element.tag('unknownTag'); |
| * print(myElement is UnknownElement); // 'true' |
| * |
| * For standard elements it is more preferable to use the type constructors: |
| * var element = new DivElement(); |
| * |
| * See also: |
| * |
| * * [isTagSupported] |
| */ |
| factory Element.tag(String tag, [String typeExtention]) => |
| _ElementFactoryProvider.createElement_tag(tag, typeExtention); |
| |
| /// Creates a new `<a>` element. |
| /// |
| /// This is identical to calling `new Element.tag('a')`. |
| factory Element.a() => new Element.tag('a'); |
| |
| /// Creates a new `<article>` element. |
| /// |
| /// This is identical to calling `new Element.tag('article')`. |
| factory Element.article() => new Element.tag('article'); |
| |
| /// Creates a new `<aside>` element. |
| /// |
| /// This is identical to calling `new Element.tag('aside')`. |
| factory Element.aside() => new Element.tag('aside'); |
| |
| /// Creates a new `<audio>` element. |
| /// |
| /// This is identical to calling `new Element.tag('audio')`. |
| factory Element.audio() => new Element.tag('audio'); |
| |
| /// Creates a new `<br>` element. |
| /// |
| /// This is identical to calling `new Element.tag('br')`. |
| factory Element.br() => new Element.tag('br'); |
| |
| /// Creates a new `<canvas>` element. |
| /// |
| /// This is identical to calling `new Element.tag('canvas')`. |
| factory Element.canvas() => new Element.tag('canvas'); |
| |
| /// Creates a new `<div>` element. |
| /// |
| /// This is identical to calling `new Element.tag('div')`. |
| factory Element.div() => new Element.tag('div'); |
| |
| /// Creates a new `<footer>` element. |
| /// |
| /// This is identical to calling `new Element.tag('footer')`. |
| factory Element.footer() => new Element.tag('footer'); |
| |
| /// Creates a new `<header>` element. |
| /// |
| /// This is identical to calling `new Element.tag('header')`. |
| factory Element.header() => new Element.tag('header'); |
| |
| /// Creates a new `<hr>` element. |
| /// |
| /// This is identical to calling `new Element.tag('hr')`. |
| factory Element.hr() => new Element.tag('hr'); |
| |
| /// Creates a new `<iframe>` element. |
| /// |
| /// This is identical to calling `new Element.tag('iframe')`. |
| factory Element.iframe() => new Element.tag('iframe'); |
| |
| /// Creates a new `<img>` element. |
| /// |
| /// This is identical to calling `new Element.tag('img')`. |
| factory Element.img() => new Element.tag('img'); |
| |
| /// Creates a new `<li>` element. |
| /// |
| /// This is identical to calling `new Element.tag('li')`. |
| factory Element.li() => new Element.tag('li'); |
| |
| /// Creates a new `<nav>` element. |
| /// |
| /// This is identical to calling `new Element.tag('nav')`. |
| factory Element.nav() => new Element.tag('nav'); |
| |
| /// Creates a new `<ol>` element. |
| /// |
| /// This is identical to calling `new Element.tag('ol')`. |
| factory Element.ol() => new Element.tag('ol'); |
| |
| /// Creates a new `<option>` element. |
| /// |
| /// This is identical to calling `new Element.tag('option')`. |
| factory Element.option() => new Element.tag('option'); |
| |
| /// Creates a new `<p>` element. |
| /// |
| /// This is identical to calling `new Element.tag('p')`. |
| factory Element.p() => new Element.tag('p'); |
| |
| /// Creates a new `<pre>` element. |
| /// |
| /// This is identical to calling `new Element.tag('pre')`. |
| factory Element.pre() => new Element.tag('pre'); |
| |
| /// Creates a new `<section>` element. |
| /// |
| /// This is identical to calling `new Element.tag('section')`. |
| factory Element.section() => new Element.tag('section'); |
| |
| /// Creates a new `<select>` element. |
| /// |
| /// This is identical to calling `new Element.tag('select')`. |
| factory Element.select() => new Element.tag('select'); |
| |
| /// Creates a new `<span>` element. |
| /// |
| /// This is identical to calling `new Element.tag('span')`. |
| factory Element.span() => new Element.tag('span'); |
| |
| /// Creates a new `<svg>` element. |
| /// |
| /// This is identical to calling `new Element.tag('svg')`. |
| factory Element.svg() => new Element.tag('svg'); |
| |
| /// Creates a new `<table>` element. |
| /// |
| /// This is identical to calling `new Element.tag('table')`. |
| factory Element.table() => new Element.tag('table'); |
| |
| /// Creates a new `<td>` element. |
| /// |
| /// This is identical to calling `new Element.tag('td')`. |
| factory Element.td() => new Element.tag('td'); |
| |
| /// Creates a new `<textarea>` element. |
| /// |
| /// This is identical to calling `new Element.tag('textarea')`. |
| factory Element.textarea() => new Element.tag('textarea'); |
| |
| /// Creates a new `<th>` element. |
| /// |
| /// This is identical to calling `new Element.tag('th')`. |
| factory Element.th() => new Element.tag('th'); |
| |
| /// Creates a new `<tr>` element. |
| /// |
| /// This is identical to calling `new Element.tag('tr')`. |
| factory Element.tr() => new Element.tag('tr'); |
| |
| /// Creates a new `<ul>` element. |
| /// |
| /// This is identical to calling `new Element.tag('ul')`. |
| factory Element.ul() => new Element.tag('ul'); |
| |
| /// Creates a new `<video>` element. |
| /// |
| /// This is identical to calling `new Element.tag('video')`. |
| factory Element.video() => new Element.tag('video'); |
| |
| /** |
| * All attributes on this element. |
| * |
| * Any modifications to the attribute map will automatically be applied to |
| * this element. |
| * |
| * This only includes attributes which are not in a namespace |
| * (such as 'xlink:href'), additional attributes can be accessed via |
| * [getNamespacedAttributes]. |
| */ |
| Map<String, String> get attributes => new _ElementAttributeMap(this); |
| |
| set attributes(Map<String, String> value) { |
| Map<String, String> attributes = this.attributes; |
| attributes.clear(); |
| for (String key in value.keys) { |
| attributes[key] = value[key]; |
| } |
| } |
| |
| /** |
| * List of the direct children of this element. |
| * |
| * This collection can be used to add and remove elements from the document. |
| * |
| * var item = new DivElement(); |
| * item.text = 'Something'; |
| * document.body.children.add(item) // Item is now displayed on the page. |
| * for (var element in document.body.children) { |
| * element.style.background = 'red'; // Turns every child of body red. |
| * } |
| */ |
| List<Element> get children => new _ChildrenElementList._wrap(this); |
| |
| set children(List<Element> value) { |
| // Copy list first since we don't want liveness during iteration. |
| var copy = value.toList(); |
| var children = this.children; |
| children.clear(); |
| children.addAll(copy); |
| } |
| |
| /** |
| * Finds all descendent elements of this element that match the specified |
| * group of selectors. |
| * |
| * [selectors] should be a string using CSS selector syntax. |
| * |
| * var items = element.querySelectorAll('.itemClassName'); |
| * |
| * For details about CSS selector syntax, see the |
| * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). |
| */ |
| @DomName('Element.querySelectorAll') |
| ElementList<Element/*=T*/ > querySelectorAll/*<T extends Element>*/( |
| String selectors) => |
| new _FrozenElementList/*<T>*/ ._wrap(_querySelectorAll(selectors)); |
| |
| /** |
| * Alias for [querySelector]. Note this function is deprecated because its |
| * semantics will be changing in the future. |
| */ |
| @deprecated |
| @DomName('Element.querySelector') |
| @Experimental() |
| Element query(String relativeSelectors) => querySelector(relativeSelectors); |
| |
| /** |
| * Alias for [querySelectorAll]. Note this function is deprecated because its |
| * semantics will be changing in the future. |
| */ |
| @deprecated |
| @DomName('Element.querySelectorAll') |
| @Experimental() |
| ElementList<Element/*=T*/ > queryAll/*<T extends Element>*/( |
| String relativeSelectors) => |
| querySelectorAll(relativeSelectors); |
| |
| /** |
| * The set of CSS classes applied to this element. |
| * |
| * This set makes it easy to add, remove or toggle the classes applied to |
| * this element. |
| * |
| * element.classes.add('selected'); |
| * element.classes.toggle('isOnline'); |
| * element.classes.remove('selected'); |
| */ |
| CssClassSet get classes => new _ElementCssClassSet(this); |
| |
| set classes(Iterable<String> value) { |
| // TODO(sra): Do this without reading the classes in clear() and addAll(), |
| // or writing the classes in clear(). |
| CssClassSet classSet = classes; |
| classSet.clear(); |
| classSet.addAll(value); |
| } |
| |
| /** |
| * Allows access to all custom data attributes (data-*) set on this element. |
| * |
| * The keys for the map must follow these rules: |
| * |
| * * The name must not begin with 'xml'. |
| * * The name cannot contain a semi-colon (';'). |
| * * The name cannot contain any capital letters. |
| * |
| * Any keys from markup will be converted to camel-cased keys in the map. |
| * |
| * For example, HTML specified as: |
| * |
| * <div data-my-random-value='value'></div> |
| * |
| * Would be accessed in Dart as: |
| * |
| * var value = element.dataset['myRandomValue']; |
| * |
| * See also: |
| * |
| * * [Custom data |
| * attributes](http://dev.w3.org/html5/spec-preview/global-attributes.html#custom-data-attribute) |
| */ |
| Map<String, String> get dataset => new _DataAttributeMap(attributes); |
| |
| set dataset(Map<String, String> value) { |
| final data = this.dataset; |
| data.clear(); |
| for (String key in value.keys) { |
| data[key] = value[key]; |
| } |
| } |
| |
| /** |
| * Gets a map for manipulating the attributes of a particular namespace. |
| * |
| * This is primarily useful for SVG attributes such as xref:link. |
| */ |
| Map<String, String> getNamespacedAttributes(String namespace) { |
| return new _NamespacedAttributeMap(this, namespace); |
| } |
| |
| /** |
| * The set of all CSS values applied to this element, including inherited |
| * and default values. |
| * |
| * The computedStyle contains values that are inherited from other |
| * sources, such as parent elements or stylesheets. This differs from the |
| * [style] property, which contains only the values specified directly on this |
| * element. |
| * |
| * PseudoElement can be values such as `::after`, `::before`, `::marker`, |
| * `::line-marker`. |
| * |
| * See also: |
| * |
| * * [CSS Inheritance and Cascade](http://docs.webplatform.org/wiki/tutorials/inheritance_and_cascade) |
| * * [Pseudo-elements](http://docs.webplatform.org/wiki/css/selectors/pseudo-elements) |
| */ |
| CssStyleDeclaration getComputedStyle([String pseudoElement]) { |
| if (pseudoElement == null) { |
| pseudoElement = ''; |
| } |
| // TODO(jacobr): last param should be null, see b/5045788 |
| return window._getComputedStyle(this, pseudoElement); |
| } |
| |
| /** |
| * Gets the position of this element relative to the client area of the page. |
| */ |
| Rectangle get client => |
| new Rectangle(clientLeft, clientTop, clientWidth, clientHeight); |
| |
| /** |
| * Gets the offset of this element relative to its offsetParent. |
| */ |
| Rectangle get offset => |
| new Rectangle(offsetLeft, offsetTop, offsetWidth, offsetHeight); |
| |
| /** |
| * Adds the specified text after the last child of this element. |
| */ |
| void appendText(String text) { |
| this.append(new Text(text)); |
| } |
| |
| /** |
| * Parses the specified text as HTML and adds the resulting node after the |
| * last child of this element. |
| */ |
| void appendHtml(String text, |
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
| this.insertAdjacentHtml('beforeend', text, |
| validator: validator, treeSanitizer: treeSanitizer); |
| } |
| |
| /** |
| * Checks to see if the tag name is supported by the current platform. |
| * |
| * The tag should be a valid HTML tag name. |
| */ |
| static bool isTagSupported(String tag) { |
| var e = _ElementFactoryProvider.createElement_tag(tag, null); |
| return e is Element && !(e is UnknownElement); |
| } |
| |
| /** |
| * Called by the DOM when this element has been inserted into the live |
| * document. |
| * |
| * More information can be found in the |
| * [Custom Elements](http://w3c.github.io/webcomponents/spec/custom/#dfn-attached-callback) |
| * draft specification. |
| */ |
| @Experimental() |
| void attached() { |
| // For the deprecation period, call the old callback. |
| enteredView(); |
| } |
| |
| /** |
| * Called by the DOM when this element has been removed from the live |
| * document. |
| * |
| * More information can be found in the |
| * [Custom Elements](http://w3c.github.io/webcomponents/spec/custom/#dfn-detached-callback) |
| * draft specification. |
| */ |
| @Experimental() |
| void detached() { |
| // For the deprecation period, call the old callback. |
| leftView(); |
| } |
| |
| /** *Deprecated*: override [attached] instead. */ |
| @Experimental() |
| @deprecated |
| void enteredView() {} |
| |
| /** *Deprecated*: override [detached] instead. */ |
| @Experimental() |
| @deprecated |
| void leftView() {} |
| |
| /** |
| * Creates a new AnimationEffect object whose target element is the object |
| * on which the method is called, and calls the play() method of the |
| * AnimationTimeline object of the document timeline of the node document |
| * of the element, passing the newly created AnimationEffect as the argument |
| * to the method. Returns an Animation for the effect. |
| * |
| * Examples |
| * |
| * var animation = elem.animate([{"opacity": 75}, {"opacity": 0}], 200); |
| * |
| * var animation = elem.animate([ |
| * {"transform": "translate(100px, -100%)"}, |
| * {"transform" : "translate(400px, 500px)"} |
| * ], 1500); |
| * |
| * The [frames] parameter is an Iterable<Map>, where the |
| * map entries specify CSS animation effects. The |
| * [timing] paramter can be a double, representing the number of milliseconds |
| * for the transition, or a Map with fields corresponding to those |
| * of the [Timing] object. |
| **/ |
| @Experimental() |
| @SupportedBrowser(SupportedBrowser.CHROME, '36') |
| Animation animate(Iterable<Map<String, dynamic>> frames, [timing]) { |
| if (frames is! Iterable || !(frames.every((x) => x is Map))) { |
| throw new ArgumentError("The frames parameter should be a List of Maps " |
| "with frame information"); |
| } |
| var convertedFrames; |
| if (frames is Iterable) { |
| convertedFrames = frames.map(convertDartToNative_Dictionary).toList(); |
| } else { |
| convertedFrames = frames; |
| } |
| var convertedTiming = |
| timing is Map ? convertDartToNative_Dictionary(timing) : timing; |
| return convertedTiming == null |
| ? _animate(convertedFrames) |
| : _animate(convertedFrames, convertedTiming); |
| } |
| |
| @DomName('Element.animate') |
| @JSName('animate') |
| @Experimental() // untriaged |
| Animation _animate(Object effect, [timing]) native ; |
| /** |
| * Called by the DOM whenever an attribute on this has been changed. |
| */ |
| void attributeChanged(String name, String oldValue, String newValue) {} |
| |
| // Hooks to support custom WebComponents. |
| |
| @Creates('Null') // Set from Dart code; does not instantiate a native type. |
| Element _xtag; |
| |
| /** |
| * Experimental support for [web components][wc]. This field stores a |
| * reference to the component implementation. It was inspired by Mozilla's |
| * [x-tags][] project. Please note: in the future it may be possible to |
| * `extend Element` from your class, in which case this field will be |
| * deprecated. |
| * |
| * If xtag has not been set, it will simply return `this` [Element]. |
| * |
| * [wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html |
| * [x-tags]: http://x-tags.org/ |
| */ |
| // Note: return type is `dynamic` for convenience to suppress warnings when |
| // members of the component are used. The actual type is a subtype of Element. |
| get xtag => _xtag != null ? _xtag : this; |
| |
| set xtag(Element value) { |
| _xtag = value; |
| } |
| |
| @DomName('Element.localName') |
| @DocsEditable() |
| @Returns('String') |
| // Non-null for Elements. |
| String get localName => JS('String', '#', _localName); |
| |
| /** |
| * A URI that identifies the XML namespace of this element. |
| * |
| * `null` if no namespace URI is specified. |
| * |
| * ## Other resources |
| * |
| * * [Node.namespaceURI](http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSname) |
| * from W3C. |
| */ |
| @DomName('Element.namespaceUri') |
| String get namespaceUri => _namespaceUri; |
| |
| /** |
| * The string representation of this element. |
| * |
| * This is equivalent to reading the [localName] property. |
| */ |
| String toString() => localName; |
| |
| /** |
| * Scrolls this element into view. |
| * |
| * Only one of of the alignment options may be specified at a time. |
| * |
| * If no options are specified then this will attempt to scroll the minimum |
| * amount needed to bring the element into view. |
| * |
| * Note that alignCenter is currently only supported on WebKit platforms. If |
| * alignCenter is specified but not supported then this will fall back to |
| * alignTop. |
| * |
| * See also: |
| * |
| * * [scrollIntoView](http://docs.webplatform.org/wiki/dom/methods/scrollIntoView) |
| * * [scrollIntoViewIfNeeded](http://docs.webplatform.org/wiki/dom/methods/scrollIntoViewIfNeeded) |
| */ |
| void scrollIntoView([ScrollAlignment alignment]) { |
| var hasScrollIntoViewIfNeeded = true; |
| hasScrollIntoViewIfNeeded = |
| JS('bool', '!!(#.scrollIntoViewIfNeeded)', this); |
| if (alignment == ScrollAlignment.TOP) { |
| this._scrollIntoView(true); |
| } else if (alignment == ScrollAlignment.BOTTOM) { |
| this._scrollIntoView(false); |
| } else if (hasScrollIntoViewIfNeeded) { |
| if (alignment == ScrollAlignment.CENTER) { |
| this._scrollIntoViewIfNeeded(true); |
| } else { |
| this._scrollIntoViewIfNeeded(); |
| } |
| } else { |
| this._scrollIntoView(); |
| } |
| } |
| |
| /** |
| * Static factory designed to expose `mousewheel` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.mouseWheelEvent') |
| static const EventStreamProvider<WheelEvent> mouseWheelEvent = |
| const _CustomEventStreamProvider<WheelEvent>( |
| Element._determineMouseWheelEventType); |
| |
| static String _determineMouseWheelEventType(EventTarget e) => 'wheel'; |
| |
| /** |
| * Static factory designed to expose `transitionend` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.transitionEndEvent') |
| static const EventStreamProvider<TransitionEvent> transitionEndEvent = |
| const _CustomEventStreamProvider<TransitionEvent>( |
| Element._determineTransitionEventType); |
| |
| static String _determineTransitionEventType(EventTarget e) { |
| // Unfortunately the normal 'ontransitionend' style checks don't work here. |
| if (Device.isWebKit) { |
| return 'webkitTransitionEnd'; |
| } else if (Device.isOpera) { |
| return 'oTransitionEnd'; |
| } |
| return 'transitionend'; |
| } |
| |
| /** |
| * Inserts text into the DOM at the specified location. |
| * |
| * To see the possible values for [where], read the doc for |
| * [insertAdjacentHtml]. |
| * |
| * See also: |
| * |
| * * [insertAdjacentHtml] |
| */ |
| void insertAdjacentText(String where, String text) { |
| if (JS('bool', '!!#.insertAdjacentText', this)) { |
| _insertAdjacentText(where, text); |
| } else { |
| _insertAdjacentNode(where, new Text(text)); |
| } |
| } |
| |
| @JSName('insertAdjacentText') |
| void _insertAdjacentText(String where, String text) native ; |
| |
| /** |
| * Parses text as an HTML fragment and inserts it into the DOM at the |
| * specified location. |
| * |
| * The [where] parameter indicates where to insert the HTML fragment: |
| * |
| * * 'beforeBegin': Immediately before this element. |
| * * 'afterBegin': As the first child of this element. |
| * * 'beforeEnd': As the last child of this element. |
| * * 'afterEnd': Immediately after this element. |
| * |
| * var html = '<div class="something">content</div>'; |
| * // Inserts as the first child |
| * document.body.insertAdjacentHtml('afterBegin', html); |
| * var createdElement = document.body.children[0]; |
| * print(createdElement.classes[0]); // Prints 'something' |
| * |
| * See also: |
| * |
| * * [insertAdjacentText] |
| * * [insertAdjacentElement] |
| */ |
| void insertAdjacentHtml(String where, String html, |
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
| if (treeSanitizer is _TrustedHtmlTreeSanitizer) { |
| _insertAdjacentHtml(where, html); |
| } else { |
| _insertAdjacentNode( |
| where, |
| createFragment(html, |
| validator: validator, treeSanitizer: treeSanitizer)); |
| } |
| } |
| |
| @JSName('insertAdjacentHTML') |
| void _insertAdjacentHtml(String where, String text) native ; |
| |
| /** |
| * Inserts [element] into the DOM at the specified location. |
| * |
| * To see the possible values for [where], read the doc for |
| * [insertAdjacentHtml]. |
| * |
| * See also: |
| * |
| * * [insertAdjacentHtml] |
| */ |
| Element insertAdjacentElement(String where, Element element) { |
| if (JS('bool', '!!#.insertAdjacentElement', this)) { |
| _insertAdjacentElement(where, element); |
| } else { |
| _insertAdjacentNode(where, element); |
| } |
| return element; |
| } |
| |
| @JSName('insertAdjacentElement') |
| void _insertAdjacentElement(String where, Element element) native ; |
| |
| void _insertAdjacentNode(String where, Node node) { |
| switch (where.toLowerCase()) { |
| case 'beforebegin': |
| this.parentNode.insertBefore(node, this); |
| break; |
| case 'afterbegin': |
| var first = this.nodes.length > 0 ? this.nodes[0] : null; |
| this.insertBefore(node, first); |
| break; |
| case 'beforeend': |
| this.append(node); |
| break; |
| case 'afterend': |
| this.parentNode.insertBefore(node, this.nextNode); |
| break; |
| default: |
| throw new ArgumentError("Invalid position ${where}"); |
| } |
| } |
| |
| /** |
| * Checks if this element matches the CSS selectors. |
| */ |
| @Experimental() |
| bool matches(String selectors) { |
| if (JS('bool', '!!#.matches', this)) { |
| return JS('bool', '#.matches(#)', this, selectors); |
| } else if (JS('bool', '!!#.webkitMatchesSelector', this)) { |
| return JS('bool', '#.webkitMatchesSelector(#)', this, selectors); |
| } else if (JS('bool', '!!#.mozMatchesSelector', this)) { |
| return JS('bool', '#.mozMatchesSelector(#)', this, selectors); |
| } else if (JS('bool', '!!#.msMatchesSelector', this)) { |
| return JS('bool', '#.msMatchesSelector(#)', this, selectors); |
| } else if (JS('bool', '!!#.oMatchesSelector', this)) { |
| return JS('bool', '#.oMatchesSelector(#)', this, selectors); |
| } else { |
| throw new UnsupportedError("Not supported on this platform"); |
| } |
| } |
| |
| /** Checks if this element or any of its parents match the CSS selectors. */ |
| @Experimental() |
| bool matchesWithAncestors(String selectors) { |
| var elem = this; |
| do { |
| if (elem.matches(selectors)) return true; |
| elem = elem.parent; |
| } while (elem != null); |
| return false; |
| } |
| |
| /** |
| * Creates a new shadow root for this shadow host. |
| * |
| * ## Other resources |
| * |
| * * [Shadow DOM 101](http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/) |
| * from HTML5Rocks. |
| * * [Shadow DOM specification](http://www.w3.org/TR/shadow-dom/) from W3C. |
| */ |
| @DomName('Element.createShadowRoot') |
| @SupportedBrowser(SupportedBrowser.CHROME, '25') |
| @Experimental() |
| ShadowRoot createShadowRoot() { |
| return JS( |
| 'ShadowRoot', |
| '(#.createShadowRoot || #.webkitCreateShadowRoot).call(#)', |
| this, |
| this, |
| this); |
| } |
| |
| /** |
| * The shadow root of this shadow host. |
| * |
| * ## Other resources |
| * |
| * * [Shadow DOM 101](http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/) |
| * from HTML5Rocks. |
| * * [Shadow DOM specification](http://www.w3.org/TR/shadow-dom/) |
| * from W3C. |
| */ |
| @DomName('Element.shadowRoot') |
| @SupportedBrowser(SupportedBrowser.CHROME, '25') |
| @Experimental() |
| ShadowRoot get shadowRoot => |
| JS('ShadowRoot|Null', '#.shadowRoot || #.webkitShadowRoot', this, this); |
| |
| /** |
| * Access this element's content position. |
| * |
| * This returns a rectangle with the dimenions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. |
| * |
| * _Important_ _note_: use of this method _will_ perform CSS calculations that |
| * can trigger a browser reflow. Therefore, use of this property _during_ an |
| * animation frame is discouraged. See also: |
| * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
| */ |
| @Experimental() |
| CssRect get contentEdge => new _ContentCssRect(this); |
| |
| /** |
| * Access the dimensions and position of this element's content + padding box. |
| * |
| * This returns a rectangle with the dimenions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. This |
| * can be used to retrieve jQuery's |
| * [innerHeight](http://api.jquery.com/innerHeight/) value for an element. |
| * This is also a rectangle equalling the dimensions of clientHeight and |
| * clientWidth. |
| * |
| * _Important_ _note_: use of this method _will_ perform CSS calculations that |
| * can trigger a browser reflow. Therefore, use of this property _during_ an |
| * animation frame is discouraged. See also: |
| * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
| */ |
| @Experimental() |
| CssRect get paddingEdge => new _PaddingCssRect(this); |
| |
| /** |
| * Access the dimensions and position of this element's content + padding + |
| * border box. |
| * |
| * This returns a rectangle with the dimenions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. This |
| * can be used to retrieve jQuery's |
| * [outerHeight](http://api.jquery.com/outerHeight/) value for an element. |
| * |
| * _Important_ _note_: use of this method _will_ perform CSS calculations that |
| * can trigger a browser reflow. Therefore, use of this property _during_ an |
| * animation frame is discouraged. See also: |
| * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
| */ |
| @Experimental() |
| CssRect get borderEdge => new _BorderCssRect(this); |
| |
| /** |
| * Access the dimensions and position of this element's content + padding + |
| * border + margin box. |
| * |
| * This returns a rectangle with the dimenions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. This |
| * can be used to retrieve jQuery's |
| * [outerHeight](http://api.jquery.com/outerHeight/) value for an element. |
| * |
| * _Important_ _note_: use of this method will perform CSS calculations that |
| * can trigger a browser reflow. Therefore, use of this property _during_ an |
| * animation frame is discouraged. See also: |
| * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
| */ |
| @Experimental() |
| CssRect get marginEdge => new _MarginCssRect(this); |
| |
| /** |
| * Provides the coordinates of the element relative to the top of the |
| * document. |
| * |
| * This method is the Dart equivalent to jQuery's |
| * [offset](http://api.jquery.com/offset/) method. |
| */ |
| @Experimental() |
| Point get documentOffset => offsetTo(document.documentElement); |
| |
| /** |
| * Provides the offset of this element's [borderEdge] relative to the |
| * specified [parent]. |
| * |
| * This is the Dart equivalent of jQuery's |
| * [position](http://api.jquery.com/position/) method. Unlike jQuery's |
| * position, however, [parent] can be any parent element of `this`, |
| * rather than only `this`'s immediate [offsetParent]. If the specified |
| * element is _not_ an offset parent or transitive offset parent to this |
| * element, an [ArgumentError] is thrown. |
| */ |
| @Experimental() |
| Point offsetTo(Element parent) { |
| return Element._offsetToHelper(this, parent); |
| } |
| |
| static Point _offsetToHelper(Element current, Element parent) { |
| // We're hopping from _offsetParent_ to offsetParent (not just parent), so |
| // offsetParent, "tops out" at BODY. But people could conceivably pass in |
| // the document.documentElement and I want it to return an absolute offset, |
| // so we have the special case checking for HTML. |
| bool sameAsParent = identical(current, parent); |
| bool foundAsParent = sameAsParent || parent.tagName == 'HTML'; |
| if (current == null || sameAsParent) { |
| if (foundAsParent) return new Point/*<num>*/(0, 0); |
| throw new ArgumentError("Specified element is not a transitive offset " |
| "parent of this element."); |
| } |
| Element parentOffset = current.offsetParent; |
| Point p = Element._offsetToHelper(parentOffset, parent); |
| return new Point/*<num>*/( |
| p.x + current.offsetLeft, p.y + current.offsetTop); |
| } |
| |
| static HtmlDocument _parseDocument; |
| static Range _parseRange; |
| static NodeValidatorBuilder _defaultValidator; |
| static _ValidatingTreeSanitizer _defaultSanitizer; |
| |
| /** |
| * Create a DocumentFragment from the HTML fragment and ensure that it follows |
| * the sanitization rules specified by the validator or treeSanitizer. |
| * |
| * If the default validation behavior is too restrictive then a new |
| * NodeValidator should be created, either extending or wrapping a default |
| * validator and overriding the validation APIs. |
| * |
| * The treeSanitizer is used to walk the generated node tree and sanitize it. |
| * A custom treeSanitizer can also be provided to perform special validation |
| * rules but since the API is more complex to implement this is discouraged. |
| * |
| * The returned tree is guaranteed to only contain nodes and attributes which |
| * are allowed by the provided validator. |
| * |
| * See also: |
| * |
| * * [NodeValidator] |
| * * [NodeTreeSanitizer] |
| */ |
| DocumentFragment createFragment(String html, |
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
| if (treeSanitizer == null) { |
| if (validator == null) { |
| if (_defaultValidator == null) { |
| _defaultValidator = new NodeValidatorBuilder.common(); |
| } |
| validator = _defaultValidator; |
| } |
| if (_defaultSanitizer == null) { |
| _defaultSanitizer = new _ValidatingTreeSanitizer(validator); |
| } else { |
| _defaultSanitizer.validator = validator; |
| } |
| treeSanitizer = _defaultSanitizer; |
| } else if (validator != null) { |
| throw new ArgumentError( |
| 'validator can only be passed if treeSanitizer is null'); |
| } |
| |
| if (_parseDocument == null) { |
| _parseDocument = document.implementation.createHtmlDocument(''); |
| _parseRange = _parseDocument.createRange(); |
| |
| // Workaround for Safari bug. Was also previously Chrome bug 229142 |
| // - URIs are not resolved in new doc. |
| BaseElement base = _parseDocument.createElement('base'); |
| base.href = document.baseUri; |
| _parseDocument.head.append(base); |
| } |
| var contextElement; |
| if (this is BodyElement) { |
| contextElement = _parseDocument.body; |
| } else { |
| contextElement = _parseDocument.createElement(tagName); |
| _parseDocument.body.append(contextElement); |
| } |
| var fragment; |
| if (Range.supportsCreateContextualFragment && |
| _canBeUsedToCreateContextualFragment) { |
| _parseRange.selectNodeContents(contextElement); |
| fragment = _parseRange.createContextualFragment(html); |
| } else { |
| contextElement._innerHtml = html; |
| |
| fragment = _parseDocument.createDocumentFragment(); |
| while (contextElement.firstChild != null) { |
| fragment.append(contextElement.firstChild); |
| } |
| } |
| if (contextElement != _parseDocument.body) { |
| contextElement.remove(); |
| } |
| |
| treeSanitizer.sanitizeTree(fragment); |
| // Copy the fragment over to the main document (fix for 14184) |
| document.adoptNode(fragment); |
| |
| return fragment; |
| } |
| |
| /** Test if createContextualFragment is supported for this element type */ |
| bool get _canBeUsedToCreateContextualFragment => |
| !_cannotBeUsedToCreateContextualFragment; |
| |
| /** Test if createContextualFragment is NOT supported for this element type */ |
| bool get _cannotBeUsedToCreateContextualFragment => |
| _tagsForWhichCreateContextualFragmentIsNotSupported.contains(tagName); |
| |
| /** |
| * A hard-coded list of the tag names for which createContextualFragment |
| * isn't supported. |
| */ |
| static const _tagsForWhichCreateContextualFragmentIsNotSupported = const [ |
| 'HEAD', |
| 'AREA', |
| 'BASE', |
| 'BASEFONT', |
| 'BR', |
| 'COL', |
| 'COLGROUP', |
| 'EMBED', |
| 'FRAME', |
| 'FRAMESET', |
| 'HR', |
| 'IMAGE', |
| 'IMG', |
| 'INPUT', |
| 'ISINDEX', |
| 'LINK', |
| 'META', |
| 'PARAM', |
| 'SOURCE', |
| 'STYLE', |
| 'TITLE', |
| 'WBR' |
| ]; |
| |
| /** |
| * Parses the HTML fragment and sets it as the contents of this element. |
| * |
| * This uses the default sanitization behavior to sanitize the HTML fragment, |
| * use [setInnerHtml] to override the default behavior. |
| */ |
| set innerHtml(String html) { |
| this.setInnerHtml(html); |
| } |
| |
| /** |
| * Parses the HTML fragment and sets it as the contents of this element. |
| * This ensures that the generated content follows the sanitization rules |
| * specified by the validator or treeSanitizer. |
| * |
| * If the default validation behavior is too restrictive then a new |
| * NodeValidator should be created, either extending or wrapping a default |
| * validator and overriding the validation APIs. |
| * |
| * The treeSanitizer is used to walk the generated node tree and sanitize it. |
| * A custom treeSanitizer can also be provided to perform special validation |
| * rules but since the API is more complex to implement this is discouraged. |
| * |
| * The resulting tree is guaranteed to only contain nodes and attributes which |
| * are allowed by the provided validator. |
| * |
| * See also: |
| * |
| * * [NodeValidator] |
| * * [NodeTreeSanitizer] |
| */ |
| void setInnerHtml(String html, |
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
| text = null; |
| if (treeSanitizer is _TrustedHtmlTreeSanitizer) { |
| _innerHtml = html; |
| } else { |
| append(createFragment(html, |
| validator: validator, treeSanitizer: treeSanitizer)); |
| } |
| } |
| |
| String get innerHtml => _innerHtml; |
| |
| /** |
| * This is an ease-of-use accessor for event streams which should only be |
| * used when an explicit accessor is not available. |
| */ |
| ElementEvents get on => new ElementEvents(this); |
| |
| /** |
| * Verify if any of the attributes that we use in the sanitizer look unexpected, |
| * possibly indicating DOM clobbering attacks. |
| * |
| * Those attributes are: attributes, lastChild, children, previousNode and tagName. |
| */ |
| static bool _hasCorruptedAttributes(Element element) { |
| return JS( |
| 'bool', |
| r''' |
| (function(element) { |
| if (!(element.attributes instanceof NamedNodeMap)) { |
| return true; |
| } |
| var childNodes = element.childNodes; |
| if (element.lastChild && |
| element.lastChild !== childNodes[childNodes.length -1]) { |
| return true; |
| } |
| if (element.children) { // On Safari, children can apparently be null. |
| if (!((element.children instanceof HTMLCollection) || |
| (element.children instanceof NodeList))) { |
| return true; |
| } |
| } |
| var length = 0; |
| if (element.children) { |
| length = element.children.length; |
| } |
| for (var i = 0; i < length; i++) { |
| var child = element.children[i]; |
| // On IE it seems like we sometimes don't see the clobbered attribute, |
| // perhaps as a result of an over-optimization. Also use another route |
| // to check of attributes, children, or lastChild are clobbered. It may |
| // seem silly to check children as we rely on children to do this iteration, |
| // but it seems possible that the access to children might see the real thing, |
| // allowing us to check for clobbering that may show up in other accesses. |
| if (child["id"] == 'attributes' || child["name"] == 'attributes' || |
| child["id"] == 'lastChild' || child["name"] == 'lastChild' || |
| child["id"] == 'children' || child["name"] == 'children') { |
| return true; |
| } |
| } |
| return false; |
| })(#)''', |
| element); |
| } |
| |
| /// A secondary check for corruption, needed on IE |
| static bool _hasCorruptedAttributesAdditionalCheck(Element element) { |
| return JS('bool', r'!(#.attributes instanceof NamedNodeMap)', element); |
| } |
| |
| static String _safeTagName(element) { |
| String result = 'element tag unavailable'; |
| try { |
| if (element.tagName is String) { |
| result = element.tagName; |
| } |
| } catch (e) {} |
| return result; |
| } |
| |
| @DomName('Element.offsetParent') |
| @DocsEditable() |
| final Element offsetParent; |
| |
| @DomName('Element.offsetHeight') |
| @DocsEditable() |
| int get offsetHeight => JS('num', '#.offsetHeight', this).round(); |
| |
| @DomName('Element.offsetLeft') |
| @DocsEditable() |
| int get offsetLeft => JS('num', '#.offsetLeft', this).round(); |
| |
| @DomName('Element.offsetTop') |
| @DocsEditable() |
| int get offsetTop => JS('num', '#.offsetTop', this).round(); |
| |
| @DomName('Element.offsetWidth') |
| @DocsEditable() |
| int get offsetWidth => JS('num', '#.offsetWidth', this).round(); |
| |
| @DomName('Element.scrollHeight') |
| @DocsEditable() |
| int get scrollHeight => JS('num', '#.scrollHeight', this).round(); |
| |
| @DomName('Element.scrollLeft') |
| @DocsEditable() |
| int get scrollLeft => JS('num', '#.scrollLeft', this).round(); |
| |
| @DomName('Element.scrollLeft') |
| @DocsEditable() |
| set scrollLeft(int value) { |
| JS("void", "#.scrollLeft = #", this, value.round()); |
| } |
| |
| @DomName('Element.scrollTop') |
| @DocsEditable() |
| int get scrollTop => JS('num', '#.scrollTop', this).round(); |
| |
| @DomName('Element.scrollTop') |
| @DocsEditable() |
| set scrollTop(int value) { |
| JS("void", "#.scrollTop = #", this, value.round()); |
| } |
| |
| @DomName('Element.scrollWidth') |
| @DocsEditable() |
| int get scrollWidth => JS('num', '#.scrollWidth', this).round(); |
| |
| // To suppress missing implicit constructor warnings. |
| factory Element._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| /** |
| * Static factory designed to expose `abort` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.abortEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> abortEvent = |
| const EventStreamProvider<Event>('abort'); |
| |
| /** |
| * Static factory designed to expose `beforecopy` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.beforecopyEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> beforeCopyEvent = |
| const EventStreamProvider<Event>('beforecopy'); |
| |
| /** |
| * Static factory designed to expose `beforecut` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.beforecutEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> beforeCutEvent = |
| const EventStreamProvider<Event>('beforecut'); |
| |
| /** |
| * Static factory designed to expose `beforepaste` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.beforepasteEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> beforePasteEvent = |
| const EventStreamProvider<Event>('beforepaste'); |
| |
| /** |
| * Static factory designed to expose `blur` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.blurEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> blurEvent = |
| const EventStreamProvider<Event>('blur'); |
| |
| @DomName('Element.canplayEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> canPlayEvent = |
| const EventStreamProvider<Event>('canplay'); |
| |
| @DomName('Element.canplaythroughEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> canPlayThroughEvent = |
| const EventStreamProvider<Event>('canplaythrough'); |
| |
| /** |
| * Static factory designed to expose `change` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.changeEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> changeEvent = |
| const EventStreamProvider<Event>('change'); |
| |
| /** |
| * Static factory designed to expose `click` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.clickEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> clickEvent = |
| const EventStreamProvider<MouseEvent>('click'); |
| |
| /** |
| * Static factory designed to expose `contextmenu` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.contextmenuEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> contextMenuEvent = |
| const EventStreamProvider<MouseEvent>('contextmenu'); |
| |
| /** |
| * Static factory designed to expose `copy` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.copyEvent') |
| @DocsEditable() |
| static const EventStreamProvider<ClipboardEvent> copyEvent = |
| const EventStreamProvider<ClipboardEvent>('copy'); |
| |
| /** |
| * Static factory designed to expose `cut` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.cutEvent') |
| @DocsEditable() |
| static const EventStreamProvider<ClipboardEvent> cutEvent = |
| const EventStreamProvider<ClipboardEvent>('cut'); |
| |
| /** |
| * Static factory designed to expose `doubleclick` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.dblclickEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> doubleClickEvent = |
| const EventStreamProvider<Event>('dblclick'); |
| |
| /** |
| * A stream of `drag` events fired when an element is currently being dragged. |
| * |
| * A `drag` event is added to this stream as soon as the drag begins. |
| * A `drag` event is also added to this stream at intervals while the drag |
| * operation is still ongoing. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.dragEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> dragEvent = |
| const EventStreamProvider<MouseEvent>('drag'); |
| |
| /** |
| * A stream of `dragend` events fired when an element completes a drag |
| * operation. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.dragendEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> dragEndEvent = |
| const EventStreamProvider<MouseEvent>('dragend'); |
| |
| /** |
| * A stream of `dragenter` events fired when a dragged object is first dragged |
| * over an element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.dragenterEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> dragEnterEvent = |
| const EventStreamProvider<MouseEvent>('dragenter'); |
| |
| /** |
| * A stream of `dragleave` events fired when an object being dragged over an |
| * element leaves the element's target area. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.dragleaveEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> dragLeaveEvent = |
| const EventStreamProvider<MouseEvent>('dragleave'); |
| |
| /** |
| * A stream of `dragover` events fired when a dragged object is currently |
| * being dragged over an element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.dragoverEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> dragOverEvent = |
| const EventStreamProvider<MouseEvent>('dragover'); |
| |
| /** |
| * A stream of `dragstart` events for a dragged element whose drag has begun. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.dragstartEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> dragStartEvent = |
| const EventStreamProvider<MouseEvent>('dragstart'); |
| |
| /** |
| * A stream of `drop` events fired when a dragged object is dropped on an |
| * element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.dropEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> dropEvent = |
| const EventStreamProvider<MouseEvent>('drop'); |
| |
| @DomName('Element.durationchangeEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> durationChangeEvent = |
| const EventStreamProvider<Event>('durationchange'); |
| |
| @DomName('Element.emptiedEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> emptiedEvent = |
| const EventStreamProvider<Event>('emptied'); |
| |
| @DomName('Element.endedEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> endedEvent = |
| const EventStreamProvider<Event>('ended'); |
| |
| /** |
| * Static factory designed to expose `error` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.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 [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.focusEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> focusEvent = |
| const EventStreamProvider<Event>('focus'); |
| |
| /** |
| * Static factory designed to expose `input` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.inputEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> inputEvent = |
| const EventStreamProvider<Event>('input'); |
| |
| /** |
| * Static factory designed to expose `invalid` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.invalidEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> invalidEvent = |
| const EventStreamProvider<Event>('invalid'); |
| |
| /** |
| * Static factory designed to expose `keydown` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.keydownEvent') |
| @DocsEditable() |
| static const EventStreamProvider<KeyboardEvent> keyDownEvent = |
| const EventStreamProvider<KeyboardEvent>('keydown'); |
| |
| /** |
| * Static factory designed to expose `keypress` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.keypressEvent') |
| @DocsEditable() |
| static const EventStreamProvider<KeyboardEvent> keyPressEvent = |
| const EventStreamProvider<KeyboardEvent>('keypress'); |
| |
| /** |
| * Static factory designed to expose `keyup` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.keyupEvent') |
| @DocsEditable() |
| static const EventStreamProvider<KeyboardEvent> keyUpEvent = |
| const EventStreamProvider<KeyboardEvent>('keyup'); |
| |
| /** |
| * Static factory designed to expose `load` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.loadEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> loadEvent = |
| const EventStreamProvider<Event>('load'); |
| |
| @DomName('Element.loadeddataEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> loadedDataEvent = |
| const EventStreamProvider<Event>('loadeddata'); |
| |
| @DomName('Element.loadedmetadataEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> loadedMetadataEvent = |
| const EventStreamProvider<Event>('loadedmetadata'); |
| |
| /** |
| * Static factory designed to expose `mousedown` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.mousedownEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> mouseDownEvent = |
| const EventStreamProvider<MouseEvent>('mousedown'); |
| |
| /** |
| * Static factory designed to expose `mouseenter` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.mouseenterEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<MouseEvent> mouseEnterEvent = |
| const EventStreamProvider<MouseEvent>('mouseenter'); |
| |
| /** |
| * Static factory designed to expose `mouseleave` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.mouseleaveEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<MouseEvent> mouseLeaveEvent = |
| const EventStreamProvider<MouseEvent>('mouseleave'); |
| |
| /** |
| * Static factory designed to expose `mousemove` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.mousemoveEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> mouseMoveEvent = |
| const EventStreamProvider<MouseEvent>('mousemove'); |
| |
| /** |
| * Static factory designed to expose `mouseout` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.mouseoutEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> mouseOutEvent = |
| const EventStreamProvider<MouseEvent>('mouseout'); |
| |
| /** |
| * Static factory designed to expose `mouseover` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.mouseoverEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> mouseOverEvent = |
| const EventStreamProvider<MouseEvent>('mouseover'); |
| |
| /** |
| * Static factory designed to expose `mouseup` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.mouseupEvent') |
| @DocsEditable() |
| static const EventStreamProvider<MouseEvent> mouseUpEvent = |
| const EventStreamProvider<MouseEvent>('mouseup'); |
| |
| /** |
| * Static factory designed to expose `paste` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.pasteEvent') |
| @DocsEditable() |
| static const EventStreamProvider<ClipboardEvent> pasteEvent = |
| const EventStreamProvider<ClipboardEvent>('paste'); |
| |
| @DomName('Element.pauseEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> pauseEvent = |
| const EventStreamProvider<Event>('pause'); |
| |
| @DomName('Element.playEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> playEvent = |
| const EventStreamProvider<Event>('play'); |
| |
| @DomName('Element.playingEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> playingEvent = |
| const EventStreamProvider<Event>('playing'); |
| |
| @DomName('Element.ratechangeEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> rateChangeEvent = |
| const EventStreamProvider<Event>('ratechange'); |
| |
| /** |
| * Static factory designed to expose `reset` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.resetEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> resetEvent = |
| const EventStreamProvider<Event>('reset'); |
| |
| @DomName('Element.resizeEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> resizeEvent = |
| const EventStreamProvider<Event>('resize'); |
| |
| /** |
| * Static factory designed to expose `scroll` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.scrollEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> scrollEvent = |
| const EventStreamProvider<Event>('scroll'); |
| |
| /** |
| * Static factory designed to expose `search` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.searchEvent') |
| @DocsEditable() |
| // http://www.w3.org/TR/html-markup/input.search.html |
| @Experimental() |
| static const EventStreamProvider<Event> searchEvent = |
| const EventStreamProvider<Event>('search'); |
| |
| @DomName('Element.seekedEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> seekedEvent = |
| const EventStreamProvider<Event>('seeked'); |
| |
| @DomName('Element.seekingEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> seekingEvent = |
| const EventStreamProvider<Event>('seeking'); |
| |
| /** |
| * Static factory designed to expose `select` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.selectEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> selectEvent = |
| const EventStreamProvider<Event>('select'); |
| |
| /** |
| * Static factory designed to expose `selectstart` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.selectstartEvent') |
| @DocsEditable() |
| @Experimental() // nonstandard |
| static const EventStreamProvider<Event> selectStartEvent = |
| const EventStreamProvider<Event>('selectstart'); |
| |
| @DomName('Element.stalledEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> stalledEvent = |
| const EventStreamProvider<Event>('stalled'); |
| |
| /** |
| * Static factory designed to expose `submit` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.submitEvent') |
| @DocsEditable() |
| static const EventStreamProvider<Event> submitEvent = |
| const EventStreamProvider<Event>('submit'); |
| |
| @DomName('Element.suspendEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> suspendEvent = |
| const EventStreamProvider<Event>('suspend'); |
| |
| @DomName('Element.timeupdateEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> timeUpdateEvent = |
| const EventStreamProvider<Event>('timeupdate'); |
| |
| /** |
| * Static factory designed to expose `touchcancel` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.touchcancelEvent') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| static const EventStreamProvider<TouchEvent> touchCancelEvent = |
| const EventStreamProvider<TouchEvent>('touchcancel'); |
| |
| /** |
| * Static factory designed to expose `touchend` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.touchendEvent') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| static const EventStreamProvider<TouchEvent> touchEndEvent = |
| const EventStreamProvider<TouchEvent>('touchend'); |
| |
| /** |
| * Static factory designed to expose `touchenter` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.touchenterEvent') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| static const EventStreamProvider<TouchEvent> touchEnterEvent = |
| const EventStreamProvider<TouchEvent>('touchenter'); |
| |
| /** |
| * Static factory designed to expose `touchleave` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.touchleaveEvent') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| static const EventStreamProvider<TouchEvent> touchLeaveEvent = |
| const EventStreamProvider<TouchEvent>('touchleave'); |
| |
| /** |
| * Static factory designed to expose `touchmove` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.touchmoveEvent') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| static const EventStreamProvider<TouchEvent> touchMoveEvent = |
| const EventStreamProvider<TouchEvent>('touchmove'); |
| |
| /** |
| * Static factory designed to expose `touchstart` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.touchstartEvent') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| static const EventStreamProvider<TouchEvent> touchStartEvent = |
| const EventStreamProvider<TouchEvent>('touchstart'); |
| |
| @DomName('Element.volumechangeEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> volumeChangeEvent = |
| const EventStreamProvider<Event>('volumechange'); |
| |
| @DomName('Element.waitingEvent') |
| @DocsEditable() |
| @Experimental() // untriaged |
| static const EventStreamProvider<Event> waitingEvent = |
| const EventStreamProvider<Event>('waiting'); |
| |
| /** |
| * Static factory designed to expose `fullscreenchange` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.webkitfullscreenchangeEvent') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| static const EventStreamProvider<Event> fullscreenChangeEvent = |
| const EventStreamProvider<Event>('webkitfullscreenchange'); |
| |
| /** |
| * Static factory designed to expose `fullscreenerror` events to event |
| * handlers that are not necessarily instances of [Element]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| @DomName('Element.webkitfullscreenerrorEvent') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| static const EventStreamProvider<Event> fullscreenErrorEvent = |
| const EventStreamProvider<Event>('webkitfullscreenerror'); |
| |
| @DomName('Element.contentEditable') |
| @DocsEditable() |
| String contentEditable; |
| |
| @DomName('Element.contextMenu') |
| @DocsEditable() |
| @Experimental() // untriaged |
| MenuElement contextMenu; |
| |
| @DomName('Element.dir') |
| @DocsEditable() |
| String dir; |
| |
| /** |
| * Indicates whether the element can be dragged and dropped. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.draggable') |
| @DocsEditable() |
| bool draggable; |
| |
| /** |
| * Indicates whether the element is not relevant to the page's current state. |
| * |
| * ## Other resources |
| * |
| * * [Hidden attribute |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#the-hidden-attribute) |
| * from WHATWG. |
| */ |
| @DomName('Element.hidden') |
| @DocsEditable() |
| bool hidden; |
| |
| // Using property as subclass shadows. |
| bool get isContentEditable => JS("bool", "#.isContentEditable", this); |
| |
| @DomName('Element.lang') |
| @DocsEditable() |
| String lang; |
| |
| @DomName('Element.spellcheck') |
| @DocsEditable() |
| // http://blog.whatwg.org/the-road-to-html-5-spellchecking |
| @Experimental() // nonstandard |
| bool spellcheck; |
| |
| @DomName('Element.style') |
| @DocsEditable() |
| final CssStyleDeclaration style; |
| |
| @DomName('Element.tabIndex') |
| @DocsEditable() |
| int tabIndex; |
| |
| @DomName('Element.title') |
| @DocsEditable() |
| String title; |
| |
| /** |
| * Specifies whether this element's text content changes when the page is |
| * localized. |
| * |
| * ## Other resources |
| * |
| * * [The translate |
| * attribute](https://html.spec.whatwg.org/multipage/dom.html#the-translate-attribute) |
| * from WHATWG. |
| */ |
| @DomName('Element.translate') |
| @DocsEditable() |
| // http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-translate-attribute |
| @Experimental() |
| bool translate; |
| |
| @JSName('webkitdropzone') |
| /** |
| * A set of space-separated keywords that specify what kind of data this |
| * Element accepts on drop and what to do with that data. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.webkitdropzone') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute |
| String dropzone; |
| |
| @DomName('Element.blur') |
| @DocsEditable() |
| void blur() native ; |
| |
| @DomName('Element.click') |
| @DocsEditable() |
| void click() native ; |
| |
| @DomName('Element.focus') |
| @DocsEditable() |
| void focus() native ; |
| |
| @JSName('attributes') |
| @DomName('Element.attributes') |
| @DocsEditable() |
| final _NamedNodeMap _attributes; |
| |
| @DomName('Element.className') |
| @DocsEditable() |
| String className; |
| |
| @DomName('Element.clientHeight') |
| @DocsEditable() |
| final int clientHeight; |
| |
| @DomName('Element.clientLeft') |
| @DocsEditable() |
| final int clientLeft; |
| |
| @DomName('Element.clientTop') |
| @DocsEditable() |
| final int clientTop; |
| |
| @DomName('Element.clientWidth') |
| @DocsEditable() |
| final int clientWidth; |
| |
| @DomName('Element.computedName') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String computedName; |
| |
| @DomName('Element.computedRole') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final String computedRole; |
| |
| @DomName('Element.id') |
| @DocsEditable() |
| String id; |
| |
| @JSName('innerHTML') |
| @DomName('Element.innerHTML') |
| @DocsEditable() |
| String _innerHtml; |
| |
| // Use implementation from Node. |
| // final String _localName; |
| |
| // Use implementation from Node. |
| // final String _namespaceUri; |
| |
| // Using property as subclass shadows. |
| String get outerHtml => JS("String", "#.outerHTML", this); |
| |
| @JSName('scrollHeight') |
| @DomName('Element.scrollHeight') |
| @DocsEditable() |
| final int _scrollHeight; |
| |
| @JSName('scrollLeft') |
| @DomName('Element.scrollLeft') |
| @DocsEditable() |
| num _scrollLeft; |
| |
| @JSName('scrollTop') |
| @DomName('Element.scrollTop') |
| @DocsEditable() |
| num _scrollTop; |
| |
| @JSName('scrollWidth') |
| @DomName('Element.scrollWidth') |
| @DocsEditable() |
| final int _scrollWidth; |
| |
| @DomName('Element.tagName') |
| @DocsEditable() |
| final String tagName; |
| |
| @DomName('Element.closest') |
| @DocsEditable() |
| @Experimental() // untriaged |
| Element closest(String selectors) native ; |
| |
| @DomName('Element.getAnimations') |
| @DocsEditable() |
| @Experimental() // untriaged |
| List<Animation> getAnimations() native ; |
| |
| @DomName('Element.getAttribute') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String getAttribute(String name) native ; |
| |
| @DomName('Element.getAttributeNS') |
| @DocsEditable() |
| @Experimental() // untriaged |
| String getAttributeNS(String namespaceURI, String localName) native ; |
| |
| /** |
| * Returns the smallest bounding rectangle that encompasses this element's |
| * padding, scrollbar, and border. |
| * |
| * ## Other resources |
| * |
| * * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element.getBoundingClientRect) |
| * from MDN. |
| * * [The getBoundingClientRect() |
| * method](http://www.w3.org/TR/cssom-view/#the-getclientrects()-and-getboundingclientrect()-methods) |
| * from W3C. |
| */ |
| @DomName('Element.getBoundingClientRect') |
| @DocsEditable() |
| Rectangle getBoundingClientRect() native ; |
| |
| /** |
| * Returns a list of bounding rectangles for each box associated with this |
| * element. |
| * |
| * ## Other resources |
| * |
| * * [Element.getClientRects](https://developer.mozilla.org/en-US/docs/Web/API/Element.getClientRects) |
| * from MDN. |
| * * [The getClientRects() |
| * method](http://www.w3.org/TR/cssom-view/#the-getclientrects()-and-getboundingclientrect()-methods) |
| * from W3C. |
| */ |
| @DomName('Element.getClientRects') |
| @DocsEditable() |
| @Returns('_ClientRectList') |
| @Creates('_ClientRectList') |
| List<Rectangle> getClientRects() native ; |
| |
| /** |
| * Returns a list of shadow DOM insertion points to which this element is |
| * distributed. |
| * |
| * ## Other resources |
| * |
| * * [Shadow DOM |
| * specification](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html) |
| * from W3C. |
| */ |
| @DomName('Element.getDestinationInsertionPoints') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Returns('NodeList') |
| @Creates('NodeList') |
| List<Node> getDestinationInsertionPoints() native ; |
| |
| /** |
| * Returns a list of nodes with the given class name inside this element. |
| * |
| * ## Other resources |
| * |
| * * [getElementsByClassName](https://developer.mozilla.org/en-US/docs/Web/API/document.getElementsByClassName) |
| * from MDN. |
| * * [DOM specification](http://www.w3.org/TR/domcore/) from W3C. |
| */ |
| @DomName('Element.getElementsByClassName') |
| @DocsEditable() |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> getElementsByClassName(String classNames) native ; |
| |
| @JSName('getElementsByTagName') |
| @DomName('Element.getElementsByTagName') |
| @DocsEditable() |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> _getElementsByTagName(String localName) native ; |
| |
| @JSName('hasAttribute') |
| @DomName('Element.hasAttribute') |
| @DocsEditable() |
| bool _hasAttribute(String name) native ; |
| |
| @JSName('hasAttributeNS') |
| @DomName('Element.hasAttributeNS') |
| @DocsEditable() |
| bool _hasAttributeNS(String namespaceURI, String localName) native ; |
| |
| @JSName('removeAttribute') |
| @DomName('Element.removeAttribute') |
| @DocsEditable() |
| void _removeAttribute(String name) native ; |
| |
| @JSName('removeAttributeNS') |
| @DomName('Element.removeAttributeNS') |
| @DocsEditable() |
| void _removeAttributeNS(String namespaceURI, String localName) native ; |
| |
| @DomName('Element.requestFullscreen') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void requestFullscreen() native ; |
| |
| @DomName('Element.requestPointerLock') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void requestPointerLock() native ; |
| |
| @DomName('Element.scroll') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void scroll([options_OR_x, num y]) { |
| if (options_OR_x == null && y == null) { |
| _scroll_1(); |
| return; |
| } |
| if ((options_OR_x is Map) && y == null) { |
| var options_1 = convertDartToNative_Dictionary(options_OR_x); |
| _scroll_2(options_1); |
| return; |
| } |
| if (y != null && (options_OR_x is num)) { |
| _scroll_3(options_OR_x, y); |
| return; |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| |
| @JSName('scroll') |
| @DomName('Element.scroll') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scroll_1() native ; |
| @JSName('scroll') |
| @DomName('Element.scroll') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scroll_2(options) native ; |
| @JSName('scroll') |
| @DomName('Element.scroll') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scroll_3(num x, y) native ; |
| |
| @DomName('Element.scrollBy') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void scrollBy([options_OR_x, num y]) { |
| if (options_OR_x == null && y == null) { |
| _scrollBy_1(); |
| return; |
| } |
| if ((options_OR_x is Map) && y == null) { |
| var options_1 = convertDartToNative_Dictionary(options_OR_x); |
| _scrollBy_2(options_1); |
| return; |
| } |
| if (y != null && (options_OR_x is num)) { |
| _scrollBy_3(options_OR_x, y); |
| return; |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| |
| @JSName('scrollBy') |
| @DomName('Element.scrollBy') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scrollBy_1() native ; |
| @JSName('scrollBy') |
| @DomName('Element.scrollBy') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scrollBy_2(options) native ; |
| @JSName('scrollBy') |
| @DomName('Element.scrollBy') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scrollBy_3(num x, y) native ; |
| |
| @JSName('scrollIntoView') |
| @DomName('Element.scrollIntoView') |
| @DocsEditable() |
| void _scrollIntoView([bool alignWithTop]) native ; |
| |
| @JSName('scrollIntoViewIfNeeded') |
| @DomName('Element.scrollIntoViewIfNeeded') |
| @DocsEditable() |
| // http://docs.webplatform.org/wiki/dom/methods/scrollIntoViewIfNeeded |
| @Experimental() // non-standard |
| void _scrollIntoViewIfNeeded([bool centerIfNeeded]) native ; |
| |
| @DomName('Element.scrollTo') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void scrollTo([options_OR_x, num y]) { |
| if (options_OR_x == null && y == null) { |
| _scrollTo_1(); |
| return; |
| } |
| if ((options_OR_x is Map) && y == null) { |
| var options_1 = convertDartToNative_Dictionary(options_OR_x); |
| _scrollTo_2(options_1); |
| return; |
| } |
| if (y != null && (options_OR_x is num)) { |
| _scrollTo_3(options_OR_x, y); |
| return; |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| |
| @JSName('scrollTo') |
| @DomName('Element.scrollTo') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scrollTo_1() native ; |
| @JSName('scrollTo') |
| @DomName('Element.scrollTo') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scrollTo_2(options) native ; |
| @JSName('scrollTo') |
| @DomName('Element.scrollTo') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void _scrollTo_3(num x, y) native ; |
| |
| @DomName('Element.setAttribute') |
| @DocsEditable() |
| void setAttribute(String name, String value) native ; |
| |
| @DomName('Element.setAttributeNS') |
| @DocsEditable() |
| void setAttributeNS(String namespaceURI, String name, String value) native ; |
| |
| // From ChildNode |
| |
| @DomName('Element.after') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void after(Object nodes) native ; |
| |
| @DomName('Element.before') |
| @DocsEditable() |
| @Experimental() // untriaged |
| void before(Object nodes) native ; |
| |
| // From NonDocumentTypeChildNode |
| |
| @DomName('Element.nextElementSibling') |
| @DocsEditable() |
| final Element nextElementSibling; |
| |
| @DomName('Element.previousElementSibling') |
| @DocsEditable() |
| final Element previousElementSibling; |
| |
| // From ParentNode |
| |
| @JSName('childElementCount') |
| @DomName('Element.childElementCount') |
| @DocsEditable() |
| final int _childElementCount; |
| |
| @JSName('children') |
| @DomName('Element.children') |
| @DocsEditable() |
| @Returns('HtmlCollection') |
| @Creates('HtmlCollection') |
| final List<Node> _children; |
| |
| @JSName('firstElementChild') |
| @DomName('Element.firstElementChild') |
| @DocsEditable() |
| final Element _firstElementChild; |
| |
| @JSName('lastElementChild') |
| @DomName('Element.lastElementChild') |
| @DocsEditable() |
| final Element _lastElementChild; |
| |
| /** |
| * Finds the first descendant element of this element that matches the |
| * specified group of selectors. |
| * |
| * [selectors] should be a string using CSS selector syntax. |
| * |
| * // Gets the first descendant with the class 'classname' |
| * var element = element.querySelector('.className'); |
| * // Gets the element with id 'id' |
| * var element = element.querySelector('#id'); |
| * // Gets the first descendant [ImageElement] |
| * var img = element.querySelector('img'); |
| * |
| * For details about CSS selector syntax, see the |
| * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). |
| */ |
| @DomName('Element.querySelector') |
| @DocsEditable() |
| Element querySelector(String selectors) native ; |
| |
| @JSName('querySelectorAll') |
| @DomName('Element.querySelectorAll') |
| @DocsEditable() |
| @Returns('NodeList') |
| @Creates('NodeList') |
| List<Node> _querySelectorAll(String selectors) native ; |
| |
| /// Stream of `abort` events handled by this [Element]. |
| @DomName('Element.onabort') |
| @DocsEditable() |
| ElementStream<Event> get onAbort => abortEvent.forElement(this); |
| |
| /// Stream of `beforecopy` events handled by this [Element]. |
| @DomName('Element.onbeforecopy') |
| @DocsEditable() |
| ElementStream<Event> get onBeforeCopy => beforeCopyEvent.forElement(this); |
| |
| /// Stream of `beforecut` events handled by this [Element]. |
| @DomName('Element.onbeforecut') |
| @DocsEditable() |
| ElementStream<Event> get onBeforeCut => beforeCutEvent.forElement(this); |
| |
| /// Stream of `beforepaste` events handled by this [Element]. |
| @DomName('Element.onbeforepaste') |
| @DocsEditable() |
| ElementStream<Event> get onBeforePaste => beforePasteEvent.forElement(this); |
| |
| /// Stream of `blur` events handled by this [Element]. |
| @DomName('Element.onblur') |
| @DocsEditable() |
| ElementStream<Event> get onBlur => blurEvent.forElement(this); |
| |
| @DomName('Element.oncanplay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onCanPlay => canPlayEvent.forElement(this); |
| |
| @DomName('Element.oncanplaythrough') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onCanPlayThrough => |
| canPlayThroughEvent.forElement(this); |
| |
| /// Stream of `change` events handled by this [Element]. |
| @DomName('Element.onchange') |
| @DocsEditable() |
| ElementStream<Event> get onChange => changeEvent.forElement(this); |
| |
| /// Stream of `click` events handled by this [Element]. |
| @DomName('Element.onclick') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onClick => clickEvent.forElement(this); |
| |
| /// Stream of `contextmenu` events handled by this [Element]. |
| @DomName('Element.oncontextmenu') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onContextMenu => |
| contextMenuEvent.forElement(this); |
| |
| /// Stream of `copy` events handled by this [Element]. |
| @DomName('Element.oncopy') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onCopy => copyEvent.forElement(this); |
| |
| /// Stream of `cut` events handled by this [Element]. |
| @DomName('Element.oncut') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onCut => cutEvent.forElement(this); |
| |
| /// Stream of `doubleclick` events handled by this [Element]. |
| @DomName('Element.ondblclick') |
| @DocsEditable() |
| ElementStream<Event> get onDoubleClick => doubleClickEvent.forElement(this); |
| |
| /** |
| * A stream of `drag` events fired when this element currently being dragged. |
| * |
| * A `drag` event is added to this stream as soon as the drag begins. |
| * A `drag` event is also added to this stream at intervals while the drag |
| * operation is still ongoing. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondrag') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDrag => dragEvent.forElement(this); |
| |
| /** |
| * A stream of `dragend` events fired when this element completes a drag |
| * operation. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragend') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragEnd => dragEndEvent.forElement(this); |
| |
| /** |
| * A stream of `dragenter` events fired when a dragged object is first dragged |
| * over this element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragenter') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragEnter => dragEnterEvent.forElement(this); |
| |
| /** |
| * A stream of `dragleave` events fired when an object being dragged over this |
| * element leaves this element's target area. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragleave') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragLeave => dragLeaveEvent.forElement(this); |
| |
| /** |
| * A stream of `dragover` events fired when a dragged object is currently |
| * being dragged over this element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragover') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragOver => dragOverEvent.forElement(this); |
| |
| /** |
| * A stream of `dragstart` events fired when this element starts being |
| * dragged. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondragstart') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDragStart => dragStartEvent.forElement(this); |
| |
| /** |
| * A stream of `drop` events fired when a dragged object is dropped on this |
| * element. |
| * |
| * ## Other resources |
| * |
| * * [Drag and drop |
| * sample](https://github.com/dart-lang/dart-samples/tree/master/html5/web/dnd/basics) |
| * based on [the tutorial](http://www.html5rocks.com/en/tutorials/dnd/basics/) |
| * from HTML5Rocks. |
| * * [Drag and drop |
| * specification](https://html.spec.whatwg.org/multipage/interaction.html#dnd) |
| * from WHATWG. |
| */ |
| @DomName('Element.ondrop') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onDrop => dropEvent.forElement(this); |
| |
| @DomName('Element.ondurationchange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onDurationChange => |
| durationChangeEvent.forElement(this); |
| |
| @DomName('Element.onemptied') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onEmptied => emptiedEvent.forElement(this); |
| |
| @DomName('Element.onended') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onEnded => endedEvent.forElement(this); |
| |
| /// Stream of `error` events handled by this [Element]. |
| @DomName('Element.onerror') |
| @DocsEditable() |
| ElementStream<Event> get onError => errorEvent.forElement(this); |
| |
| /// Stream of `focus` events handled by this [Element]. |
| @DomName('Element.onfocus') |
| @DocsEditable() |
| ElementStream<Event> get onFocus => focusEvent.forElement(this); |
| |
| /// Stream of `input` events handled by this [Element]. |
| @DomName('Element.oninput') |
| @DocsEditable() |
| ElementStream<Event> get onInput => inputEvent.forElement(this); |
| |
| /// Stream of `invalid` events handled by this [Element]. |
| @DomName('Element.oninvalid') |
| @DocsEditable() |
| ElementStream<Event> get onInvalid => invalidEvent.forElement(this); |
| |
| /// Stream of `keydown` events handled by this [Element]. |
| @DomName('Element.onkeydown') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyDown => keyDownEvent.forElement(this); |
| |
| /// Stream of `keypress` events handled by this [Element]. |
| @DomName('Element.onkeypress') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyPress => keyPressEvent.forElement(this); |
| |
| /// Stream of `keyup` events handled by this [Element]. |
| @DomName('Element.onkeyup') |
| @DocsEditable() |
| ElementStream<KeyboardEvent> get onKeyUp => keyUpEvent.forElement(this); |
| |
| /// Stream of `load` events handled by this [Element]. |
| @DomName('Element.onload') |
| @DocsEditable() |
| ElementStream<Event> get onLoad => loadEvent.forElement(this); |
| |
| @DomName('Element.onloadeddata') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onLoadedData => loadedDataEvent.forElement(this); |
| |
| @DomName('Element.onloadedmetadata') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onLoadedMetadata => |
| loadedMetadataEvent.forElement(this); |
| |
| /// Stream of `mousedown` events handled by this [Element]. |
| @DomName('Element.onmousedown') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseDown => mouseDownEvent.forElement(this); |
| |
| /// Stream of `mouseenter` events handled by this [Element]. |
| @DomName('Element.onmouseenter') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<MouseEvent> get onMouseEnter => |
| mouseEnterEvent.forElement(this); |
| |
| /// Stream of `mouseleave` events handled by this [Element]. |
| @DomName('Element.onmouseleave') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<MouseEvent> get onMouseLeave => |
| mouseLeaveEvent.forElement(this); |
| |
| /// Stream of `mousemove` events handled by this [Element]. |
| @DomName('Element.onmousemove') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseMove => mouseMoveEvent.forElement(this); |
| |
| /// Stream of `mouseout` events handled by this [Element]. |
| @DomName('Element.onmouseout') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseOut => mouseOutEvent.forElement(this); |
| |
| /// Stream of `mouseover` events handled by this [Element]. |
| @DomName('Element.onmouseover') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseOver => mouseOverEvent.forElement(this); |
| |
| /// Stream of `mouseup` events handled by this [Element]. |
| @DomName('Element.onmouseup') |
| @DocsEditable() |
| ElementStream<MouseEvent> get onMouseUp => mouseUpEvent.forElement(this); |
| |
| /// Stream of `mousewheel` events handled by this [Element]. |
| @DomName('Element.onmousewheel') |
| @DocsEditable() |
| // http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents |
| @Experimental() // non-standard |
| ElementStream<WheelEvent> get onMouseWheel => |
| mouseWheelEvent.forElement(this); |
| |
| /// Stream of `paste` events handled by this [Element]. |
| @DomName('Element.onpaste') |
| @DocsEditable() |
| ElementStream<ClipboardEvent> get onPaste => pasteEvent.forElement(this); |
| |
| @DomName('Element.onpause') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPause => pauseEvent.forElement(this); |
| |
| @DomName('Element.onplay') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPlay => playEvent.forElement(this); |
| |
| @DomName('Element.onplaying') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onPlaying => playingEvent.forElement(this); |
| |
| @DomName('Element.onratechange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onRateChange => rateChangeEvent.forElement(this); |
| |
| /// Stream of `reset` events handled by this [Element]. |
| @DomName('Element.onreset') |
| @DocsEditable() |
| ElementStream<Event> get onReset => resetEvent.forElement(this); |
| |
| @DomName('Element.onresize') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onResize => resizeEvent.forElement(this); |
| |
| /// Stream of `scroll` events handled by this [Element]. |
| @DomName('Element.onscroll') |
| @DocsEditable() |
| ElementStream<Event> get onScroll => scrollEvent.forElement(this); |
| |
| /// Stream of `search` events handled by this [Element]. |
| @DomName('Element.onsearch') |
| @DocsEditable() |
| // http://www.w3.org/TR/html-markup/input.search.html |
| @Experimental() |
| ElementStream<Event> get onSearch => searchEvent.forElement(this); |
| |
| @DomName('Element.onseeked') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSeeked => seekedEvent.forElement(this); |
| |
| @DomName('Element.onseeking') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSeeking => seekingEvent.forElement(this); |
| |
| /// Stream of `select` events handled by this [Element]. |
| @DomName('Element.onselect') |
| @DocsEditable() |
| ElementStream<Event> get onSelect => selectEvent.forElement(this); |
| |
| /// Stream of `selectstart` events handled by this [Element]. |
| @DomName('Element.onselectstart') |
| @DocsEditable() |
| @Experimental() // nonstandard |
| ElementStream<Event> get onSelectStart => selectStartEvent.forElement(this); |
| |
| @DomName('Element.onstalled') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onStalled => stalledEvent.forElement(this); |
| |
| /// Stream of `submit` events handled by this [Element]. |
| @DomName('Element.onsubmit') |
| @DocsEditable() |
| ElementStream<Event> get onSubmit => submitEvent.forElement(this); |
| |
| @DomName('Element.onsuspend') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onSuspend => suspendEvent.forElement(this); |
| |
| @DomName('Element.ontimeupdate') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onTimeUpdate => timeUpdateEvent.forElement(this); |
| |
| /// Stream of `touchcancel` events handled by this [Element]. |
| @DomName('Element.ontouchcancel') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchCancel => |
| touchCancelEvent.forElement(this); |
| |
| /// Stream of `touchend` events handled by this [Element]. |
| @DomName('Element.ontouchend') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchEnd => touchEndEvent.forElement(this); |
| |
| /// Stream of `touchenter` events handled by this [Element]. |
| @DomName('Element.ontouchenter') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchEnter => |
| touchEnterEvent.forElement(this); |
| |
| /// Stream of `touchleave` events handled by this [Element]. |
| @DomName('Element.ontouchleave') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchLeave => |
| touchLeaveEvent.forElement(this); |
| |
| /// Stream of `touchmove` events handled by this [Element]. |
| @DomName('Element.ontouchmove') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchMove => touchMoveEvent.forElement(this); |
| |
| /// Stream of `touchstart` events handled by this [Element]. |
| @DomName('Element.ontouchstart') |
| @DocsEditable() |
| // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features |
| @Experimental() |
| ElementStream<TouchEvent> get onTouchStart => |
| touchStartEvent.forElement(this); |
| |
| /// Stream of `transitionend` events handled by this [Element]. |
| @DomName('Element.ontransitionend') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| ElementStream<TransitionEvent> get onTransitionEnd => |
| transitionEndEvent.forElement(this); |
| |
| @DomName('Element.onvolumechange') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onVolumeChange => volumeChangeEvent.forElement(this); |
| |
| @DomName('Element.onwaiting') |
| @DocsEditable() |
| @Experimental() // untriaged |
| ElementStream<Event> get onWaiting => waitingEvent.forElement(this); |
| |
| /// Stream of `fullscreenchange` events handled by this [Element]. |
| @DomName('Element.onwebkitfullscreenchange') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| @Experimental() |
| ElementStream<Event> get onFullscreenChange => |
| fullscreenChangeEvent.forElement(this); |
| |
| /// Stream of `fullscreenerror` events handled by this [Element]. |
| @DomName('Element.onwebkitfullscreenerror') |
| @DocsEditable() |
| // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html |
| @Experimental() |
| ElementStream<Event> get onFullscreenError => |
| fullscreenErrorEvent.forElement(this); |
| } |
| |
| class _ElementFactoryProvider { |
| @DomName('Document.createElement') |
| // Optimization to improve performance until the dart2js compiler inlines this |
| // method. |
| static dynamic createElement_tag(String tag, String typeExtension) { |
| // Firefox may return a JS function for some types (Embed, Object). |
| if (typeExtension != null) { |
| return JS('Element|=Object', 'document.createElement(#, #)', tag, |
| typeExtension); |
| } |
| // Should be able to eliminate this and just call the two-arg version above |
| // with null typeExtension, but Chrome treats the tag as case-sensitive if |
| // typeExtension is null. |
| // https://code.google.com/p/chromium/issues/detail?id=282467 |
| return JS('Element|=Object', 'document.createElement(#)', tag); |
| } |
| } |
| |
| /** |
| * Options for Element.scrollIntoView. |
| */ |
| class ScrollAlignment { |
| final _value; |
| const ScrollAlignment._internal(this._value); |
| toString() => 'ScrollAlignment.$_value'; |
| |
| /// Attempt to align the element to the top of the scrollable area. |
| static const TOP = const ScrollAlignment._internal('TOP'); |
| |
| /// Attempt to center the element in the scrollable area. |
| static const CENTER = const ScrollAlignment._internal('CENTER'); |
| |
| /// Attempt to align the element to the bottom of the scrollable area. |
| static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('HTMLEmbedElement') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.IE) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Unstable() |
| @Native("HTMLEmbedElement") |
| class EmbedElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory EmbedElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('HTMLEmbedElement.HTMLEmbedElement') |
| @DocsEditable() |
| factory EmbedElement() => document.createElement("embed"); |
| /** |
| * Constructor instantiated by the DOM when a custom element has been created. |
| * |
| * This can only be called by subclasses from their created constructor. |
| */ |
| EmbedElement.created() : super.created(); |
| |
| /// Checks if this type is supported on the current platform. |
| static bool get supported => Element.isTagSupported('embed'); |
| |
| @DomName('HTMLEmbedElement.height') |
| @DocsEditable() |
| String height; |
| |
| @DomName('HTMLEmbedElement.name') |
| @DocsEditable() |
| String name; |
| |
| @DomName('HTMLEmbedElement.src') |
| @DocsEditable() |
| String src; |
| |
| @DomName('HTMLEmbedElement.type') |
| @DocsEditable() |
| String type; |
| |
| @DomName('HTMLEmbedElement.width') |
| @DocsEditable() |
| String width; |
| |
| @DomName('HTMLEmbedElement.__getter__') |
| @DocsEditable() |
| bool __getter__(index_OR_name) native ; |
| |
| @DomName('HTMLEmbedElement.__setter__') |
| @DocsEditable() |
| void __setter__(index_OR_name, Node value) native ; |
| } |
| // 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. |
| |
| @DomName('EntriesCallback') |
| // http://www.w3.org/TR/file-system-api/#the-entriescallback-interface |
| @Experimental() |
| typedef void _EntriesCallback(List<Entry> entries); |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @DocsEditable() |
| @DomName('Entry') |
| // http://www.w3.org/TR/file-system-api/#the-entry-interface |
| @Experimental() |
| @Native("Entry") |
| class Entry extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Entry._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('Entry.filesystem') |
| @DocsEditable() |
| final FileSystem filesystem; |
| |
| @DomName('Entry.fullPath') |
| @DocsEditable() |
| final String fullPath; |
| |
| @DomName('Entry.isDirectory') |
| @DocsEditable() |
| final bool isDirectory; |
| |
| @DomName('Entry.isFile') |
| @DocsEditable() |
| final bool isFile; |
| |
| @DomName('Entry.name') |
| @DocsEditable() |
| final String name; |
| |
| @JSName('copyTo') |
| @DomName('Entry.copyTo') |
| @DocsEditable() |
| void _copyTo(DirectoryEntry parent, |
| {String name, |
| _EntryCallback successCallback, |
| _ErrorCallback errorCallback}) native ; |
| |
| @JSName('copyTo') |
| @DomName('Entry.copyTo') |
| @DocsEditable() |
| Future<Entry> copyTo(DirectoryEntry parent, {String name}) { |
| var completer = new Completer<Entry>(); |
| _copyTo(parent, name: name, successCallback: (value) { |
| completer.complete(value); |
| }, errorCallback: (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('getMetadata') |
| @DomName('Entry.getMetadata') |
| @DocsEditable() |
| void _getMetadata(MetadataCallback successCallback, |
| [_ErrorCallback errorCallback]) native ; |
| |
| @JSName('getMetadata') |
| @DomName('Entry.getMetadata') |
| @DocsEditable() |
| Future<Metadata> getMetadata() { |
| var completer = new Completer<Metadata>(); |
| _getMetadata((value) { |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('getParent') |
| @DomName('Entry.getParent') |
| @DocsEditable() |
| void _getParent( |
| [_EntryCallback successCallback, _ErrorCallback errorCallback]) native ; |
| |
| @JSName('getParent') |
| @DomName('Entry.getParent') |
| @DocsEditable() |
| Future<Entry> getParent() { |
| var completer = new Completer<Entry>(); |
| _getParent((value) { |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('moveTo') |
| @DomName('Entry.moveTo') |
| @DocsEditable() |
| void _moveTo(DirectoryEntry parent, |
| {String name, |
| _EntryCallback successCallback, |
| _ErrorCallback errorCallback}) native ; |
| |
| @JSName('moveTo') |
| @DomName('Entry.moveTo') |
| @DocsEditable() |
| Future<Entry> moveTo(DirectoryEntry parent, {String name}) { |
| var completer = new Completer<Entry>(); |
| _moveTo(parent, name: name, successCallback: (value) { |
| completer.complete(value); |
| }, errorCallback: (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('remove') |
| @DomName('Entry.remove') |
| @DocsEditable() |
| void _remove(VoidCallback successCallback, [_ErrorCallback errorCallback]) |
| native ; |
| |
| @JSName('remove') |
| @DomName('Entry.remove') |
| @DocsEditable() |
| Future remove() { |
| var completer = new Completer(); |
| _remove(() { |
| completer.complete(); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('toURL') |
| @DomName('Entry.toURL') |
| @DocsEditable() |
| String toUrl() native ; |
| } |
| // 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. |
| |
| @DomName('EntryCallback') |
| // http://www.w3.org/TR/file-system-api/#the-entrycallback-interface |
| @Experimental() |
| typedef void _EntryCallback(Entry entry); |
| // 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. |
| |
| @DomName('ErrorCallback') |
| // http://www.w3.org/TR/file-system-api/#the-errorcallback-interface |
| @Experimental() |
| typedef void _ErrorCallback(FileError 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. |
| |
| @DocsEditable() |
| @DomName('ErrorEvent') |
| @Unstable() |
| @Native("ErrorEvent") |
| class ErrorEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory ErrorEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @DomName('ErrorEvent.ErrorEvent') |
| @DocsEditable() |
| factory ErrorEvent(String type, [Map eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return ErrorEvent._create_1(type, eventInitDict_1); |
| } |
| return ErrorEvent._create_2(type); |
| } |
| static ErrorEvent _create_1(type, eventInitDict) => |
| JS('ErrorEvent', 'new ErrorEvent(#,#)', type, eventInitDict); |
| static ErrorEvent _create_2(type) => |
| JS('ErrorEvent', 'new ErrorEvent(#)', type); |
| |
| @DomName('ErrorEvent.colno') |
| @DocsEditable() |
| @Experimental() // untriaged |
| final int colno; |
| |
| @DomName('ErrorEvent.error') |
| @DocsEditable() |
| @Experimental() // untriaged |
| @Creates('Null') |
| final Object error; |
| |
| @DomName('ErrorEvent.filename') |
| @DocsEditable() |
| final String filename; |
| |
| @DomName('ErrorEvent.lineno') |
| @DocsEditable() |
| final int lineno; |
| |
| @DomName('ErrorEvent.message') |
| @DocsEditable() |
| final String message; |
| } |
| // 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. |
| |
| @DomName('Event') |
| @Native("Event,InputEvent") |
| class Event extends Interceptor { |
| // In JS, canBubble and cancelable are technically required parameters to |
| // init*Event. In practice, though, if they aren't provided they simply |
| // default to false (since that's Boolean(undefined)). |
| // |
| // Contrary to JS, we default canBubble and cancelable to true, since that's |
| // what people want most of the time anyway. |
| factory Event(String type, {bool canBubble: true, bool cancelable: true}) { |
| return new Event.eventType('Event', type, |
| canBubble: canBubble, cancelable: cancelable); |
| } |
| |
| /** |
| * Creates a new Event object of the specified type. |
| * |
| * This is analogous to document.createEvent. |
| * Normally events should be created via their constructors, if available. |
| * |
| * var e = new Event.type('MouseEvent', 'mousedown', true, true); |
| */ |
|