| /** |
| * 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. |
| * |
| * For information on writing web apps with Dart, see https://dart.dev/web. |
| * |
| * {@category Web} |
| * {@canonicalFor dart:_internal.HttpStatus} |
| */ |
| library dart.dom.html; |
| |
| import 'dart:async'; |
| import 'dart:collection' hide LinkedList, LinkedListEntry; |
| import 'dart:_internal' hide Symbol; |
| import 'dart:html_common'; |
| import 'dart:indexed_db'; |
| 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_audio' show AudioBuffer, AudioTrack, AudioTrackList; |
| import 'dart:web_gl' as gl; |
| import 'dart:web_gl' show RenderingContext, RenderingContext2; |
| import 'dart:web_sql'; |
| 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, |
| registerGlobalObject, |
| applyExtension; |
| import 'dart:_interceptors' |
| show |
| Interceptor, |
| JavaScriptFunction, |
| JSExtendableArray, |
| JSUInt31, |
| findInterceptorConstructorForType, |
| findConstructorForNativeSubclassType, |
| getNativeInterceptor, |
| setDispatchProperty; |
| |
| export 'dart:_internal' show HttpStatus; |
| export 'dart:html_common' show promiseToFuture; |
| 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('returns:HtmlDocument;depends:none;effects:none;gvn:true', 'document'); |
| |
| /// Convert a JS Promise to a Future<Map<String, dynamic>>. |
| /// |
| /// On a successful result the native JS result will be converted to a Dart Map. |
| /// See [convertNativeToDart_Dictionary]. On a rejected promise the error is |
| /// forwarded without change. |
| Future<Map<String, dynamic>?> promiseToFutureAsMap(jsPromise) => |
| promiseToFuture(jsPromise).then(convertNativeToDart_Dictionary); |
| |
| // Workaround for tags like <cite> that lack their own Element subclass -- |
| // Dart issue 1990. |
| @Native("HTMLElement") |
| class HtmlElement extends Element implements NoncedElement { |
| 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(); |
| |
| // From NoncedElement |
| String? get nonce native; |
| set nonce(String? value) native; |
| } |
| |
| /** |
| * Emitted for any setlike IDL entry needs a callback signature. |
| * Today there is only one. |
| */ |
| typedef void FontFaceSetForEachCallback( |
| FontFace fontFace, FontFace fontFaceAgain, FontFaceSet set); |
| |
| WorkerGlobalScope get _workerSelf => JS('WorkerGlobalScope', 'self'); |
| // 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. |
| |
| @Native("AbortPaymentEvent") |
| class AbortPaymentEvent extends ExtendableEvent { |
| // To suppress missing implicit constructor warnings. |
| factory AbortPaymentEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory AbortPaymentEvent(String type, Map eventInitDict) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return AbortPaymentEvent._create_1(type, eventInitDict_1); |
| } |
| static AbortPaymentEvent _create_1(type, eventInitDict) => JS( |
| 'AbortPaymentEvent', 'new AbortPaymentEvent(#,#)', type, eventInitDict); |
| |
| void respondWith(Future paymentAbortedResponse) 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. |
| |
| @Native("AbsoluteOrientationSensor") |
| class AbsoluteOrientationSensor extends OrientationSensor { |
| // To suppress missing implicit constructor warnings. |
| factory AbsoluteOrientationSensor._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory AbsoluteOrientationSensor([Map? sensorOptions]) { |
| if (sensorOptions != null) { |
| var sensorOptions_1 = convertDartToNative_Dictionary(sensorOptions); |
| return AbsoluteOrientationSensor._create_1(sensorOptions_1); |
| } |
| return AbsoluteOrientationSensor._create_2(); |
| } |
| static AbsoluteOrientationSensor _create_1(sensorOptions) => JS( |
| 'AbsoluteOrientationSensor', |
| 'new AbsoluteOrientationSensor(#)', |
| sensorOptions); |
| static AbsoluteOrientationSensor _create_2() => |
| JS('AbsoluteOrientationSensor', 'new AbsoluteOrientationSensor()'); |
| } |
| // 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. |
| |
| 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. |
| */ |
| static const EventStreamProvider<Event> errorEvent = |
| const EventStreamProvider<Event>('error'); |
| |
| /// Stream of `error` events handled by this [AbstractWorker]. |
| Stream<Event> get onError => errorEvent.forTarget(this); |
| } |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| @Native("Accelerometer") |
| class Accelerometer extends Sensor { |
| // To suppress missing implicit constructor warnings. |
| factory Accelerometer._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory Accelerometer([Map? sensorOptions]) { |
| if (sensorOptions != null) { |
| var sensorOptions_1 = convertDartToNative_Dictionary(sensorOptions); |
| return Accelerometer._create_1(sensorOptions_1); |
| } |
| return Accelerometer._create_2(); |
| } |
| static Accelerometer _create_1(sensorOptions) => |
| JS('Accelerometer', 'new Accelerometer(#)', sensorOptions); |
| static Accelerometer _create_2() => |
| JS('Accelerometer', 'new Accelerometer()'); |
| |
| num? get x native; |
| |
| num? get y native; |
| |
| num? get z 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. |
| |
| @Native("AccessibleNode") |
| class AccessibleNode extends EventTarget { |
| // To suppress missing implicit constructor warnings. |
| factory AccessibleNode._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| static const EventStreamProvider<Event> accessibleClickEvent = |
| const EventStreamProvider<Event>('accessibleclick'); |
| |
| static const EventStreamProvider<Event> accessibleContextMenuEvent = |
| const EventStreamProvider<Event>('accessiblecontextmenu'); |
| |
| static const EventStreamProvider<Event> accessibleDecrementEvent = |
| const EventStreamProvider<Event>('accessibledecrement'); |
| |
| static const EventStreamProvider<Event> accessibleFocusEvent = |
| const EventStreamProvider<Event>('accessiblefocus'); |
| |
| static const EventStreamProvider<Event> accessibleIncrementEvent = |
| const EventStreamProvider<Event>('accessibleincrement'); |
| |
| static const EventStreamProvider<Event> accessibleScrollIntoViewEvent = |
| const EventStreamProvider<Event>('accessiblescrollintoview'); |
| |
| factory AccessibleNode() { |
| return AccessibleNode._create_1(); |
| } |
| static AccessibleNode _create_1() => |
| JS('AccessibleNode', 'new AccessibleNode()'); |
| |
| AccessibleNode? get activeDescendant native; |
| |
| set activeDescendant(AccessibleNode? value) native; |
| |
| bool? get atomic native; |
| |
| set atomic(bool? value) native; |
| |
| String? get autocomplete native; |
| |
| set autocomplete(String? value) native; |
| |
| bool? get busy native; |
| |
| set busy(bool? value) native; |
| |
| String? get checked native; |
| |
| set checked(String? value) native; |
| |
| int? get colCount native; |
| |
| set colCount(int? value) native; |
| |
| int? get colIndex native; |
| |
| set colIndex(int? value) native; |
| |
| int? get colSpan native; |
| |
| set colSpan(int? value) native; |
| |
| AccessibleNodeList? get controls native; |
| |
| set controls(AccessibleNodeList? value) native; |
| |
| String? get current native; |
| |
| set current(String? value) native; |
| |
| AccessibleNodeList? get describedBy native; |
| |
| set describedBy(AccessibleNodeList? value) native; |
| |
| AccessibleNode? get details native; |
| |
| set details(AccessibleNode? value) native; |
| |
| bool? get disabled native; |
| |
| set disabled(bool? value) native; |
| |
| AccessibleNode? get errorMessage native; |
| |
| set errorMessage(AccessibleNode? value) native; |
| |
| bool? get expanded native; |
| |
| set expanded(bool? value) native; |
| |
| AccessibleNodeList? get flowTo native; |
| |
| set flowTo(AccessibleNodeList? value) native; |
| |
| String? get hasPopUp native; |
| |
| set hasPopUp(String? value) native; |
| |
| bool? get hidden native; |
| |
| set hidden(bool? value) native; |
| |
| String? get invalid native; |
| |
| set invalid(String? value) native; |
| |
| String? get keyShortcuts native; |
| |
| set keyShortcuts(String? value) native; |
| |
| String? get label native; |
| |
| set label(String? value) native; |
| |
| AccessibleNodeList? get labeledBy native; |
| |
| set labeledBy(AccessibleNodeList? value) native; |
| |
| int? get level native; |
| |
| set level(int? value) native; |
| |
| String? get live native; |
| |
| set live(String? value) native; |
| |
| bool? get modal native; |
| |
| set modal(bool? value) native; |
| |
| bool? get multiline native; |
| |
| set multiline(bool? value) native; |
| |
| bool? get multiselectable native; |
| |
| set multiselectable(bool? value) native; |
| |
| String? get orientation native; |
| |
| set orientation(String? value) native; |
| |
| AccessibleNodeList? get owns native; |
| |
| set owns(AccessibleNodeList? value) native; |
| |
| String? get placeholder native; |
| |
| set placeholder(String? value) native; |
| |
| int? get posInSet native; |
| |
| set posInSet(int? value) native; |
| |
| String? get pressed native; |
| |
| set pressed(String? value) native; |
| |
| bool? get readOnly native; |
| |
| set readOnly(bool? value) native; |
| |
| String? get relevant native; |
| |
| set relevant(String? value) native; |
| |
| bool? get required native; |
| |
| set required(bool? value) native; |
| |
| String? get role native; |
| |
| set role(String? value) native; |
| |
| String? get roleDescription native; |
| |
| set roleDescription(String? value) native; |
| |
| int? get rowCount native; |
| |
| set rowCount(int? value) native; |
| |
| int? get rowIndex native; |
| |
| set rowIndex(int? value) native; |
| |
| int? get rowSpan native; |
| |
| set rowSpan(int? value) native; |
| |
| bool? get selected native; |
| |
| set selected(bool? value) native; |
| |
| int? get setSize native; |
| |
| set setSize(int? value) native; |
| |
| String? get sort native; |
| |
| set sort(String? value) native; |
| |
| num? get valueMax native; |
| |
| set valueMax(num? value) native; |
| |
| num? get valueMin native; |
| |
| set valueMin(num? value) native; |
| |
| num? get valueNow native; |
| |
| set valueNow(num? value) native; |
| |
| String? get valueText native; |
| |
| set valueText(String? value) native; |
| |
| void appendChild(AccessibleNode child) native; |
| |
| Stream<Event> get onAccessibleClick => accessibleClickEvent.forTarget(this); |
| |
| Stream<Event> get onAccessibleContextMenu => |
| accessibleContextMenuEvent.forTarget(this); |
| |
| Stream<Event> get onAccessibleDecrement => |
| accessibleDecrementEvent.forTarget(this); |
| |
| Stream<Event> get onAccessibleFocus => accessibleFocusEvent.forTarget(this); |
| |
| Stream<Event> get onAccessibleIncrement => |
| accessibleIncrementEvent.forTarget(this); |
| |
| Stream<Event> get onAccessibleScrollIntoView => |
| accessibleScrollIntoViewEvent.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. |
| |
| @Native("AccessibleNodeList") |
| class AccessibleNodeList extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AccessibleNodeList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory AccessibleNodeList([List<AccessibleNode>? nodes]) { |
| if (nodes != null) { |
| return AccessibleNodeList._create_1(nodes); |
| } |
| return AccessibleNodeList._create_2(); |
| } |
| static AccessibleNodeList _create_1(nodes) => |
| JS('AccessibleNodeList', 'new AccessibleNodeList(#)', nodes); |
| static AccessibleNodeList _create_2() => |
| JS('AccessibleNodeList', 'new AccessibleNodeList()'); |
| |
| int? get length native; |
| |
| set length(int? value) native; |
| |
| void __setter__(int index, AccessibleNode node) native; |
| |
| void add(AccessibleNode node, AccessibleNode? before) native; |
| |
| AccessibleNode? item(int index) native; |
| |
| void remove(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. |
| |
| @Native("AmbientLightSensor") |
| class AmbientLightSensor extends Sensor { |
| // To suppress missing implicit constructor warnings. |
| factory AmbientLightSensor._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory AmbientLightSensor([Map? sensorOptions]) { |
| if (sensorOptions != null) { |
| var sensorOptions_1 = convertDartToNative_Dictionary(sensorOptions); |
| return AmbientLightSensor._create_1(sensorOptions_1); |
| } |
| return AmbientLightSensor._create_2(); |
| } |
| static AmbientLightSensor _create_1(sensorOptions) => |
| JS('AmbientLightSensor', 'new AmbientLightSensor(#)', sensorOptions); |
| static AmbientLightSensor _create_2() => |
| JS('AmbientLightSensor', 'new AmbientLightSensor()'); |
| |
| num? get illuminance 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. |
| |
| @Native("HTMLAnchorElement") |
| class AnchorElement extends HtmlElement implements HtmlHyperlinkElementUtils { |
| // To suppress missing implicit constructor warnings. |
| factory AnchorElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory AnchorElement({String? href}) { |
| AnchorElement e = JS<AnchorElement>( |
| 'returns:AnchorElement;creates:AnchorElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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(); |
| |
| String? get download native; |
| |
| set download(String? value) native; |
| |
| String get hreflang native; |
| |
| set hreflang(String value) native; |
| |
| String? get referrerPolicy native; |
| |
| set referrerPolicy(String? value) native; |
| |
| String get rel native; |
| |
| set rel(String value) native; |
| |
| String get target native; |
| |
| set target(String value) native; |
| |
| String get type native; |
| |
| set type(String value) native; |
| |
| // From HTMLHyperlinkElementUtils |
| |
| String? get hash native; |
| |
| set hash(String? value) native; |
| |
| String? get host native; |
| |
| set host(String? value) native; |
| |
| String? get hostname native; |
| |
| set hostname(String? value) native; |
| |
| String? get href native; |
| |
| set href(String? value) native; |
| |
| String? get origin native; |
| |
| String? get password native; |
| |
| set password(String? value) native; |
| |
| String? get pathname native; |
| |
| set pathname(String? value) native; |
| |
| String? get port native; |
| |
| set port(String? value) native; |
| |
| String? get protocol native; |
| |
| set protocol(String? value) native; |
| |
| String? get search native; |
| |
| set search(String? value) native; |
| |
| String? get username native; |
| |
| set username(String? value) native; |
| |
| 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. |
| |
| @Native("Animation") |
| class Animation extends EventTarget { |
| // To suppress missing implicit constructor warnings. |
| factory Animation._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| static const EventStreamProvider<Event> cancelEvent = |
| const EventStreamProvider<Event>('cancel'); |
| |
| static const EventStreamProvider<Event> finishEvent = |
| const EventStreamProvider<Event>('finish'); |
| |
| factory Animation( |
| [AnimationEffectReadOnly? effect, AnimationTimeline? timeline]) { |
| if (timeline != null) { |
| return Animation._create_1(effect, timeline); |
| } |
| if (effect != null) { |
| return Animation._create_2(effect); |
| } |
| return Animation._create_3(); |
| } |
| static Animation _create_1(effect, timeline) => |
| JS('Animation', 'new Animation(#,#)', effect, timeline); |
| static Animation _create_2(effect) => |
| JS('Animation', 'new Animation(#)', effect); |
| static Animation _create_3() => JS('Animation', 'new Animation()'); |
| |
| /// Checks if this type is supported on the current platform. |
| static bool get supported => JS('bool', '!!(document.body.animate)'); |
| |
| num? get currentTime native; |
| |
| set currentTime(num? value) native; |
| |
| AnimationEffectReadOnly? get effect native; |
| |
| set effect(AnimationEffectReadOnly? value) native; |
| |
| Future<Animation> get finished => |
| promiseToFuture<Animation>(JS("creates:Animation;", "#.finished", this)); |
| |
| String? get id native; |
| |
| set id(String? value) native; |
| |
| String? get playState native; |
| |
| num? get playbackRate native; |
| |
| set playbackRate(num? value) native; |
| |
| Future<Animation> get ready => |
| promiseToFuture<Animation>(JS("creates:Animation;", "#.ready", this)); |
| |
| num? get startTime native; |
| |
| set startTime(num? value) native; |
| |
| AnimationTimeline? get timeline native; |
| |
| void cancel() native; |
| |
| void finish() native; |
| |
| void pause() native; |
| |
| void play() native; |
| |
| void reverse() native; |
| |
| Stream<Event> get onCancel => cancelEvent.forTarget(this); |
| |
| Stream<Event> get onFinish => finishEvent.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. |
| |
| @Native("AnimationEffectReadOnly") |
| class AnimationEffectReadOnly extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationEffectReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| AnimationEffectTimingReadOnly? get timing native; |
| |
| Map getComputedTiming() { |
| return convertNativeToDart_Dictionary(_getComputedTiming_1())!; |
| } |
| |
| @JSName('getComputedTiming') |
| _getComputedTiming_1() 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. |
| |
| @Native("AnimationEffectTiming") |
| class AnimationEffectTiming extends AnimationEffectTimingReadOnly { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationEffectTiming._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| // Shadowing definition. |
| |
| num? get delay native; |
| |
| set delay(num? value) native; |
| |
| // Shadowing definition. |
| |
| String? get direction native; |
| |
| set direction(String? value) native; |
| |
| // Shadowing definition. |
| |
| @Returns('num|String|Null') |
| Object? get duration native; |
| |
| set duration(Object? value) native; |
| |
| // Shadowing definition. |
| |
| String? get easing native; |
| |
| set easing(String? value) native; |
| |
| // Shadowing definition. |
| |
| num? get endDelay native; |
| |
| set endDelay(num? value) native; |
| |
| // Shadowing definition. |
| |
| String? get fill native; |
| |
| set fill(String? value) native; |
| |
| // Shadowing definition. |
| |
| num? get iterationStart native; |
| |
| set iterationStart(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get iterations native; |
| |
| set iterations(num? 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. |
| |
| @Native("AnimationEffectTimingReadOnly") |
| class AnimationEffectTimingReadOnly extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationEffectTimingReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| num? get delay native; |
| |
| String? get direction native; |
| |
| Object? get duration native; |
| |
| String? get easing native; |
| |
| num? get endDelay native; |
| |
| String? get fill native; |
| |
| num? get iterationStart native; |
| |
| num? get iterations 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. |
| |
| @Native("AnimationEvent") |
| class AnimationEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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); |
| |
| String? get animationName native; |
| |
| num? get elapsedTime 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. |
| |
| @Native("AnimationPlaybackEvent") |
| class AnimationPlaybackEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationPlaybackEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory AnimationPlaybackEvent(String type, [Map? eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return AnimationPlaybackEvent._create_1(type, eventInitDict_1); |
| } |
| return AnimationPlaybackEvent._create_2(type); |
| } |
| static AnimationPlaybackEvent _create_1(type, eventInitDict) => JS( |
| 'AnimationPlaybackEvent', |
| 'new AnimationPlaybackEvent(#,#)', |
| type, |
| eventInitDict); |
| static AnimationPlaybackEvent _create_2(type) => |
| JS('AnimationPlaybackEvent', 'new AnimationPlaybackEvent(#)', type); |
| |
| num? get currentTime native; |
| |
| num? get timelineTime 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. |
| |
| @Native("AnimationTimeline") |
| class AnimationTimeline extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationTimeline._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| num? get currentTime 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. |
| |
| @Native("AnimationWorkletGlobalScope") |
| class AnimationWorkletGlobalScope extends WorkletGlobalScope { |
| // To suppress missing implicit constructor warnings. |
| factory AnimationWorkletGlobalScope._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| void registerAnimator(String name, Object animatorConstructor) 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. |
| |
| /** |
| * ApplicationCache is accessed via [Window.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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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)'); |
| |
| static const int CHECKING = 2; |
| |
| static const int DOWNLOADING = 3; |
| |
| static const int IDLE = 1; |
| |
| static const int OBSOLETE = 5; |
| |
| static const int UNCACHED = 0; |
| |
| static const int UPDATEREADY = 4; |
| |
| int? get status native; |
| |
| void abort() native; |
| |
| void swapCache() native; |
| |
| void update() native; |
| |
| /// Stream of `cached` events handled by this [ApplicationCache]. |
| Stream<Event> get onCached => cachedEvent.forTarget(this); |
| |
| /// Stream of `checking` events handled by this [ApplicationCache]. |
| Stream<Event> get onChecking => checkingEvent.forTarget(this); |
| |
| /// Stream of `downloading` events handled by this [ApplicationCache]. |
| Stream<Event> get onDownloading => downloadingEvent.forTarget(this); |
| |
| /// Stream of `error` events handled by this [ApplicationCache]. |
| Stream<Event> get onError => errorEvent.forTarget(this); |
| |
| /// Stream of `noupdate` events handled by this [ApplicationCache]. |
| Stream<Event> get onNoUpdate => noUpdateEvent.forTarget(this); |
| |
| /// Stream of `obsolete` events handled by this [ApplicationCache]. |
| Stream<Event> get onObsolete => obsoleteEvent.forTarget(this); |
| |
| /// Stream of `progress` events handled by this [ApplicationCache]. |
| Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this); |
| |
| /// Stream of `updateready` events handled by this [ApplicationCache]. |
| 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. |
| |
| @Native("ApplicationCacheErrorEvent") |
| class ApplicationCacheErrorEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory ApplicationCacheErrorEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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); |
| |
| String? get message native; |
| |
| String? get reason native; |
| |
| int? get status native; |
| |
| String? get url 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. |
| |
| /** |
| * 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. |
| */ |
| @Native("HTMLAreaElement") |
| class AreaElement extends HtmlElement implements HtmlHyperlinkElementUtils { |
| // To suppress missing implicit constructor warnings. |
| factory AreaElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory AreaElement() => JS<AreaElement>( |
| 'returns:AreaElement;creates:AreaElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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(); |
| |
| String get alt native; |
| |
| set alt(String value) native; |
| |
| String get coords native; |
| |
| set coords(String value) native; |
| |
| String? get download native; |
| |
| set download(String? value) native; |
| |
| String? get referrerPolicy native; |
| |
| set referrerPolicy(String? value) native; |
| |
| String get rel native; |
| |
| set rel(String value) native; |
| |
| String get shape native; |
| |
| set shape(String value) native; |
| |
| String get target native; |
| |
| set target(String value) native; |
| |
| // From HTMLHyperlinkElementUtils |
| |
| String? get hash native; |
| |
| set hash(String? value) native; |
| |
| String? get host native; |
| |
| set host(String? value) native; |
| |
| String? get hostname native; |
| |
| set hostname(String? value) native; |
| |
| String? get href native; |
| |
| set href(String? value) native; |
| |
| String? get origin native; |
| |
| String? get password native; |
| |
| set password(String? value) native; |
| |
| String? get pathname native; |
| |
| set pathname(String? value) native; |
| |
| String? get port native; |
| |
| set port(String? value) native; |
| |
| String? get protocol native; |
| |
| set protocol(String? value) native; |
| |
| String? get search native; |
| |
| set search(String? value) native; |
| |
| String? get username native; |
| |
| set username(String? value) native; |
| |
| 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. |
| |
| @Native("HTMLAudioElement") |
| class AudioElement extends MediaElement { |
| 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. |
| |
| @Native("AuthenticatorAssertionResponse") |
| class AuthenticatorAssertionResponse extends AuthenticatorResponse { |
| // To suppress missing implicit constructor warnings. |
| factory AuthenticatorAssertionResponse._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| ByteBuffer? get authenticatorData native; |
| |
| ByteBuffer? get signature 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. |
| |
| @Native("AuthenticatorAttestationResponse") |
| class AuthenticatorAttestationResponse extends AuthenticatorResponse { |
| // To suppress missing implicit constructor warnings. |
| factory AuthenticatorAttestationResponse._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| ByteBuffer? get attestationObject 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. |
| |
| @Native("AuthenticatorResponse") |
| class AuthenticatorResponse extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory AuthenticatorResponse._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('clientDataJSON') |
| ByteBuffer? get clientDataJson 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. |
| |
| @Native("HTMLBRElement") |
| class BRElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory BRElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BRElement() => JS<BRElement>( |
| 'returns:BRElement;creates:BRElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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. |
| |
| @Native("BackgroundFetchClickEvent") |
| class BackgroundFetchClickEvent extends BackgroundFetchEvent { |
| // To suppress missing implicit constructor warnings. |
| factory BackgroundFetchClickEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BackgroundFetchClickEvent(String type, Map init) { |
| var init_1 = convertDartToNative_Dictionary(init); |
| return BackgroundFetchClickEvent._create_1(type, init_1); |
| } |
| static BackgroundFetchClickEvent _create_1(type, init) => JS( |
| 'BackgroundFetchClickEvent', |
| 'new BackgroundFetchClickEvent(#,#)', |
| type, |
| init); |
| |
| String? get state 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. |
| |
| @Native("BackgroundFetchEvent") |
| class BackgroundFetchEvent extends ExtendableEvent { |
| // To suppress missing implicit constructor warnings. |
| factory BackgroundFetchEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BackgroundFetchEvent(String type, Map init) { |
| var init_1 = convertDartToNative_Dictionary(init); |
| return BackgroundFetchEvent._create_1(type, init_1); |
| } |
| static BackgroundFetchEvent _create_1(type, init) => |
| JS('BackgroundFetchEvent', 'new BackgroundFetchEvent(#,#)', type, init); |
| |
| String? get id 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. |
| |
| @Native("BackgroundFetchFailEvent") |
| class BackgroundFetchFailEvent extends BackgroundFetchEvent { |
| // To suppress missing implicit constructor warnings. |
| factory BackgroundFetchFailEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BackgroundFetchFailEvent(String type, Map init) { |
| var init_1 = convertDartToNative_Dictionary(init); |
| return BackgroundFetchFailEvent._create_1(type, init_1); |
| } |
| static BackgroundFetchFailEvent _create_1(type, init) => JS( |
| 'BackgroundFetchFailEvent', |
| 'new BackgroundFetchFailEvent(#,#)', |
| type, |
| init); |
| |
| List<BackgroundFetchSettledFetch>? get fetches 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. |
| |
| @Native("BackgroundFetchFetch") |
| class BackgroundFetchFetch extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BackgroundFetchFetch._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| _Request? get request 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. |
| |
| @Native("BackgroundFetchManager") |
| class BackgroundFetchManager extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BackgroundFetchManager._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| Future<BackgroundFetchRegistration> fetch(String id, Object requests, |
| [Map? options]) { |
| var options_dict = null; |
| if (options != null) { |
| options_dict = convertDartToNative_Dictionary(options); |
| } |
| return promiseToFuture<BackgroundFetchRegistration>(JS( |
| "creates:BackgroundFetchRegistration;", |
| "#.fetch(#, #, #)", |
| this, |
| id, |
| requests, |
| options_dict)); |
| } |
| |
| Future<BackgroundFetchRegistration> get(String id) => |
| promiseToFuture<BackgroundFetchRegistration>( |
| JS("creates:BackgroundFetchRegistration;", "#.get(#)", this, id)); |
| |
| Future<List<dynamic>> getIds() => |
| promiseToFuture<List<dynamic>>(JS("", "#.getIds()", 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. |
| |
| @Native("BackgroundFetchRegistration") |
| class BackgroundFetchRegistration extends EventTarget { |
| // To suppress missing implicit constructor warnings. |
| factory BackgroundFetchRegistration._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| int? get downloadTotal native; |
| |
| int? get downloaded native; |
| |
| String? get id native; |
| |
| String? get title native; |
| |
| int? get totalDownloadSize native; |
| |
| int? get uploadTotal native; |
| |
| int? get uploaded native; |
| |
| Future<bool> abort() => promiseToFuture<bool>(JS("", "#.abort()", 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. |
| |
| @Native("BackgroundFetchSettledFetch") |
| class BackgroundFetchSettledFetch extends BackgroundFetchFetch { |
| // To suppress missing implicit constructor warnings. |
| factory BackgroundFetchSettledFetch._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BackgroundFetchSettledFetch(_Request request, _Response response) { |
| return BackgroundFetchSettledFetch._create_1(request, response); |
| } |
| static BackgroundFetchSettledFetch _create_1(request, response) => JS( |
| 'BackgroundFetchSettledFetch', |
| 'new BackgroundFetchSettledFetch(#,#)', |
| request, |
| response); |
| |
| _Response? get response 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. |
| |
| @Native("BackgroundFetchedEvent") |
| class BackgroundFetchedEvent extends BackgroundFetchEvent { |
| // To suppress missing implicit constructor warnings. |
| factory BackgroundFetchedEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BackgroundFetchedEvent(String type, Map init) { |
| var init_1 = convertDartToNative_Dictionary(init); |
| return BackgroundFetchedEvent._create_1(type, init_1); |
| } |
| static BackgroundFetchedEvent _create_1(type, init) => JS( |
| 'BackgroundFetchedEvent', 'new BackgroundFetchedEvent(#,#)', type, init); |
| |
| List<BackgroundFetchSettledFetch>? get fetches native; |
| |
| Future updateUI(String title) => |
| promiseToFuture(JS("", "#.updateUI(#)", this, title)); |
| } |
| // 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. |
| |
| // 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"); |
| } |
| |
| bool? get visible 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. |
| |
| @Native("BarcodeDetector") |
| class BarcodeDetector extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BarcodeDetector._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BarcodeDetector() { |
| return BarcodeDetector._create_1(); |
| } |
| static BarcodeDetector _create_1() => |
| JS('BarcodeDetector', 'new BarcodeDetector()'); |
| |
| Future<List<dynamic>> detect(/*ImageBitmapSource*/ image) => |
| promiseToFuture<List<dynamic>>(JS("", "#.detect(#)", this, image)); |
| } |
| // 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. |
| |
| @Native("HTMLBaseElement") |
| class BaseElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory BaseElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BaseElement() => JS<BaseElement>( |
| 'returns:BaseElement;creates:BaseElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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(); |
| |
| String get href native; |
| |
| set href(String value) native; |
| |
| String get target native; |
| |
| set target(String 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. |
| |
| @Native("BatteryManager") |
| class BatteryManager extends EventTarget { |
| // To suppress missing implicit constructor warnings. |
| factory BatteryManager._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| bool? get charging native; |
| |
| num? get chargingTime native; |
| |
| num? get dischargingTime native; |
| |
| num? get level 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. |
| |
| @Native("BeforeInstallPromptEvent") |
| class BeforeInstallPromptEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory BeforeInstallPromptEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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 native; |
| |
| Future<Map<String, dynamic>?> get userChoice => |
| promiseToFutureAsMap(JS("", "#.userChoice", this)); |
| |
| Future prompt() => promiseToFuture(JS("", "#.prompt()", 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. |
| |
| @Native("BeforeUnloadEvent") |
| class BeforeUnloadEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory BeforeUnloadEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| // Shadowing definition. |
| |
| String? get returnValue native; |
| |
| set returnValue(String? 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. |
| |
| @Native("Blob") |
| class Blob extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Blob._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| int get size native; |
| |
| String get type native; |
| |
| 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. |
| |
| // WARNING: Do not edit - generated code. |
| |
| typedef void BlobCallback(Blob? blob); |
| // 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. |
| |
| @Native("BlobEvent") |
| class BlobEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory BlobEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory BlobEvent(String type, Map eventInitDict) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return BlobEvent._create_1(type, eventInitDict_1); |
| } |
| static BlobEvent _create_1(type, eventInitDict) => |
| JS('BlobEvent', 'new BlobEvent(#,#)', type, eventInitDict); |
| |
| Blob? get data native; |
| |
| num? get timecode 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. |
| |
| @Native("BluetoothRemoteGATTDescriptor") |
| class BluetoothRemoteGattDescriptor extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BluetoothRemoteGattDescriptor._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| _BluetoothRemoteGATTCharacteristic? get characteristic native; |
| |
| String? get uuid native; |
| |
| ByteData? get value native; |
| |
| Future readValue() => promiseToFuture(JS("", "#.readValue()", this)); |
| |
| Future writeValue(/*BufferSource*/ value) => |
| promiseToFuture(JS("", "#.writeValue(#)", 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. |
| |
| @Native("Body") |
| class Body extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Body._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| bool? get bodyUsed native; |
| |
| Future arrayBuffer() => promiseToFuture(JS("", "#.arrayBuffer()", this)); |
| |
| Future<Blob> blob() => |
| promiseToFuture<Blob>(JS("creates:Blob;", "#.blob()", this)); |
| |
| Future<FormData> formData() => |
| promiseToFuture<FormData>(JS("creates:FormData;", "#.formData()", this)); |
| |
| Future json() => promiseToFuture(JS("", "#.json()", this)); |
| |
| Future<String> text() => promiseToFuture<String>(JS("", "#.text()", 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. |
| |
| @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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<Event> resizeEvent = |
| const EventStreamProvider<Event>('resize'); |
| |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<Event> unloadEvent = |
| const EventStreamProvider<Event>('unload'); |
| |
| factory BodyElement() => JS<BodyElement>( |
| 'returns:BodyElement;creates:BodyElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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]. |
| ElementStream<Event> get onBlur => blurEvent.forElement(this); |
| |
| /// Stream of `error` events handled by this [BodyElement]. |
| ElementStream<Event> get onError => errorEvent.forElement(this); |
| |
| /// Stream of `focus` events handled by this [BodyElement]. |
| ElementStream<Event> get onFocus => focusEvent.forElement(this); |
| |
| /// Stream of `hashchange` events handled by this [BodyElement]. |
| ElementStream<Event> get onHashChange => hashChangeEvent.forElement(this); |
| |
| /// Stream of `load` events handled by this [BodyElement]. |
| ElementStream<Event> get onLoad => loadEvent.forElement(this); |
| |
| /// Stream of `message` events handled by this [BodyElement]. |
| ElementStream<MessageEvent> get onMessage => messageEvent.forElement(this); |
| |
| /// Stream of `offline` events handled by this [BodyElement]. |
| ElementStream<Event> get onOffline => offlineEvent.forElement(this); |
| |
| /// Stream of `online` events handled by this [BodyElement]. |
| ElementStream<Event> get onOnline => onlineEvent.forElement(this); |
| |
| /// Stream of `popstate` events handled by this [BodyElement]. |
| ElementStream<PopStateEvent> get onPopState => popStateEvent.forElement(this); |
| |
| /// Stream of `resize` events handled by this [BodyElement]. |
| ElementStream<Event> get onResize => resizeEvent.forElement(this); |
| |
| ElementStream<Event> get onScroll => scrollEvent.forElement(this); |
| |
| /// Stream of `storage` events handled by this [BodyElement]. |
| ElementStream<StorageEvent> get onStorage => storageEvent.forElement(this); |
| |
| /// Stream of `unload` events handled by this [BodyElement]. |
| 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. |
| |
| @Native("BroadcastChannel") |
| class BroadcastChannel extends EventTarget { |
| // To suppress missing implicit constructor warnings. |
| factory BroadcastChannel._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| static const EventStreamProvider<MessageEvent> messageEvent = |
| const EventStreamProvider<MessageEvent>('message'); |
| |
| factory BroadcastChannel(String name) { |
| return BroadcastChannel._create_1(name); |
| } |
| static BroadcastChannel _create_1(name) => |
| JS('BroadcastChannel', 'new BroadcastChannel(#)', name); |
| |
| String? get name native; |
| |
| void close() native; |
| |
| void postMessage(Object message) native; |
| |
| 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. |
| |
| @Native("BudgetState") |
| class BudgetState extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory BudgetState._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| num? get budgetAt native; |
| |
| int? get time 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. |
| |
| @Native("HTMLButtonElement") |
| class ButtonElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory ButtonElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory ButtonElement() => JS<ButtonElement>( |
| 'returns:ButtonElement;creates:ButtonElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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(); |
| |
| bool get autofocus native; |
| |
| set autofocus(bool value) native; |
| |
| bool get disabled native; |
| |
| set disabled(bool value) native; |
| |
| FormElement? get form native; |
| |
| String? get formAction native; |
| |
| set formAction(String? value) native; |
| |
| String? get formEnctype native; |
| |
| set formEnctype(String? value) native; |
| |
| String? get formMethod native; |
| |
| set formMethod(String? value) native; |
| |
| bool get formNoValidate native; |
| |
| set formNoValidate(bool value) native; |
| |
| String get formTarget native; |
| |
| set formTarget(String value) native; |
| |
| @Unstable() |
| @Returns('NodeList') |
| @Creates('NodeList') |
| List<Node>? get labels native; |
| |
| String get name native; |
| |
| set name(String value) native; |
| |
| String get type native; |
| |
| set type(String value) native; |
| |
| String get validationMessage native; |
| |
| ValidityState get validity native; |
| |
| String get value native; |
| |
| set value(String value) native; |
| |
| bool get willValidate native; |
| |
| bool checkValidity() native; |
| |
| bool reportValidity() native; |
| |
| 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. |
| |
| // 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. |
| |
| @Native("CacheStorage") |
| class CacheStorage extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CacheStorage._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| Future delete(String cacheName) => |
| promiseToFuture(JS("", "#.delete(#)", this, cacheName)); |
| |
| Future has(String cacheName) => |
| promiseToFuture(JS("", "#.has(#)", this, cacheName)); |
| |
| Future keys() => promiseToFuture(JS("", "#.keys()", this)); |
| |
| Future match(/*RequestInfo*/ request, [Map? options]) { |
| var options_dict = null; |
| if (options != null) { |
| options_dict = convertDartToNative_Dictionary(options); |
| } |
| return promiseToFuture( |
| JS("creates:_Response;", "#.match(#, #)", this, request, options_dict)); |
| } |
| |
| Future open(String cacheName) => |
| promiseToFuture(JS("creates:_Cache;", "#.open(#)", this, cacheName)); |
| } |
| // 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. |
| |
| @Native("CanMakePaymentEvent") |
| class CanMakePaymentEvent extends ExtendableEvent { |
| // To suppress missing implicit constructor warnings. |
| factory CanMakePaymentEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CanMakePaymentEvent(String type, Map eventInitDict) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return CanMakePaymentEvent._create_1(type, eventInitDict_1); |
| } |
| static CanMakePaymentEvent _create_1(type, eventInitDict) => JS( |
| 'CanMakePaymentEvent', |
| 'new CanMakePaymentEvent(#,#)', |
| type, |
| eventInitDict); |
| |
| List? get methodData native; |
| |
| List? get modifiers native; |
| |
| String? get paymentRequestOrigin native; |
| |
| String? get topLevelOrigin native; |
| |
| void respondWith(Future canMakePaymentResponse) 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. |
| |
| @Native("CanvasCaptureMediaStreamTrack") |
| class CanvasCaptureMediaStreamTrack extends MediaStreamTrack { |
| // To suppress missing implicit constructor warnings. |
| factory CanvasCaptureMediaStreamTrack._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| CanvasElement? get canvas native; |
| |
| void requestFrame() 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. |
| |
| @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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<gl.ContextEvent> webGlContextRestoredEvent = |
| const EventStreamProvider<gl.ContextEvent>('webglcontextrestored'); |
| |
| factory CanvasElement({int? width, int? height}) { |
| CanvasElement e = JS<CanvasElement>( |
| 'returns:CanvasElement;creates:CanvasElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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. |
| |
| int? get height native; |
| |
| set height(int? value) native; |
| |
| /// The width of this canvas element in CSS pixels. |
| |
| int? get width native; |
| |
| set width(int? value) native; |
| |
| MediaStream captureStream([num? frameRate]) native; |
| |
| @Creates('CanvasRenderingContext2D|RenderingContext|RenderingContext2') |
| @Returns('CanvasRenderingContext2D|RenderingContext|RenderingContext2|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') |
| @Creates('CanvasRenderingContext2D|RenderingContext|RenderingContext2') |
| @Returns('CanvasRenderingContext2D|RenderingContext|RenderingContext2|Null') |
| Object? _getContext_1(contextId, attributes) native; |
| @JSName('getContext') |
| @Creates('CanvasRenderingContext2D|RenderingContext|RenderingContext2') |
| @Returns('CanvasRenderingContext2D|RenderingContext|RenderingContext2|Null') |
| Object? _getContext_2(contextId) native; |
| |
| @JSName('toDataURL') |
| String _toDataUrl(String? type, [arguments_OR_quality]) native; |
| |
| OffscreenCanvas transferControlToOffscreen() native; |
| |
| /// Stream of `webglcontextlost` events handled by this [CanvasElement]. |
| ElementStream<gl.ContextEvent> get onWebGlContextLost => |
| webGlContextLostEvent.forElement(this); |
| |
| /// Stream of `webglcontextrestored` events handled by this [CanvasElement]. |
| 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) |
| 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 as gl.RenderingContext?; |
| } |
| |
| /** |
| * 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); |
| |
| @JSName('toBlob') |
| void _toBlob(BlobCallback callback, [String? type, Object? arguments]) native; |
| |
| Future<Blob> toBlob([String? type, Object? arguments]) { |
| var completer = new Completer<Blob>(); |
| _toBlob((value) { |
| completer.complete(value); |
| }, type, arguments); |
| 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. |
| |
| /** |
| * An opaque canvas object representing a gradient. |
| * |
| * Created by calling the methods |
| * [CanvasRenderingContext2D.createLinearGradient] or |
| * [CanvasRenderingContext2D.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. |
| */ |
| @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. |
| */ |
| 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. |
| |
| /** |
| * An opaque object representing a pattern of image, canvas, or video. |
| * |
| * Created by calling [CanvasRenderingContext2D.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. |
| */ |
| @Native("CanvasPattern") |
| class CanvasPattern extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CanvasPattern._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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; |
| } |
| |
| @Native("CanvasRenderingContext2D") |
| class CanvasRenderingContext2D extends Interceptor |
| implements CanvasRenderingContext { |
| // To suppress missing implicit constructor warnings. |
| factory CanvasRenderingContext2D._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| CanvasElement get canvas native; |
| |
| Matrix? get currentTransform native; |
| |
| set currentTransform(Matrix? value) native; |
| |
| String? get direction native; |
| |
| set direction(String? value) native; |
| |
| @Creates('String|CanvasGradient|CanvasPattern') |
| @Returns('String|CanvasGradient|CanvasPattern') |
| Object? get fillStyle native; |
| |
| set fillStyle(Object? value) native; |
| |
| String? get filter native; |
| |
| set filter(String? value) native; |
| |
| String get font native; |
| |
| set font(String value) native; |
| |
| num get globalAlpha native; |
| |
| set globalAlpha(num value) native; |
| |
| String get globalCompositeOperation native; |
| |
| set globalCompositeOperation(String value) native; |
| |
| /** |
| * 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. |
| */ |
| |
| bool? get imageSmoothingEnabled native; |
| |
| set imageSmoothingEnabled(bool? value) native; |
| |
| String? get imageSmoothingQuality native; |
| |
| set imageSmoothingQuality(String? value) native; |
| |
| String get lineCap native; |
| |
| set lineCap(String value) native; |
| |
| String get lineJoin native; |
| |
| set lineJoin(String value) native; |
| |
| num get lineWidth native; |
| |
| set lineWidth(num value) native; |
| |
| num get miterLimit native; |
| |
| set miterLimit(num value) native; |
| |
| num get shadowBlur native; |
| |
| set shadowBlur(num value) native; |
| |
| String get shadowColor native; |
| |
| set shadowColor(String value) native; |
| |
| num get shadowOffsetX native; |
| |
| set shadowOffsetX(num value) native; |
| |
| num get shadowOffsetY native; |
| |
| set shadowOffsetY(num value) native; |
| |
| @Creates('String|CanvasGradient|CanvasPattern') |
| @Returns('String|CanvasGradient|CanvasPattern') |
| Object? get strokeStyle native; |
| |
| set strokeStyle(Object? value) native; |
| |
| String get textAlign native; |
| |
| set textAlign(String value) native; |
| |
| String get textBaseline native; |
| |
| set textBaseline(String value) native; |
| |
| void addHitRegion([Map? options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| _addHitRegion_1(options_1); |
| return; |
| } |
| _addHitRegion_2(); |
| return; |
| } |
| |
| @JSName('addHitRegion') |
| void _addHitRegion_1(options) native; |
| @JSName('addHitRegion') |
| void _addHitRegion_2() native; |
| |
| void beginPath() native; |
| |
| void clearHitRegions() native; |
| |
| void clearRect(num x, num y, num width, num height) native; |
| |
| void clip([path_OR_winding, String? winding]) native; |
| |
| @Creates('ImageData|=Object') |
| ImageData createImageData(data_OR_imagedata_OR_sw, |
| [int? sh_OR_sw, |
| imageDataColorSettings_OR_sh, |
| Map? imageDataColorSettings]) { |
| if ((data_OR_imagedata_OR_sw is ImageData) && |
| sh_OR_sw == null && |
| imageDataColorSettings_OR_sh == null && |
| imageDataColorSettings == null) { |
| var imagedata_1 = convertDartToNative_ImageData(data_OR_imagedata_OR_sw); |
| return convertNativeToDart_ImageData(_createImageData_1(imagedata_1)); |
| } |
| if (sh_OR_sw != null && |
| (data_OR_imagedata_OR_sw is int) && |
| imageDataColorSettings_OR_sh == null && |
| imageDataColorSettings == null) { |
| return convertNativeToDart_ImageData( |
| _createImageData_2(data_OR_imagedata_OR_sw, sh_OR_sw)); |
| } |
| if ((imageDataColorSettings_OR_sh is Map) && |
| sh_OR_sw != null && |
| (data_OR_imagedata_OR_sw is int) && |
| imageDataColorSettings == null) { |
| var imageDataColorSettings_1 = |
| convertDartToNative_Dictionary(imageDataColorSettings_OR_sh); |
| return convertNativeToDart_ImageData(_createImageData_3( |
| data_OR_imagedata_OR_sw, sh_OR_sw, imageDataColorSettings_1)); |
| } |
| if ((imageDataColorSettings_OR_sh is int) && |
| sh_OR_sw != null && |
| data_OR_imagedata_OR_sw != null && |
| imageDataColorSettings == null) { |
| return convertNativeToDart_ImageData(_createImageData_4( |
| data_OR_imagedata_OR_sw, sh_OR_sw, imageDataColorSettings_OR_sh)); |
| } |
| if (imageDataColorSettings != null && |
| (imageDataColorSettings_OR_sh is int) && |
| sh_OR_sw != null && |
| data_OR_imagedata_OR_sw != null) { |
| var imageDataColorSettings_1 = |
| convertDartToNative_Dictionary(imageDataColorSettings); |
| return convertNativeToDart_ImageData(_createImageData_5( |
| data_OR_imagedata_OR_sw, |
| sh_OR_sw, |
| imageDataColorSettings_OR_sh, |
| imageDataColorSettings_1)); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| |
| @JSName('createImageData') |
| @Creates('ImageData|=Object') |
| _createImageData_1(imagedata) native; |
| @JSName('createImageData') |
| @Creates('ImageData|=Object') |
| _createImageData_2(int sw, sh) native; |
| @JSName('createImageData') |
| @Creates('ImageData|=Object') |
| _createImageData_3(int sw, sh, imageDataColorSettings) native; |
| @JSName('createImageData') |
| @Creates('ImageData|=Object') |
| _createImageData_4(data, sw, int? sh) native; |
| @JSName('createImageData') |
| @Creates('ImageData|=Object') |
| _createImageData_5(data, sw, int? sh, imageDataColorSettings) native; |
| |
| CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native; |
| |
| CanvasPattern? createPattern(Object image, String repetitionType) native; |
| |
| CanvasGradient createRadialGradient( |
| num x0, num y0, num r0, num x1, num y1, num r1) native; |
| |
| void drawFocusIfNeeded(element_OR_path, [Element? element]) native; |
| |
| void fill([path_OR_winding, String? winding]) native; |
| |
| void fillRect(num x, num y, num width, num height) native; |
| |
| Map getContextAttributes() { |
| return convertNativeToDart_Dictionary(_getContextAttributes_1())!; |
| } |
| |
| @JSName('getContextAttributes') |
| _getContextAttributes_1() native; |
| |
| @Creates('ImageData|=Object') |
| ImageData getImageData(int sx, int sy, int sw, int sh) { |
| return convertNativeToDart_ImageData(_getImageData_1(sx, sy, sw, sh)); |
| } |
| |
| @JSName('getImageData') |
| @Creates('ImageData|=Object') |
| _getImageData_1(sx, sy, sw, sh) native; |
| |
| @JSName('getLineDash') |
| List<num> _getLineDash() native; |
| |
| bool isContextLost() native; |
| |
| bool isPointInPath(path_OR_x, num x_OR_y, [winding_OR_y, String? winding]) |
| native; |
| |
| bool isPointInStroke(path_OR_x, num x_OR_y, [num? y]) native; |
| |
| TextMetrics measureText(String text) native; |
| |
| void putImageData(ImageData imagedata, int dx, int dy, |
| [int? dirtyX, int? dirtyY, int? dirtyWidth, int? 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') |
| void _putImageData_1(imagedata, dx, dy) native; |
| @JSName('putImageData') |
| void _putImageData_2( |
| imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native; |
| |
| void removeHitRegion(String id) native; |
| |
| void resetTransform() native; |
| |
| void restore() native; |
| |
| void rotate(num angle) native; |
| |
| void save() native; |
| |
| void scale(num x, num y) native; |
| |
| void scrollPathIntoView([Path2D? path]) native; |
| |
| void setTransform(num a, num b, num c, num d, num e, num f) native; |
| |
| void stroke([Path2D? path]) native; |
| |
| void strokeRect(num x, num y, num width, num height) native; |
| |
| void strokeText(String text, num x, num y, [num? maxWidth]) native; |
| |
| void transform(num a, num b, num c, num d, num e, num f) native; |
| |
| void translate(num x, num y) native; |
| |
| // From CanvasPath |
| |
| @JSName('arc') |
| void _arc(num x, num y, num radius, num startAngle, num endAngle, |
| bool? anticlockwise) native; |
| |
| void arcTo(num x1, num y1, num x2, num y2, num radius) native; |
| |
| void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) |
| native; |
| |
| void closePath() native; |
| |
| void ellipse(num x, num y, num radiusX, num radiusY, num rotation, |
| num startAngle, num endAngle, bool? anticlockwise) native; |
| |
| void lineTo(num x, num y) native; |
| |
| void moveTo(num x, num y) native; |
| |
| void quadraticCurveTo(num cpx, num cpy, num x, num y) native; |
| |
| void rect(num x, num y, num width, num height) native; |
| |
| 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)'; |
| } |
| |
| 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); |
| } |
| |
| 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. |
| */ |
| 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. |
| */ |
| @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. |
| */ |
| @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. |
| */ |
| @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() |
| // 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() |
| // 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() |
| 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); |
| } |
| return []; |
| } |
| |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @SupportedBrowser(SupportedBrowser.IE, '11') |
| @Unstable() |
| 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. |
| */ |
| 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); |
| } |
| } |
| |
| /** Deprecated always returns 1.0 */ |
| @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. |
| |
| @Native("CharacterData") |
| class CharacterData extends Node |
| implements NonDocumentTypeChildNode, ChildNode { |
| // To suppress missing implicit constructor warnings. |
| factory CharacterData._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get data native; |
| |
| set data(String? value) native; |
| |
| int? get length native; |
| |
| void appendData(String data) native; |
| |
| void deleteData(int offset, int count) native; |
| |
| void insertData(int offset, String data) native; |
| |
| void replaceData(int offset, int count, String data) native; |
| |
| String substringData(int offset, int count) native; |
| |
| // From ChildNode |
| |
| void after(Object nodes) native; |
| |
| void before(Object nodes) native; |
| |
| // From NonDocumentTypeChildNode |
| |
| Element? get nextElementSibling native; |
| |
| Element? get previousElementSibling 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 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. |
| |
| @Native("Client") |
| class Client extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Client._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get frameType native; |
| |
| String? get id native; |
| |
| String? get type native; |
| |
| String? get url native; |
| |
| void postMessage(Object message, [List<Object>? transfer]) 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. |
| |
| @Native("Clients") |
| class Clients extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Clients._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| Future claim() => promiseToFuture(JS("", "#.claim()", this)); |
| |
| Future get(String id) => promiseToFuture(JS("", "#.get(#)", this, id)); |
| |
| Future<List<dynamic>> matchAll([Map? options]) { |
| var options_dict = null; |
| if (options != null) { |
| options_dict = convertDartToNative_Dictionary(options); |
| } |
| return promiseToFuture<List<dynamic>>( |
| JS("", "#.matchAll(#)", this, options_dict)); |
| } |
| |
| Future<WindowClient> openWindow(String url) => promiseToFuture<WindowClient>( |
| JS("creates:WindowClient;", "#.openWindow(#)", this, url)); |
| } |
| // 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. |
| |
| @Native("ClipboardEvent") |
| class ClipboardEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory ClipboardEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory ClipboardEvent(String type, [Map? eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return ClipboardEvent._create_1(type, eventInitDict_1); |
| } |
| return ClipboardEvent._create_2(type); |
| } |
| static ClipboardEvent _create_1(type, eventInitDict) => |
| JS('ClipboardEvent', 'new ClipboardEvent(#,#)', type, eventInitDict); |
| static ClipboardEvent _create_2(type) => |
| JS('ClipboardEvent', 'new ClipboardEvent(#)', type); |
| |
| DataTransfer? get clipboardData 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. |
| |
| @Native("CloseEvent") |
| class CloseEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory CloseEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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); |
| |
| int? get code native; |
| |
| String? get reason native; |
| |
| bool? get wasClean 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. |
| |
| @Native("Comment") |
| class Comment extends CharacterData { |
| factory Comment([String? data]) { |
| return JS('returns:Comment;depends:none;effects:none;new:true', |
| '#.createComment(#)', document, data == null ? "" : data); |
| } |
| // 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. |
| |
| @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") as 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; |
| } |
| |
| 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); |
| |
| String? get data native; |
| |
| @JSName('initCompositionEvent') |
| 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. |
| |
| @SupportedBrowser(SupportedBrowser.CHROME, '26') |
| @Native("HTMLContentElement") |
| class ContentElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory ContentElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory ContentElement() => |
| document.createElement("content") as ContentElement; |
| /** |
| * 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'); |
| |
| String? get select native; |
| |
| set select(String? value) native; |
| |
| @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. |
| |
| @Native("CookieStore") |
| class CookieStore extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CookieStore._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| Future getAll([Map? options]) { |
| var options_dict = null; |
| if (options != null) { |
| options_dict = convertDartToNative_Dictionary(options); |
| } |
| return promiseToFuture(JS("", "#.getAll(#)", this, options_dict)); |
| } |
| |
| Future set(String name, String value, [Map? options]) { |
| var options_dict = null; |
| if (options != null) { |
| options_dict = convertDartToNative_Dictionary(options); |
| } |
| return promiseToFuture( |
| JS("", "#.set(#, #, #)", this, name, value, options_dict)); |
| } |
| } |
| // 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. |
| |
| @Native("Coordinates") |
| class Coordinates extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Coordinates._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| num? get accuracy native; |
| |
| num? get altitude native; |
| |
| num? get altitudeAccuracy native; |
| |
| num? get heading native; |
| |
| num? get latitude native; |
| |
| num? get longitude native; |
| |
| num? get speed 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. |
| |
| @Native("Credential") |
| class Credential extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Credential._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get id native; |
| |
| String? get 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. |
| |
| @Native("CredentialUserData") |
| class CredentialUserData extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CredentialUserData._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('iconURL') |
| String? get iconUrl native; |
| |
| String? get 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. |
| |
| @Native("CredentialsContainer") |
| class CredentialsContainer extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CredentialsContainer._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| Future create([Map? options]) { |
| var options_dict = null; |
| if (options != null) { |
| options_dict = convertDartToNative_Dictionary(options); |
| } |
| return promiseToFuture( |
| JS("creates:Credential;", "#.create(#)", this, options_dict)); |
| } |
| |
| Future get([Map? options]) { |
| var options_dict = null; |
| if (options != null) { |
| options_dict = convertDartToNative_Dictionary(options); |
| } |
| return promiseToFuture( |
| JS("creates:Credential;", "#.get(#)", this, options_dict)); |
| } |
| |
| Future preventSilentAccess() => |
| promiseToFuture(JS("", "#.preventSilentAccess()", this)); |
| |
| Future requireUserMediation() => |
| promiseToFuture(JS("", "#.requireUserMediation()", this)); |
| |
| Future store(Credential credential) => promiseToFuture( |
| JS("creates:Credential;", "#.store(#)", this, credential)); |
| } |
| // 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. |
| |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @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)'); |
| |
| _SubtleCrypto? get subtle native; |
| |
| @JSName('getRandomValues') |
| @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. |
| |
| @Native("CryptoKey") |
| class CryptoKey extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CryptoKey._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @Creates('Null') |
| Object? get algorithm native; |
| |
| bool? get extractable native; |
| |
| String? get type native; |
| |
| Object? get usages 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. |
| |
| @Native("CSS") |
| class Css extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Css._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| static _Worklet? get paintWorklet native; |
| |
| static CssUnitValue Hz(num value) native; |
| |
| static CssUnitValue ch(num value) native; |
| |
| static CssUnitValue cm(num value) native; |
| |
| static CssUnitValue deg(num value) native; |
| |
| static CssUnitValue dpcm(num value) native; |
| |
| static CssUnitValue dpi(num value) native; |
| |
| static CssUnitValue dppx(num value) native; |
| |
| static CssUnitValue em(num value) native; |
| |
| static String escape(String ident) native; |
| |
| static CssUnitValue ex(num value) native; |
| |
| static CssUnitValue fr(num value) native; |
| |
| static CssUnitValue grad(num value) native; |
| |
| @JSName('in') |
| static CssUnitValue inch(num value) native; |
| |
| static CssUnitValue kHz(num value) native; |
| |
| static CssUnitValue mm(num value) native; |
| |
| static CssUnitValue ms(num value) native; |
| |
| static CssUnitValue number(num value) native; |
| |
| static CssUnitValue pc(num value) native; |
| |
| static CssUnitValue percent(num value) native; |
| |
| static CssUnitValue pt(num value) native; |
| |
| static CssUnitValue px(num value) native; |
| |
| static CssUnitValue rad(num value) native; |
| |
| static void registerProperty(Map descriptor) { |
| var descriptor_1 = convertDartToNative_Dictionary(descriptor); |
| _registerProperty_1(descriptor_1); |
| return; |
| } |
| |
| @JSName('registerProperty') |
| static void _registerProperty_1(descriptor) native; |
| |
| static CssUnitValue rem(num value) native; |
| |
| static CssUnitValue s(num value) native; |
| |
| static bool supports(String property, String value) native; |
| |
| @JSName('supports') |
| static bool supportsCondition(String conditionText) native; |
| |
| static CssUnitValue turn(num value) native; |
| |
| static CssUnitValue vh(num value) native; |
| |
| static CssUnitValue vmax(num value) native; |
| |
| static CssUnitValue vmin(num value) native; |
| |
| static CssUnitValue vw(num 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. |
| |
| @Native("CSSCharsetRule") |
| class CssCharsetRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssCharsetRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get encoding native; |
| |
| set encoding(String? 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. |
| |
| @Native("CSSConditionRule") |
| class CssConditionRule extends CssGroupingRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssConditionRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get 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. |
| |
| @Native("CSSFontFaceRule") |
| class CssFontFaceRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssFontFaceRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| CssStyleDeclaration? get style 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. |
| |
| @Native("CSSGroupingRule") |
| class CssGroupingRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssGroupingRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| List<CssRule>? get cssRules native; |
| |
| void deleteRule(int index) native; |
| |
| 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. |
| |
| @Native("CSSImageValue") |
| class CssImageValue extends CssResourceValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssImageValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| num? get intrinsicHeight native; |
| |
| num? get intrinsicRatio native; |
| |
| num? get intrinsicWidth 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. |
| |
| @Native("CSSImportRule") |
| class CssImportRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssImportRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get href native; |
| |
| MediaList? get media native; |
| |
| CssStyleSheet? get styleSheet 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. |
| |
| @Native("CSSKeyframeRule,MozCSSKeyframeRule,WebKitCSSKeyframeRule") |
| class CssKeyframeRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssKeyframeRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get keyText native; |
| |
| set keyText(String? value) native; |
| |
| CssStyleDeclaration? get style 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. |
| |
| @Native("CSSKeyframesRule,MozCSSKeyframesRule,WebKitCSSKeyframesRule") |
| class CssKeyframesRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssKeyframesRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| List<CssRule>? get cssRules native; |
| |
| String? get name native; |
| |
| set name(String? value) native; |
| |
| CssKeyframeRule __getter__(int index) native; |
| |
| void appendRule(String rule) native; |
| |
| void deleteRule(String select) native; |
| |
| 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. |
| |
| @Native("CSSKeywordValue") |
| class CssKeywordValue extends CssStyleValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssKeywordValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssKeywordValue(String keyword) { |
| return CssKeywordValue._create_1(keyword); |
| } |
| static CssKeywordValue _create_1(keyword) => |
| JS('CssKeywordValue', 'new CSSKeywordValue(#)', keyword); |
| |
| String? get value native; |
| |
| set value(String? 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. |
| |
| @Native("CSSMatrixComponent") |
| class CssMatrixComponent extends CssTransformComponent { |
| // To suppress missing implicit constructor warnings. |
| factory CssMatrixComponent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssMatrixComponent(DomMatrixReadOnly matrix, [Map? options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| return CssMatrixComponent._create_1(matrix, options_1); |
| } |
| return CssMatrixComponent._create_2(matrix); |
| } |
| static CssMatrixComponent _create_1(matrix, options) => |
| JS('CssMatrixComponent', 'new CSSMatrixComponent(#,#)', matrix, options); |
| static CssMatrixComponent _create_2(matrix) => |
| JS('CssMatrixComponent', 'new CSSMatrixComponent(#)', matrix); |
| |
| DomMatrix? get matrix native; |
| |
| set matrix(DomMatrix? 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. |
| |
| @Native("CSSMediaRule") |
| class CssMediaRule extends CssConditionRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssMediaRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| MediaList? get media 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. |
| |
| @Native("CSSNamespaceRule") |
| class CssNamespaceRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssNamespaceRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('namespaceURI') |
| String? get namespaceUri native; |
| |
| String? get prefix 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. |
| |
| @Native("CSSNumericValue") |
| class CssNumericValue extends CssStyleValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssNumericValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| CssNumericValue add(CssNumericValue value) native; |
| |
| CssNumericValue div(num value) native; |
| |
| CssNumericValue mul(num value) native; |
| |
| static CssNumericValue parse(String cssText) native; |
| |
| CssNumericValue sub(CssNumericValue value) native; |
| |
| CssNumericValue to(String unit) 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. |
| |
| @Native("CSSPageRule") |
| class CssPageRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssPageRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get selectorText native; |
| |
| set selectorText(String? value) native; |
| |
| CssStyleDeclaration? get style 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. |
| |
| @Native("CSSPerspective") |
| class CssPerspective extends CssTransformComponent { |
| // To suppress missing implicit constructor warnings. |
| factory CssPerspective._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssPerspective(CssNumericValue length) { |
| return CssPerspective._create_1(length); |
| } |
| static CssPerspective _create_1(length) => |
| JS('CssPerspective', 'new CSSPerspective(#)', length); |
| |
| CssNumericValue? get length native; |
| |
| set length(CssNumericValue? 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. |
| |
| @Native("CSSPositionValue") |
| class CssPositionValue extends CssStyleValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssPositionValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssPositionValue(CssNumericValue x, CssNumericValue y) { |
| return CssPositionValue._create_1(x, y); |
| } |
| static CssPositionValue _create_1(x, y) => |
| JS('CssPositionValue', 'new CSSPositionValue(#,#)', x, y); |
| |
| CssNumericValue? get x native; |
| |
| set x(CssNumericValue? value) native; |
| |
| CssNumericValue? get y native; |
| |
| set y(CssNumericValue? 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. |
| |
| @Native("CSSResourceValue") |
| class CssResourceValue extends CssStyleValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssResourceValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get state 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. |
| |
| @Native("CSSRotation") |
| class CssRotation extends CssTransformComponent { |
| // To suppress missing implicit constructor warnings. |
| factory CssRotation._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssRotation(angleValue_OR_x, |
| [num? y, num? z, CssNumericValue? angle]) { |
| if ((angleValue_OR_x is CssNumericValue) && |
| y == null && |
| z == null && |
| angle == null) { |
| return CssRotation._create_1(angleValue_OR_x); |
| } |
| if ((angle is CssNumericValue) && |
| (z is num) && |
| (y is num) && |
| (angleValue_OR_x is num)) { |
| return CssRotation._create_2(angleValue_OR_x, y, z, angle); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| static CssRotation _create_1(angleValue_OR_x) => |
| JS('CssRotation', 'new CSSRotation(#)', angleValue_OR_x); |
| static CssRotation _create_2(angleValue_OR_x, y, z, angle) => JS( |
| 'CssRotation', 'new CSSRotation(#,#,#,#)', angleValue_OR_x, y, z, angle); |
| |
| CssNumericValue? get angle native; |
| |
| set angle(CssNumericValue? value) native; |
| |
| num? get x native; |
| |
| set x(num? value) native; |
| |
| num? get y native; |
| |
| set y(num? value) native; |
| |
| num? get z native; |
| |
| set z(num? 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. |
| |
| @Native("CSSRule") |
| class CssRule extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CssRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| static const int CHARSET_RULE = 2; |
| |
| static const int FONT_FACE_RULE = 5; |
| |
| static const int IMPORT_RULE = 3; |
| |
| static const int KEYFRAMES_RULE = 7; |
| |
| static const int KEYFRAME_RULE = 8; |
| |
| static const int MEDIA_RULE = 4; |
| |
| static const int NAMESPACE_RULE = 10; |
| |
| static const int PAGE_RULE = 6; |
| |
| static const int STYLE_RULE = 1; |
| |
| static const int SUPPORTS_RULE = 12; |
| |
| static const int VIEWPORT_RULE = 15; |
| |
| String? get cssText native; |
| |
| set cssText(String? value) native; |
| |
| CssRule? get parentRule native; |
| |
| CssStyleSheet? get parentStyleSheet native; |
| |
| int? get 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. |
| |
| @Native("CSSScale") |
| class CssScale extends CssTransformComponent { |
| // To suppress missing implicit constructor warnings. |
| factory CssScale._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssScale(num x, num y, [num? z]) { |
| if ((y is num) && (x is num) && z == null) { |
| return CssScale._create_1(x, y); |
| } |
| if ((z is num) && (y is num) && (x is num)) { |
| return CssScale._create_2(x, y, z); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| static CssScale _create_1(x, y) => JS('CssScale', 'new CSSScale(#,#)', x, y); |
| static CssScale _create_2(x, y, z) => |
| JS('CssScale', 'new CSSScale(#,#,#)', x, y, z); |
| |
| num? get x native; |
| |
| set x(num? value) native; |
| |
| num? get y native; |
| |
| set y(num? value) native; |
| |
| num? get z native; |
| |
| set z(num? 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. |
| |
| @Native("CSSSkew") |
| class CssSkew extends CssTransformComponent { |
| // To suppress missing implicit constructor warnings. |
| factory CssSkew._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssSkew(CssNumericValue ax, CssNumericValue ay) { |
| return CssSkew._create_1(ax, ay); |
| } |
| static CssSkew _create_1(ax, ay) => JS('CssSkew', 'new CSSSkew(#,#)', ax, ay); |
| |
| CssNumericValue? get ax native; |
| |
| set ax(CssNumericValue? value) native; |
| |
| CssNumericValue? get ay native; |
| |
| set ay(CssNumericValue? value) native; |
| } |
| |
| // 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 |
| |
| @Native("CSSStyleDeclaration,MSStyleCSSProperties,CSS2Properties") |
| class CssStyleDeclaration extends Interceptor with CssStyleDeclarationBase { |
| factory CssStyleDeclaration() => new CssStyleDeclaration.css(''); |
| |
| factory CssStyleDeclaration.css(String css) { |
| final style = new DivElement().style; |
| style.cssText = css; |
| return style; |
| } |
| |
| /// Returns the value of the property if the provided *CSS* property |
| /// name is supported on this element and if the value is set. Otherwise |
| /// returns an empty string. |
| /// |
| /// Please note the property name uses camelCase, not-hyphens. |
| String getPropertyValue(String propertyName) { |
| return _getPropertyValueHelper(propertyName); |
| } |
| |
| String _getPropertyValueHelper(String propertyName) { |
| return _getPropertyValue(_browserPropertyName(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); |
| } |
| |
| 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; |
| name = _supportedBrowserPropertyName(propertyName); |
| _writeCache(propertyName, name); |
| return name; |
| } |
| |
| String _supportedBrowserPropertyName(String propertyName) { |
| if (_supportsProperty(_camelCase(propertyName))) { |
| return propertyName; |
| } |
| var prefixed = "${Device.cssPrefix}$propertyName"; |
| if (_supportsProperty(prefixed)) { |
| return prefixed; |
| } |
| // May be a CSS variable, just use it as provided. |
| return propertyName; |
| } |
| |
| 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,' |
| r'function(_, letter) { return 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"); |
| } |
| |
| String? get cssFloat native; |
| |
| set cssFloat(String? value) native; |
| |
| String? get cssText native; |
| |
| set cssText(String? value) native; |
| |
| int get length native; |
| |
| CssRule? get parentRule native; |
| |
| String getPropertyPriority(String property) native; |
| |
| @JSName('getPropertyValue') |
| String _getPropertyValue(String property) native; |
| |
| String item(int index) native; |
| |
| 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 get _background native; |
| |
| @JSName('background') |
| set _background(String value) native; |
| |
| /** 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 get _backgroundAttachment native; |
| |
| @JSName('backgroundAttachment') |
| set _backgroundAttachment(String value) native; |
| |
| /** 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 get _backgroundColor native; |
| |
| @JSName('backgroundColor') |
| set _backgroundColor(String value) native; |
| |
| /** 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 get _backgroundImage native; |
| |
| @JSName('backgroundImage') |
| set _backgroundImage(String value) native; |
| |
| /** 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 get _backgroundPosition native; |
| |
| @JSName('backgroundPosition') |
| set _backgroundPosition(String value) native; |
| |
| /** 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 get _backgroundRepeat native; |
| |
| @JSName('backgroundRepeat') |
| set _backgroundRepeat(String value) native; |
| |
| /** 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 get _border native; |
| |
| @JSName('border') |
| set _border(String value) native; |
| |
| /** 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 get _borderBottom native; |
| |
| @JSName('borderBottom') |
| set _borderBottom(String value) native; |
| |
| /** 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 get _borderBottomColor native; |
| |
| @JSName('borderBottomColor') |
| set _borderBottomColor(String value) native; |
| |
| /** 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 get _borderBottomStyle native; |
| |
| @JSName('borderBottomStyle') |
| set _borderBottomStyle(String value) native; |
| |
| /** 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 get _borderBottomWidth native; |
| |
| @JSName('borderBottomWidth') |
| set _borderBottomWidth(String value) native; |
| |
| /** 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 get _borderCollapse native; |
| |
| @JSName('borderCollapse') |
| set _borderCollapse(String value) native; |
| |
| /** 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 get _borderColor native; |
| |
| @JSName('borderColor') |
| set _borderColor(String value) native; |
| |
| /** 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 get _borderLeft native; |
| |
| @JSName('borderLeft') |
| set _borderLeft(String value) native; |
| |
| /** 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 get _borderLeftColor native; |
| |
| @JSName('borderLeftColor') |
| set _borderLeftColor(String value) native; |
| |
| /** 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 get _borderLeftStyle native; |
| |
| @JSName('borderLeftStyle') |
| set _borderLeftStyle(String value) native; |
| |
| /** 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 get _borderLeftWidth native; |
| |
| @JSName('borderLeftWidth') |
| set _borderLeftWidth(String value) native; |
| |
| /** 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 get _borderRight native; |
| |
| @JSName('borderRight') |
| set _borderRight(String value) native; |
| |
| /** 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 get _borderRightColor native; |
| |
| @JSName('borderRightColor') |
| set _borderRightColor(String value) native; |
| |
| /** 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 get _borderRightStyle native; |
| |
| @JSName('borderRightStyle') |
| set _borderRightStyle(String value) native; |
| |
| /** 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 get _borderRightWidth native; |
| |
| @JSName('borderRightWidth') |
| set _borderRightWidth(String value) native; |
| |
| /** 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 get _borderSpacing native; |
| |
| @JSName('borderSpacing') |
| set _borderSpacing(String value) native; |
| |
| /** 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 get _borderStyle native; |
| |
| @JSName('borderStyle') |
| set _borderStyle(String value) native; |
| |
| /** 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 get _borderTop native; |
| |
| @JSName('borderTop') |
| set _borderTop(String value) native; |
| |
| /** 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 get _borderTopColor native; |
| |
| @JSName('borderTopColor') |
| set _borderTopColor(String value) native; |
| |
| /** 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 get _borderTopStyle native; |
| |
| @JSName('borderTopStyle') |
| set _borderTopStyle(String value) native; |
| |
| /** 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 get _borderTopWidth native; |
| |
| @JSName('borderTopWidth') |
| set _borderTopWidth(String value) native; |
| |
| /** 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 get _borderWidth native; |
| |
| @JSName('borderWidth') |
| set _borderWidth(String value) native; |
| |
| /** 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 get _bottom native; |
| |
| @JSName('bottom') |
| set _bottom(String value) native; |
| |
| /** 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 get _captionSide native; |
| |
| @JSName('captionSide') |
| set _captionSide(String value) native; |
| |
| /** 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 get _clear native; |
| |
| @JSName('clear') |
| set _clear(String value) native; |
| |
| /** 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 get _clip native; |
| |
| @JSName('clip') |
| set _clip(String value) native; |
| |
| /** 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 get _color native; |
| |
| @JSName('color') |
| set _color(String value) native; |
| |
| /** 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 get _content native; |
| |
| @JSName('content') |
| set _content(String value) native; |
| |
| /** 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 get _cursor native; |
| |
| @JSName('cursor') |
| set _cursor(String value) native; |
| |
| /** 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 get _direction native; |
| |
| @JSName('direction') |
| set _direction(String value) native; |
| |
| /** 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 get _display native; |
| |
| @JSName('display') |
| set _display(String value) native; |
| |
| /** 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 get _emptyCells native; |
| |
| @JSName('emptyCells') |
| set _emptyCells(String value) native; |
| |
| /** 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 get _font native; |
| |
| @JSName('font') |
| set _font(String value) native; |
| |
| /** 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 get _fontFamily native; |
| |
| @JSName('fontFamily') |
| set _fontFamily(String value) native; |
| |
| /** 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 get _fontSize native; |
| |
| @JSName('fontSize') |
| set _fontSize(String value) native; |
| |
| /** 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 get _fontStyle native; |
| |
| @JSName('fontStyle') |
| set _fontStyle(String value) native; |
| |
| /** 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 get _fontVariant native; |
| |
| @JSName('fontVariant') |
| set _fontVariant(String value) native; |
| |
| /** 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 get _fontWeight native; |
| |
| @JSName('fontWeight') |
| set _fontWeight(String value) native; |
| |
| /** 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 get _height native; |
| |
| @JSName('height') |
| set _height(String value) native; |
| |
| /** 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 get _left native; |
| |
| @JSName('left') |
| set _left(String value) native; |
| |
| /** 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 get _letterSpacing native; |
| |
| @JSName('letterSpacing') |
| set _letterSpacing(String value) native; |
| |
| /** 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 get _lineHeight native; |
| |
| @JSName('lineHeight') |
| set _lineHeight(String value) native; |
| |
| /** 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 get _listStyle native; |
| |
| @JSName('listStyle') |
| set _listStyle(String value) native; |
| |
| /** 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 get _listStyleImage native; |
| |
| @JSName('listStyleImage') |
| set _listStyleImage(String value) native; |
| |
| /** 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 get _listStylePosition native; |
| |
| @JSName('listStylePosition') |
| set _listStylePosition(String value) native; |
| |
| /** 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 get _listStyleType native; |
| |
| @JSName('listStyleType') |
| set _listStyleType(String value) native; |
| |
| /** 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 get _margin native; |
| |
| @JSName('margin') |
| set _margin(String value) native; |
| |
| /** 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 get _marginBottom native; |
| |
| @JSName('marginBottom') |
| set _marginBottom(String value) native; |
| |
| /** 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 get _marginLeft native; |
| |
| @JSName('marginLeft') |
| set _marginLeft(String value) native; |
| |
| /** 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 get _marginRight native; |
| |
| @JSName('marginRight') |
| set _marginRight(String value) native; |
| |
| /** 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 get _marginTop native; |
| |
| @JSName('marginTop') |
| set _marginTop(String value) native; |
| |
| /** 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 get _maxHeight native; |
| |
| @JSName('maxHeight') |
| set _maxHeight(String value) native; |
| |
| /** 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 get _maxWidth native; |
| |
| @JSName('maxWidth') |
| set _maxWidth(String value) native; |
| |
| /** 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 get _minHeight native; |
| |
| @JSName('minHeight') |
| set _minHeight(String value) native; |
| |
| /** 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 get _minWidth native; |
| |
| @JSName('minWidth') |
| set _minWidth(String value) native; |
| |
| /** 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 get _outline native; |
| |
| @JSName('outline') |
| set _outline(String value) native; |
| |
| /** 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 get _outlineColor native; |
| |
| @JSName('outlineColor') |
| set _outlineColor(String value) native; |
| |
| /** 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 get _outlineStyle native; |
| |
| @JSName('outlineStyle') |
| set _outlineStyle(String value) native; |
| |
| /** 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 get _outlineWidth native; |
| |
| @JSName('outlineWidth') |
| set _outlineWidth(String value) native; |
| |
| /** 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 get _overflow native; |
| |
| @JSName('overflow') |
| set _overflow(String value) native; |
| |
| /** 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 get _padding native; |
| |
| @JSName('padding') |
| set _padding(String value) native; |
| |
| /** 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 get _paddingBottom native; |
| |
| @JSName('paddingBottom') |
| set _paddingBottom(String value) native; |
| |
| /** 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 get _paddingLeft native; |
| |
| @JSName('paddingLeft') |
| set _paddingLeft(String value) native; |
| |
| /** 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 get _paddingRight native; |
| |
| @JSName('paddingRight') |
| set _paddingRight(String value) native; |
| |
| /** 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 get _paddingTop native; |
| |
| @JSName('paddingTop') |
| set _paddingTop(String value) native; |
| |
| /** 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 get _pageBreakAfter native; |
| |
| @JSName('pageBreakAfter') |
| set _pageBreakAfter(String value) native; |
| |
| /** 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 get _pageBreakBefore native; |
| |
| @JSName('pageBreakBefore') |
| set _pageBreakBefore(String value) native; |
| |
| /** 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 get _pageBreakInside native; |
| |
| @JSName('pageBreakInside') |
| set _pageBreakInside(String value) native; |
| |
| /** 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 get _position native; |
| |
| @JSName('position') |
| set _position(String value) native; |
| |
| /** 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 get _quotes native; |
| |
| @JSName('quotes') |
| set _quotes(String value) native; |
| |
| /** 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 get _right native; |
| |
| @JSName('right') |
| set _right(String value) native; |
| |
| /** 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 get _tableLayout native; |
| |
| @JSName('tableLayout') |
| set _tableLayout(String value) native; |
| |
| /** 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 get _textAlign native; |
| |
| @JSName('textAlign') |
| set _textAlign(String value) native; |
| |
| /** 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 get _textDecoration native; |
| |
| @JSName('textDecoration') |
| set _textDecoration(String value) native; |
| |
| /** 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 get _textIndent native; |
| |
| @JSName('textIndent') |
| set _textIndent(String value) native; |
| |
| /** 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 get _textTransform native; |
| |
| @JSName('textTransform') |
| set _textTransform(String value) native; |
| |
| /** 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 get _top native; |
| |
| @JSName('top') |
| set _top(String value) native; |
| |
| /** 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 get _unicodeBidi native; |
| |
| @JSName('unicodeBidi') |
| set _unicodeBidi(String value) native; |
| |
| /** 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 get _verticalAlign native; |
| |
| @JSName('verticalAlign') |
| set _verticalAlign(String value) native; |
| |
| /** 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 get _visibility native; |
| |
| @JSName('visibility') |
| set _visibility(String value) native; |
| |
| /** 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 get _whiteSpace native; |
| |
| @JSName('whiteSpace') |
| set _whiteSpace(String value) native; |
| |
| /** 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 get _width native; |
| |
| @JSName('width') |
| set _width(String value) native; |
| |
| /** 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 get _wordSpacing native; |
| |
| @JSName('wordSpacing') |
| set _wordSpacing(String value) native; |
| |
| /** 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 get _zIndex native; |
| |
| @JSName('zIndex') |
| set _zIndex(String value) native; |
| } |
| |
| 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. |
| |
| @Native("CSSStyleRule") |
| class CssStyleRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssStyleRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String get selectorText native; |
| |
| set selectorText(String value) native; |
| |
| CssStyleDeclaration get style 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. |
| |
| @Native("CSSStyleSheet") |
| class CssStyleSheet extends StyleSheet { |
| // To suppress missing implicit constructor warnings. |
| factory CssStyleSheet._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| List<CssRule> get cssRules native; |
| |
| CssRule? get ownerRule native; |
| |
| @Returns('_CssRuleList') |
| @Creates('_CssRuleList') |
| List<CssRule>? get rules native; |
| |
| int addRule(String? selector, String? style, [int? index]) native; |
| |
| void deleteRule(int index) native; |
| |
| int insertRule(String rule, [int? index]) native; |
| |
| 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. |
| |
| @Native("CSSStyleValue") |
| class CssStyleValue extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CssStyleValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| static Object? parse(String property, String cssText) 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. |
| |
| @Native("CSSSupportsRule") |
| class CssSupportsRule extends CssConditionRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssSupportsRule._() { |
| 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. |
| |
| @Native("CSSTransformComponent") |
| class CssTransformComponent extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CssTransformComponent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| bool? get is2D native; |
| |
| set is2D(bool? 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. |
| |
| @Native("CSSTransformValue") |
| class CssTransformValue extends CssStyleValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssTransformValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssTransformValue( |
| [List<CssTransformComponent>? transformComponents]) { |
| if (transformComponents == null) { |
| return CssTransformValue._create_1(); |
| } |
| if ((transformComponents is List<CssTransformComponent>)) { |
| return CssTransformValue._create_2(transformComponents); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| static CssTransformValue _create_1() => |
| JS('CssTransformValue', 'new CSSTransformValue()'); |
| static CssTransformValue _create_2(transformComponents) => |
| JS('CssTransformValue', 'new CSSTransformValue(#)', transformComponents); |
| |
| bool? get is2D native; |
| |
| int? get length native; |
| |
| CssTransformComponent componentAtIndex(int index) native; |
| |
| DomMatrix toMatrix() 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. |
| |
| @Native("CSSTranslation") |
| class CssTranslation extends CssTransformComponent { |
| // To suppress missing implicit constructor warnings. |
| factory CssTranslation._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssTranslation(CssNumericValue x, CssNumericValue y, |
| [CssNumericValue? z]) { |
| if ((y is CssNumericValue) && (x is CssNumericValue) && z == null) { |
| return CssTranslation._create_1(x, y); |
| } |
| if ((z is CssNumericValue) && |
| (y is CssNumericValue) && |
| (x is CssNumericValue)) { |
| return CssTranslation._create_2(x, y, z); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |
| } |
| static CssTranslation _create_1(x, y) => |
| JS('CssTranslation', 'new CSSTranslation(#,#)', x, y); |
| static CssTranslation _create_2(x, y, z) => |
| JS('CssTranslation', 'new CSSTranslation(#,#,#)', x, y, z); |
| |
| CssNumericValue? get x native; |
| |
| set x(CssNumericValue? value) native; |
| |
| CssNumericValue? get y native; |
| |
| set y(CssNumericValue? value) native; |
| |
| CssNumericValue? get z native; |
| |
| set z(CssNumericValue? 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. |
| |
| @Native("CSSUnitValue") |
| class CssUnitValue extends CssNumericValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssUnitValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssUnitValue(num value, String unit) { |
| return CssUnitValue._create_1(value, unit); |
| } |
| static CssUnitValue _create_1(value, unit) => |
| JS('CssUnitValue', 'new CSSUnitValue(#,#)', value, unit); |
| |
| String? get type native; |
| |
| String? get unit native; |
| |
| set unit(String? value) native; |
| |
| num? get value native; |
| |
| set value(num? 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. |
| |
| @Native("CSSUnparsedValue") |
| class CssUnparsedValue extends CssStyleValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssUnparsedValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| int? get length native; |
| |
| Object? fragmentAtIndex(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. |
| |
| @Native("CSSVariableReferenceValue") |
| class CssVariableReferenceValue extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CssVariableReferenceValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| CssUnparsedValue? get fallback native; |
| |
| String? get variable 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. |
| |
| @Native("CSSViewportRule") |
| class CssViewportRule extends CssRule { |
| // To suppress missing implicit constructor warnings. |
| factory CssViewportRule._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| CssStyleDeclaration? get style 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. |
| |
| @Native("CSSURLImageValue") |
| class CssurlImageValue extends CssImageValue { |
| // To suppress missing implicit constructor warnings. |
| factory CssurlImageValue._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory CssurlImageValue(String url) { |
| return CssurlImageValue._create_1(url); |
| } |
| static CssurlImageValue _create_1(url) => |
| JS('CssurlImageValue', 'new CSSURLImageValue(#)', url); |
| |
| String? get 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. |
| |
| // WARNING: Do not edit - generated code. |
| |
| // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-custom-element-constructor-generation |
| @deprecated // experimental |
| typedef void CustomElementConstructor(); |
| // 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. |
| |
| @Native("CustomElementRegistry") |
| class CustomElementRegistry extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory CustomElementRegistry._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| void define(String name, Object constructor, [Map? options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| _define_1(name, constructor, options_1); |
| return; |
| } |
| _define_2(name, constructor); |
| return; |
| } |
| |
| @JSName('define') |
| void _define_1(name, constructor, options) native; |
| @JSName('define') |
| void _define_2(name, constructor) native; |
| |
| Object? get(String name) native; |
| |
| Future whenDefined(String name) => |
| promiseToFuture(JS("", "#.whenDefined(#)", this, 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. |
| |
| // WARNING: Do not edit - generated code. |
| |
| @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') as 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; |
| } |
| |
| get detail { |
| if (_dartDetail != null) { |
| return _dartDetail; |
| } |
| return _detail; |
| } |
| |
| 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); |
| |
| dynamic get _detail => |
| convertNativeToDart_SerializedScriptValue(this._get__detail); |
| @JSName('detail') |
| @Creates('Null') |
| dynamic get _get__detail native; |
| |
| @JSName('initCustomEvent') |
| 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. |
| |
| @Native("HTMLDListElement") |
| class DListElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DListElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DListElement() => JS<DListElement>( |
| 'returns:DListElement;creates:DListElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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. |
| |
| @Native("HTMLDataElement") |
| class DataElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DataElement._() { |
| 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. |
| */ |
| DataElement.created() : super.created(); |
| |
| String? get value native; |
| |
| set value(String? 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. |
| |
| @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"); |
| } |
| |
| factory DataListElement() => |
| document.createElement("datalist") as DataListElement; |
| /** |
| * 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'); |
| |
| @Returns('HtmlCollection') |
| @Creates('HtmlCollection') |
| List<Node>? get 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. |
| |
| @Native("DataTransfer") |
| class DataTransfer extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DataTransfer._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DataTransfer() { |
| return DataTransfer._create_1(); |
| } |
| static DataTransfer _create_1() => JS('DataTransfer', 'new DataTransfer()'); |
| |
| String? get dropEffect native; |
| |
| set dropEffect(String? value) native; |
| |
| String? get effectAllowed native; |
| |
| set effectAllowed(String? value) native; |
| |
| @Returns('FileList') |
| @Creates('FileList') |
| List<File>? get files native; |
| |
| DataTransferItemList? get items native; |
| |
| List<String>? get types native; |
| |
| void clearData([String? format]) native; |
| |
| String getData(String format) native; |
| |
| void setData(String format, String data) native; |
| |
| void setDragImage(Element image, int x, int y) native; |
| } |
| // Copyright (c) 2019, 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. |
| |
| @Native("DataTransferItem") |
| class DataTransferItem extends Interceptor { |
| Entry getAsEntry() { |
| Entry entry = _webkitGetAsEntry() as Entry; |
| |
| if (entry.isFile!) |
| applyExtension('FileEntry', entry); |
| else if (entry.isDirectory!) |
| applyExtension('DirectoryEntry', entry); |
| else |
| applyExtension('Entry', entry); |
| |
| return entry; |
| } |
| |
| // To suppress missing implicit constructor warnings. |
| factory DataTransferItem._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get kind native; |
| |
| String? get type native; |
| |
| File? getAsFile() native; |
| |
| @JSName('webkitGetAsEntry') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| Entry? _webkitGetAsEntry() 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. |
| |
| @Native("DataTransferItemList") |
| class DataTransferItemList extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DataTransferItemList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| int? get length native; |
| |
| DataTransferItem? add(data_OR_file, [String? type]) native; |
| |
| @JSName('add') |
| DataTransferItem? addData(String data, String type) native; |
| |
| @JSName('add') |
| DataTransferItem? addFile(File file) native; |
| |
| void clear() native; |
| |
| DataTransferItem item(int index) native; |
| |
| 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. |
| |
| 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. |
| |
| // WARNING: Do not edit - generated code. |
| |
| typedef void DecodeErrorCallback(DomException error); |
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| // WARNING: Do not edit - generated code. |
| |
| typedef void DecodeSuccessCallback(AudioBuffer decodedData); |
| // 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. |
| |
| @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. |
| */ |
| static const EventStreamProvider<MessageEvent> messageEvent = |
| const EventStreamProvider<MessageEvent>('message'); |
| |
| static const int PERSISTENT = 1; |
| |
| static const int TEMPORARY = 0; |
| |
| void close() native; |
| |
| void postMessage(/*any*/ message, [List<Object>? 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') |
| void _postMessage_1(message, List<Object> transfer) native; |
| @JSName('postMessage') |
| void _postMessage_2(message) native; |
| |
| @JSName('webkitRequestFileSystem') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| void _webkitRequestFileSystem(int type, int size, |
| [_FileSystemCallback? successCallback, |
| _ErrorCallback? errorCallback]) native; |
| |
| @JSName('webkitRequestFileSystemSync') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| _DOMFileSystemSync requestFileSystemSync(int type, int size) native; |
| |
| @JSName('webkitResolveLocalFileSystemSyncURL') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| _EntrySync resolveLocalFileSystemSyncUrl(String url) native; |
| |
| @JSName('webkitResolveLocalFileSystemURL') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| void _webkitResolveLocalFileSystemUrl( |
| String url, _EntryCallback successCallback, |
| [_ErrorCallback? errorCallback]) native; |
| |
| /// Stream of `message` events handled by this [DedicatedWorkerGlobalScope]. |
| Stream<MessageEvent> get onMessage => messageEvent.forTarget(this); |
| |
| static DedicatedWorkerGlobalScope get instance { |
| return _workerSelf as DedicatedWorkerGlobalScope; |
| } |
| } |
| |
| // 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. |
| |
| @Native("DeprecatedStorageInfo") |
| class DeprecatedStorageInfo extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DeprecatedStorageInfo._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| static const int PERSISTENT = 1; |
| |
| static const int TEMPORARY = 0; |
| |
| void queryUsageAndQuota(int storageType, |
| [StorageUsageCallback? usageCallback, |
| StorageErrorCallback? errorCallback]) native; |
| |
| 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. |
| |
| @Native("DeprecatedStorageQuota") |
| class DeprecatedStorageQuota extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DeprecatedStorageQuota._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| void queryUsageAndQuota(StorageUsageCallback usageCallback, |
| [StorageErrorCallback? errorCallback]) native; |
| |
| 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. |
| |
| @Native("DeprecationReport") |
| class DeprecationReport extends ReportBody { |
| // To suppress missing implicit constructor warnings. |
| factory DeprecationReport._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| int? get lineNumber native; |
| |
| String? get message native; |
| |
| String? get sourceFile 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. |
| |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Native("HTMLDetailsElement") |
| class DetailsElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DetailsElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DetailsElement() => |
| document.createElement("details") as DetailsElement; |
| /** |
| * 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'); |
| |
| bool? get open native; |
| |
| set open(bool? 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. |
| |
| @Native("DetectedBarcode") |
| class DetectedBarcode extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DetectedBarcode._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DetectedBarcode() { |
| return DetectedBarcode._create_1(); |
| } |
| static DetectedBarcode _create_1() => |
| JS('DetectedBarcode', 'new DetectedBarcode()'); |
| |
| Rectangle? get boundingBox native; |
| |
| List? get cornerPoints native; |
| |
| String? get rawValue 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. |
| |
| @Native("DetectedFace") |
| class DetectedFace extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DetectedFace._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DetectedFace() { |
| return DetectedFace._create_1(); |
| } |
| static DetectedFace _create_1() => JS('DetectedFace', 'new DetectedFace()'); |
| |
| Rectangle? get boundingBox native; |
| |
| List? get landmarks 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. |
| |
| @Native("DetectedText") |
| class DetectedText extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DetectedText._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DetectedText() { |
| return DetectedText._create_1(); |
| } |
| static DetectedText _create_1() => JS('DetectedText', 'new DetectedText()'); |
| |
| Rectangle? get boundingBox native; |
| |
| List? get cornerPoints native; |
| |
| String? get rawValue 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. |
| |
| @Native("DeviceAcceleration") |
| class DeviceAcceleration extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DeviceAcceleration._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| num? get x native; |
| |
| num? get y native; |
| |
| num? get z 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. |
| |
| @Native("DeviceMotionEvent") |
| class DeviceMotionEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory DeviceMotionEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DeviceMotionEvent(String type, [Map? eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return DeviceMotionEvent._create_1(type, eventInitDict_1); |
| } |
| return DeviceMotionEvent._create_2(type); |
| } |
| static DeviceMotionEvent _create_1(type, eventInitDict) => JS( |
| 'DeviceMotionEvent', 'new DeviceMotionEvent(#,#)', type, eventInitDict); |
| static DeviceMotionEvent _create_2(type) => |
| JS('DeviceMotionEvent', 'new DeviceMotionEvent(#)', type); |
| |
| DeviceAcceleration? get acceleration native; |
| |
| DeviceAcceleration? get accelerationIncludingGravity native; |
| |
| num? get interval native; |
| |
| DeviceRotationRate? get rotationRate 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. |
| |
| @Native("DeviceOrientationEvent") |
| class DeviceOrientationEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory DeviceOrientationEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DeviceOrientationEvent(String type, [Map? eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return DeviceOrientationEvent._create_1(type, eventInitDict_1); |
| } |
| return DeviceOrientationEvent._create_2(type); |
| } |
| static DeviceOrientationEvent _create_1(type, eventInitDict) => JS( |
| 'DeviceOrientationEvent', |
| 'new DeviceOrientationEvent(#,#)', |
| type, |
| eventInitDict); |
| static DeviceOrientationEvent _create_2(type) => |
| JS('DeviceOrientationEvent', 'new DeviceOrientationEvent(#)', type); |
| |
| bool? get absolute native; |
| |
| num? get alpha native; |
| |
| num? get beta native; |
| |
| num? get gamma 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. |
| |
| @Native("DeviceRotationRate") |
| class DeviceRotationRate extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DeviceRotationRate._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| num? get alpha native; |
| |
| num? get beta native; |
| |
| num? get gamma 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. |
| |
| @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(); |
| |
| bool? get open native; |
| |
| set open(bool? value) native; |
| |
| String? get returnValue native; |
| |
| set returnValue(String? value) native; |
| |
| void close([String? returnValue]) native; |
| |
| void show() native; |
| |
| 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. |
| |
| @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}); |
| } |
| |
| DirectoryReader createReader() { |
| DirectoryReader reader = _createReader(); |
| applyExtension('DirectoryReader', reader); |
| return reader; |
| } |
| |
| /** |
| * 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"); |
| } |
| |
| @JSName('createReader') |
| DirectoryReader _createReader() native; |
| |
| 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') |
| void __getDirectory_1(path, options, _EntryCallback? successCallback, |
| _ErrorCallback? errorCallback) native; |
| @JSName('getDirectory') |
| void __getDirectory_2(path, options, _EntryCallback? successCallback) native; |
| @JSName('getDirectory') |
| void __getDirectory_3(path, options) native; |
| @JSName('getDirectory') |
| void __getDirectory_4(path) native; |
| |
| @JSName('getDirectory') |
| Future<Entry> _getDirectory(String? path, {Map? options}) { |
| var completer = new Completer<Entry>(); |
| __getDirectory(path, options, (value) { |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| 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') |
| void __getFile_1(path, options, _EntryCallback? successCallback, |
| _ErrorCallback? errorCallback) native; |
| @JSName('getFile') |
| void __getFile_2(path, options, _EntryCallback? successCallback) native; |
| @JSName('getFile') |
| void __getFile_3(path, options) native; |
| @JSName('getFile') |
| void __getFile_4(path) native; |
| |
| @JSName('getFile') |
| Future<Entry> _getFile(String? path, {Map? options}) { |
| var completer = new Completer<Entry>(); |
| __getFile(path, options, (value) { |
| applyExtension('FileEntry', value); |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('removeRecursively') |
| void _removeRecursively(VoidCallback successCallback, |
| [_ErrorCallback? errorCallback]) native; |
| |
| @JSName('removeRecursively') |
| Future removeRecursively() { |
| var completer = new Completer(); |
| _removeRecursively(() { |
| completer.complete(); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| } |
| // 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. |
| |
| @Native("DirectoryReader") |
| class DirectoryReader extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DirectoryReader._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('readEntries') |
| void _readEntries(_EntriesCallback successCallback, |
| [_ErrorCallback? errorCallback]) native; |
| |
| Future<List<Entry>> readEntries() { |
| var completer = new Completer<List<Entry>>(); |
| _readEntries((values) { |
| values.forEach((value) { |
| applyExtension('Entry', value); |
| Entry entry = value as Entry; |
| if (entry.isFile!) |
| applyExtension('FileEntry', entry); |
| else if (entry.isDirectory!) applyExtension('DirectoryEntry', entry); |
| }); |
| completer.complete(new List<Entry>.from(values)); |
| }, (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. |
| |
| /** |
| * 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. |
| */ |
| @Native("HTMLDivElement") |
| class DivElement extends HtmlElement { |
| // To suppress missing implicit constructor warnings. |
| factory DivElement._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DivElement() => JS<DivElement>( |
| 'returns:DivElement;creates:DivElement;new:true', |
| '#.createElement(#)', |
| document, |
| "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. |
| |
| /** |
| * 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/). |
| */ |
| @Native("Document") |
| class Document extends Node { |
| // To suppress missing implicit constructor warnings. |
| factory Document._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| static const EventStreamProvider<Event> pointerLockChangeEvent = |
| const EventStreamProvider<Event>('pointerlockchange'); |
| |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<Event> selectionChangeEvent = |
| const EventStreamProvider<Event>('selectionchange'); |
| |
| factory Document() { |
| return Document._create_1(); |
| } |
| static Document _create_1() => JS('Document', 'new Document()'); |
| |
| String? get addressSpace native; |
| |
| @JSName('body') |
| HtmlElement? get _body native; |
| |
| @JSName('body') |
| set _body(HtmlElement? value) native; |
| |
| String? get contentType native; |
| |
| String? get cookie native; |
| |
| set cookie(String? value) native; |
| |
| ScriptElement? get currentScript native; |
| |
| WindowBase? get window => _convertNativeToDart_Window(this._get_window); |
| @JSName('defaultView') |
| @Creates('Window|=Object') |
| @Returns('Window|=Object') |
| @Creates('Window|=Object|Null') |
| @Returns('Window|=Object|Null') |
| dynamic get _get_window native; |
| |
| Element? get documentElement native; |
| |
| String? get domain native; |
| |
| bool? get fullscreenEnabled native; |
| |
| @JSName('head') |
| HeadElement? get _head native; |
| |
| bool? get hidden native; |
| |
| DomImplementation? get implementation native; |
| |
| @JSName('lastModified') |
| String? get _lastModified native; |
| |
| String? get origin native; |
| |
| @JSName('preferredStylesheetSet') |
| String? get _preferredStylesheetSet native; |
| |
| String? get readyState native; |
| |
| @JSName('referrer') |
| String get _referrer native; |
| |
| SvgSvgElement? get rootElement native; |
| |
| Element? get rootScroller native; |
| |
| set rootScroller(Element? value) native; |
| |
| Element? get scrollingElement native; |
| |
| @JSName('selectedStylesheetSet') |
| String? get _selectedStylesheetSet native; |
| |
| @JSName('selectedStylesheetSet') |
| set _selectedStylesheetSet(String? value) native; |
| |
| String? get suborigin native; |
| |
| DocumentTimeline? get timeline native; |
| |
| @JSName('title') |
| String get _title native; |
| |
| @JSName('title') |
| set _title(String value) native; |
| |
| @JSName('visibilityState') |
| String? get _visibilityState native; |
| |
| @JSName('webkitFullscreenElement') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| Element? get _webkitFullscreenElement native; |
| |
| @JSName('webkitFullscreenEnabled') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| bool? get _webkitFullscreenEnabled native; |
| |
| @JSName('webkitHidden') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| bool? get _webkitHidden native; |
| |
| @JSName('webkitVisibilityState') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| String? get _webkitVisibilityState native; |
| |
| Node adoptNode(Node node) native; |
| |
| @JSName('caretRangeFromPoint') |
| Range _caretRangeFromPoint(int? x, int? y) native; |
| |
| DocumentFragment createDocumentFragment() native; |
| |
| @JSName('createElement') |
| Element _createElement(String localName_OR_tagName, |
| [options_OR_typeExtension]) native; |
| |
| @JSName('createElementNS') |
| Element _createElementNS(String? namespaceURI, String qualifiedName, |
| [options_OR_typeExtension]) native; |
| |
| @JSName('createEvent') |
| Event _createEvent(String eventType) native; |
| |
| Range createRange() native; |
| |
| @JSName('createTextNode') |
| Text _createTextNode(String data) native; |
| |
| Touch _createTouch(Window view, EventTarget target, int identifier, num pageX, |
| num pageY, num screenX, num screenY, |
| [num? radiusX, num? radiusY, num? rotationAngle, num? force]) { |
| if (force != null) { |
| var target_1 = _convertDartToNative_EventTarget(target); |
| return _createTouch_1(view, target_1, identifier, pageX, pageY, screenX, |
| screenY, radiusX, radiusY, rotationAngle, force); |
| } |
| if (rotationAngle != null) { |
| var target_1 = _convertDartToNative_EventTarget(target); |
| return _createTouch_2(view, target_1, identifier, pageX, pageY, screenX, |
| screenY, radiusX, radiusY, rotationAngle); |
| } |
| if (radiusY != null) { |
| var target_1 = _convertDartToNative_EventTarget(target); |
| return _createTouch_3(view, target_1, identifier, pageX, pageY, screenX, |
| screenY, radiusX, radiusY); |
| } |
| if (radiusX != null) { |
| var target_1 = _convertDartToNative_EventTarget(target); |
| return _createTouch_4( |
| view, target_1, identifier, pageX, pageY, screenX, screenY, radiusX); |
| } |
| var target_1 = _convertDartToNative_EventTarget(target); |
| return _createTouch_5( |
| view, target_1, identifier, pageX, pageY, screenX, screenY); |
| } |
| |
| @JSName('createTouch') |
| Touch _createTouch_1(Window view, target, identifier, pageX, pageY, screenX, |
| screenY, radiusX, radiusY, rotationAngle, force) native; |
| @JSName('createTouch') |
| Touch _createTouch_2(Window view, target, identifier, pageX, pageY, screenX, |
| screenY, radiusX, radiusY, rotationAngle) native; |
| @JSName('createTouch') |
| Touch _createTouch_3(Window view, target, identifier, pageX, pageY, screenX, |
| screenY, radiusX, radiusY) native; |
| @JSName('createTouch') |
| Touch _createTouch_4(Window view, target, identifier, pageX, pageY, screenX, |
| screenY, radiusX) native; |
| @JSName('createTouch') |
| Touch _createTouch_5( |
| Window view, target, identifier, pageX, pageY, screenX, screenY) native; |
| |
| @JSName('createTouchList') |
| TouchList _createTouchList(Touch touches) native; |
| |
| bool execCommand(String commandId, [bool? showUI, String? value]) native; |
| |
| void exitFullscreen() native; |
| |
| void exitPointerLock() native; |
| |
| List<Animation> getAnimations() native; |
| |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> getElementsByClassName(String classNames) native; |
| |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> getElementsByName(String elementName) native; |
| |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> getElementsByTagName(String localName) native; |
| |
| Node importNode(Node node, [bool? deep]) native; |
| |
| bool queryCommandEnabled(String commandId) native; |
| |
| bool queryCommandIndeterm(String commandId) native; |
| |
| bool queryCommandState(String commandId) native; |
| |
| bool queryCommandSupported(String commandId) native; |
| |
| String queryCommandValue(String commandId) native; |
| |
| Function registerElement2(String type, [Map? options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| return _registerElement2_1(type, options_1); |
| } |
| return _registerElement2_2(type); |
| } |
| |
| @JSName('registerElement') |
| Function _registerElement2_1(type, options) native; |
| @JSName('registerElement') |
| Function _registerElement2_2(type) native; |
| |
| @JSName('webkitExitFullscreen') |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| void _webkitExitFullscreen() native; |
| |
| // From NonElementParentNode |
| |
| Element? getElementById(String elementId) native; |
| |
| // From DocumentOrShadowRoot |
| |
| Element? get activeElement native; |
| |
| Element? get fullscreenElement native; |
| |
| Element? get pointerLockElement native; |
| |
| @JSName('styleSheets') |
| @Returns('_StyleSheetList') |
| @Creates('_StyleSheetList') |
| List<StyleSheet>? get _styleSheets native; |
| |
| @JSName('elementFromPoint') |
| Element? _elementFromPoint(int x, int y) native; |
| |
| List<Element> elementsFromPoint(int x, int y) native; |
| |
| // From FontFaceSource |
| |
| FontFaceSet? get fonts native; |
| |
| // From ParentNode |
| |
| @JSName('childElementCount') |
| int get _childElementCount native; |
| |
| @JSName('children') |
| @Returns('HtmlCollection') |
| @Creates('HtmlCollection') |
| List<Node>? get _children native; |
| |
| @JSName('firstElementChild') |
| Element? get _firstElementChild native; |
| |
| @JSName('lastElementChild') |
| Element? get _lastElementChild native; |
| |
| /** |
| * 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/). |
| */ |
| Element? querySelector(String selectors) native; |
| |
| @JSName('querySelectorAll') |
| @Creates('NodeList') |
| @Returns('NodeList') |
| List<Node> _querySelectorAll(String selectors) native; |
| |
| /// Stream of `abort` events handled by this [Document]. |
| Stream<Event> get onAbort => Element.abortEvent.forTarget(this); |
| |
| /// Stream of `beforecopy` events handled by this [Document]. |
| Stream<Event> get onBeforeCopy => Element.beforeCopyEvent.forTarget(this); |
| |
| /// Stream of `beforecut` events handled by this [Document]. |
| Stream<Event> get onBeforeCut => Element.beforeCutEvent.forTarget(this); |
| |
| /// Stream of `beforepaste` events handled by this [Document]. |
| Stream<Event> get onBeforePaste => Element.beforePasteEvent.forTarget(this); |
| |
| /// Stream of `blur` events handled by this [Document]. |
| Stream<Event> get onBlur => Element.blurEvent.forTarget(this); |
| |
| Stream<Event> get onCanPlay => Element.canPlayEvent.forTarget(this); |
| |
| Stream<Event> get onCanPlayThrough => |
| Element.canPlayThroughEvent.forTarget(this); |
| |
| /// Stream of `change` events handled by this [Document]. |
| Stream<Event> get onChange => Element.changeEvent.forTarget(this); |
| |
| /// Stream of `click` events handled by this [Document]. |
| Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this); |
| |
| /// Stream of `contextmenu` events handled by this [Document]. |
| Stream<MouseEvent> get onContextMenu => |
| Element.contextMenuEvent.forTarget(this); |
| |
| /// Stream of `copy` events handled by this [Document]. |
| Stream<ClipboardEvent> get onCopy => Element.copyEvent.forTarget(this); |
| |
| /// Stream of `cut` events handled by this [Document]. |
| Stream<ClipboardEvent> get onCut => Element.cutEvent.forTarget(this); |
| |
| /// Stream of `doubleclick` events handled by this [Document]. |
| @DomName('Document.ondblclick') |
| Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this); |
| |
| /// Stream of `drag` events handled by this [Document]. |
| Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this); |
| |
| /// Stream of `dragend` events handled by this [Document]. |
| Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this); |
| |
| /// Stream of `dragenter` events handled by this [Document]. |
| Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this); |
| |
| /// Stream of `dragleave` events handled by this [Document]. |
| Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this); |
| |
| /// Stream of `dragover` events handled by this [Document]. |
| Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this); |
| |
| /// Stream of `dragstart` events handled by this [Document]. |
| Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this); |
| |
| /// Stream of `drop` events handled by this [Document]. |
| Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this); |
| |
| Stream<Event> get onDurationChange => |
| Element.durationChangeEvent.forTarget(this); |
| |
| Stream<Event> get onEmptied => Element.emptiedEvent.forTarget(this); |
| |
| Stream<Event> get onEnded => Element.endedEvent.forTarget(this); |
| |
| /// Stream of `error` events handled by this [Document]. |
| Stream<Event> get onError => Element.errorEvent.forTarget(this); |
| |
| /// Stream of `focus` events handled by this [Document]. |
| Stream<Event> get onFocus => Element.focusEvent.forTarget(this); |
| |
| /// Stream of `input` events handled by this [Document]. |
| Stream<Event> get onInput => Element.inputEvent.forTarget(this); |
| |
| /// Stream of `invalid` events handled by this [Document]. |
| Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this); |
| |
| /// Stream of `keydown` events handled by this [Document]. |
| Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this); |
| |
| /// Stream of `keypress` events handled by this [Document]. |
| Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this); |
| |
| /// Stream of `keyup` events handled by this [Document]. |
| Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this); |
| |
| /// Stream of `load` events handled by this [Document]. |
| Stream<Event> get onLoad => Element.loadEvent.forTarget(this); |
| |
| Stream<Event> get onLoadedData => Element.loadedDataEvent.forTarget(this); |
| |
| Stream<Event> get onLoadedMetadata => |
| Element.loadedMetadataEvent.forTarget(this); |
| |
| /// Stream of `mousedown` events handled by this [Document]. |
| Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this); |
| |
| /// Stream of `mouseenter` events handled by this [Document]. |
| Stream<MouseEvent> get onMouseEnter => |
| Element.mouseEnterEvent.forTarget(this); |
| |
| /// Stream of `mouseleave` events handled by this [Document]. |
| Stream<MouseEvent> get onMouseLeave => |
| Element.mouseLeaveEvent.forTarget(this); |
| |
| /// Stream of `mousemove` events handled by this [Document]. |
| Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this); |
| |
| /// Stream of `mouseout` events handled by this [Document]. |
| Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this); |
| |
| /// Stream of `mouseover` events handled by this [Document]. |
| Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this); |
| |
| /// Stream of `mouseup` events handled by this [Document]. |
| Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this); |
| |
| /// Stream of `mousewheel` events handled by this [Document]. |
| Stream<WheelEvent> get onMouseWheel => |
| Element.mouseWheelEvent.forTarget(this); |
| |
| /// Stream of `paste` events handled by this [Document]. |
| Stream<ClipboardEvent> get onPaste => Element.pasteEvent.forTarget(this); |
| |
| Stream<Event> get onPause => Element.pauseEvent.forTarget(this); |
| |
| Stream<Event> get onPlay => Element.playEvent.forTarget(this); |
| |
| Stream<Event> get onPlaying => Element.playingEvent.forTarget(this); |
| |
| Stream<Event> get onPointerLockChange => |
| pointerLockChangeEvent.forTarget(this); |
| |
| Stream<Event> get onPointerLockError => pointerLockErrorEvent.forTarget(this); |
| |
| Stream<Event> get onRateChange => Element.rateChangeEvent.forTarget(this); |
| |
| /// Stream of `readystatechange` events handled by this [Document]. |
| Stream<Event> get onReadyStateChange => readyStateChangeEvent.forTarget(this); |
| |
| /// Stream of `reset` events handled by this [Document]. |
| Stream<Event> get onReset => Element.resetEvent.forTarget(this); |
| |
| Stream<Event> get onResize => Element.resizeEvent.forTarget(this); |
| |
| /// Stream of `scroll` events handled by this [Document]. |
| Stream<Event> get onScroll => Element.scrollEvent.forTarget(this); |
| |
| /// Stream of `search` events handled by this [Document]. |
| Stream<Event> get onSearch => Element.searchEvent.forTarget(this); |
| |
| /// Stream of `securitypolicyviolation` events handled by this [Document]. |
| Stream<SecurityPolicyViolationEvent> get onSecurityPolicyViolation => |
| securityPolicyViolationEvent.forTarget(this); |
| |
| Stream<Event> get onSeeked => Element.seekedEvent.forTarget(this); |
| |
| Stream<Event> get onSeeking => Element.seekingEvent.forTarget(this); |
| |
| /// Stream of `select` events handled by this [Document]. |
| Stream<Event> get onSelect => Element.selectEvent.forTarget(this); |
| |
| /// Stream of `selectionchange` events handled by this [Document]. |
| Stream<Event> get onSelectionChange => selectionChangeEvent.forTarget(this); |
| |
| /// Stream of `selectstart` events handled by this [Document]. |
| Stream<Event> get onSelectStart => Element.selectStartEvent.forTarget(this); |
| |
| Stream<Event> get onStalled => Element.stalledEvent.forTarget(this); |
| |
| /// Stream of `submit` events handled by this [Document]. |
| Stream<Event> get onSubmit => Element.submitEvent.forTarget(this); |
| |
| Stream<Event> get onSuspend => Element.suspendEvent.forTarget(this); |
| |
| Stream<Event> get onTimeUpdate => Element.timeUpdateEvent.forTarget(this); |
| |
| /// Stream of `touchcancel` events handled by this [Document]. |
| Stream<TouchEvent> get onTouchCancel => |
| Element.touchCancelEvent.forTarget(this); |
| |
| /// Stream of `touchend` events handled by this [Document]. |
| Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this); |
| |
| /// Stream of `touchmove` events handled by this [Document]. |
| Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this); |
| |
| /// Stream of `touchstart` events handled by this [Document]. |
| Stream<TouchEvent> get onTouchStart => |
| Element.touchStartEvent.forTarget(this); |
| |
| Stream<Event> get onVolumeChange => Element.volumeChangeEvent.forTarget(this); |
| |
| Stream<Event> get onWaiting => Element.waitingEvent.forTarget(this); |
| |
| /// Stream of `fullscreenchange` events handled by this [Document]. |
| Stream<Event> get onFullscreenChange => |
| Element.fullscreenChangeEvent.forTarget(this); |
| |
| /// Stream of `fullscreenerror` events handled by this [Document]. |
| 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<T> querySelectorAll<T extends Element>(String selectors) => |
| new _FrozenElementList<T>._wrap(_querySelectorAll(selectors)); |
| |
| /// 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; |
| |
| void registerElement(String tag, Type customElementClass, |
| {String? extendsTag}) { |
| registerElement2( |
| tag, {'prototype': customElementClass, 'extends': extendsTag}); |
| } |
| |
| @pragma('dart2js:tryInline') // Almost all call sites have one argument. |
| 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. |
| _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. |
| _createElementNS_2(String namespaceURI, String qualifiedName) => JS( |
| 'Element', '#.createElementNS(#, #)', this, namespaceURI, qualifiedName); |
| |
| Element createElementNS(String namespaceURI, String qualifiedName, |
| [String? typeExtension]) { |
| return (typeExtension == null) |
| ? _createElementNS_2(namespaceURI, qualifiedName) |
| : _createElementNS(namespaceURI, qualifiedName, typeExtension); |
| } |
| |
| NodeIterator _createNodeIterator(Node root, |
| [int? whatToShow, NodeFilter? filter]) => |
| JS('NodeIterator', '#.createNodeIterator(#, #, #, false)', this, root, |
| whatToShow, filter); |
| |
| TreeWalker _createTreeWalker(Node root, |
| [int? whatToShow, NodeFilter? filter]) => |
| JS('TreeWalker', '#.createTreeWalker(#, #, #, false)', this, root, |
| whatToShow, filter); |
| |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| 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. |
| |
| @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<T> querySelectorAll<T extends Element>(String selectors) => |
| new _FrozenElementList<T>._wrap(_querySelectorAll(selectors)); |
| |
| // innerHtml is marked as nullable, even though it is guaranteed to return a |
| // non-nullable, because ShadowRoot.innerHtml overrides it and can be |
| // incompatible. |
| String? get innerHtml { |
| final e = new DivElement(); |
| 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)); |
| } |
| |
| // To suppress missing implicit constructor warnings. |
| factory DocumentFragment._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| // From NonElementParentNode |
| |
| Element? getElementById(String elementId) native; |
| |
| // From ParentNode |
| |
| @JSName('childElementCount') |
| int get _childElementCount native; |
| |
| @JSName('firstElementChild') |
| Element? get _firstElementChild native; |
| |
| @JSName('lastElementChild') |
| Element? get _lastElementChild native; |
| |
| /** |
| * 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/). |
| */ |
| Element? querySelector(String selectors) native; |
| |
| @JSName('querySelectorAll') |
| @Creates('NodeList') |
| @Returns('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. |
| |
| @Native("DocumentOrShadowRoot") |
| class DocumentOrShadowRoot extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DocumentOrShadowRoot._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| Element? get activeElement native; |
| |
| Element? get fullscreenElement native; |
| |
| Element? get pointerLockElement native; |
| |
| @Returns('_StyleSheetList') |
| @Creates('_StyleSheetList') |
| List<StyleSheet>? get styleSheets native; |
| |
| Element? elementFromPoint(int x, int y) native; |
| |
| List<Element> elementsFromPoint(int x, int y) native; |
| |
| Selection? getSelection() 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. |
| |
| @Native("DocumentTimeline") |
| class DocumentTimeline extends AnimationTimeline { |
| // To suppress missing implicit constructor warnings. |
| factory DocumentTimeline._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DocumentTimeline([Map? options]) { |
| if (options != null) { |
| var options_1 = convertDartToNative_Dictionary(options); |
| return DocumentTimeline._create_1(options_1); |
| } |
| return DocumentTimeline._create_2(); |
| } |
| static DocumentTimeline _create_1(options) => |
| JS('DocumentTimeline', 'new DocumentTimeline(#)', options); |
| static DocumentTimeline _create_2() => |
| JS('DocumentTimeline', 'new DocumentTimeline()'); |
| } |
| // 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. |
| |
| @Native("DOMError") |
| class DomError extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomError._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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); |
| |
| String? get message native; |
| |
| String? get name 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. |
| |
| @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'; |
| static const String ENCODING = 'EncodingError'; |
| static const String NOT_READABLE = 'NotReadableError'; |
| static const String UNKNOWN = 'UnknownError'; |
| static const String CONSTRAINT = 'ConstraintError'; |
| static const String TRANSACTION_INACTIVE = 'TransactionInactiveError'; |
| static const String READ_ONLY = 'ReadOnlyError'; |
| static const String VERSION = 'VersionError'; |
| static const String OPERATION = 'OperationError'; |
| static const String NOT_ALLOWED = 'NotAllowedError'; |
| // Is TypeError class derived from DomException but name is 'TypeError' |
| static const String TYPE_ERROR = 'TypeError'; |
| |
| 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 as String; |
| } |
| |
| // To suppress missing implicit constructor warnings. |
| factory DomException._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| String? get message native; |
| |
| 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. |
| |
| @Native("DOMImplementation") |
| class DomImplementation extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomImplementation._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| XmlDocument createDocument(String? namespaceURI, String qualifiedName, |
| _DocumentType? doctype) native; |
| |
| _DocumentType createDocumentType( |
| String qualifiedName, String publicId, String systemId) native; |
| |
| @JSName('createHTMLDocument') |
| HtmlDocument createHtmlDocument([String? title]) native; |
| |
| 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. |
| |
| @Native("Iterator") |
| class DomIterator extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomIterator._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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. |
| |
| @Native("DOMMatrix") |
| class DomMatrix extends DomMatrixReadOnly { |
| // To suppress missing implicit constructor warnings. |
| factory DomMatrix._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DomMatrix([Object? init]) { |
| if (init != null) { |
| return DomMatrix._create_1(init); |
| } |
| return DomMatrix._create_2(); |
| } |
| static DomMatrix _create_1(init) => JS('DomMatrix', 'new DOMMatrix(#)', init); |
| static DomMatrix _create_2() => JS('DomMatrix', 'new DOMMatrix()'); |
| |
| // Shadowing definition. |
| |
| num? get a native; |
| |
| set a(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get b native; |
| |
| set b(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get c native; |
| |
| set c(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get d native; |
| |
| set d(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get e native; |
| |
| set e(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get f native; |
| |
| set f(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m11 native; |
| |
| set m11(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m12 native; |
| |
| set m12(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m13 native; |
| |
| set m13(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m14 native; |
| |
| set m14(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m21 native; |
| |
| set m21(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m22 native; |
| |
| set m22(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m23 native; |
| |
| set m23(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m24 native; |
| |
| set m24(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m31 native; |
| |
| set m31(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m32 native; |
| |
| set m32(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m33 native; |
| |
| set m33(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m34 native; |
| |
| set m34(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m41 native; |
| |
| set m41(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m42 native; |
| |
| set m42(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m43 native; |
| |
| set m43(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get m44 native; |
| |
| set m44(num? value) native; |
| |
| static DomMatrix fromFloat32Array(Float32List array32) native; |
| |
| static DomMatrix fromFloat64Array(Float64List array64) native; |
| |
| static DomMatrix fromMatrix([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _fromMatrix_1(other_1); |
| } |
| return _fromMatrix_2(); |
| } |
| |
| @JSName('fromMatrix') |
| static DomMatrix _fromMatrix_1(other) native; |
| @JSName('fromMatrix') |
| static DomMatrix _fromMatrix_2() native; |
| |
| DomMatrix invertSelf() native; |
| |
| DomMatrix multiplySelf([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _multiplySelf_1(other_1); |
| } |
| return _multiplySelf_2(); |
| } |
| |
| @JSName('multiplySelf') |
| DomMatrix _multiplySelf_1(other) native; |
| @JSName('multiplySelf') |
| DomMatrix _multiplySelf_2() native; |
| |
| DomMatrix preMultiplySelf([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _preMultiplySelf_1(other_1); |
| } |
| return _preMultiplySelf_2(); |
| } |
| |
| @JSName('preMultiplySelf') |
| DomMatrix _preMultiplySelf_1(other) native; |
| @JSName('preMultiplySelf') |
| DomMatrix _preMultiplySelf_2() native; |
| |
| DomMatrix rotateAxisAngleSelf([num? x, num? y, num? z, num? angle]) native; |
| |
| DomMatrix rotateFromVectorSelf([num? x, num? y]) native; |
| |
| DomMatrix rotateSelf([num? rotX, num? rotY, num? rotZ]) native; |
| |
| DomMatrix scale3dSelf([num? scale, num? originX, num? originY, num? originZ]) |
| native; |
| |
| DomMatrix scaleSelf( |
| [num? scaleX, |
| num? scaleY, |
| num? scaleZ, |
| num? originX, |
| num? originY, |
| num? originZ]) native; |
| |
| DomMatrix setMatrixValue(String transformList) native; |
| |
| DomMatrix skewXSelf([num? sx]) native; |
| |
| DomMatrix skewYSelf([num? sy]) native; |
| |
| 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. |
| |
| @Native("DOMMatrixReadOnly") |
| class DomMatrixReadOnly extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomMatrixReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DomMatrixReadOnly([Object? init]) { |
| if (init != null) { |
| return DomMatrixReadOnly._create_1(init); |
| } |
| return DomMatrixReadOnly._create_2(); |
| } |
| static DomMatrixReadOnly _create_1(init) => |
| JS('DomMatrixReadOnly', 'new DOMMatrixReadOnly(#)', init); |
| static DomMatrixReadOnly _create_2() => |
| JS('DomMatrixReadOnly', 'new DOMMatrixReadOnly()'); |
| |
| num? get a native; |
| |
| num? get b native; |
| |
| num? get c native; |
| |
| num? get d native; |
| |
| num? get e native; |
| |
| num? get f native; |
| |
| bool? get is2D native; |
| |
| bool? get isIdentity native; |
| |
| num? get m11 native; |
| |
| num? get m12 native; |
| |
| num? get m13 native; |
| |
| num? get m14 native; |
| |
| num? get m21 native; |
| |
| num? get m22 native; |
| |
| num? get m23 native; |
| |
| num? get m24 native; |
| |
| num? get m31 native; |
| |
| num? get m32 native; |
| |
| num? get m33 native; |
| |
| num? get m34 native; |
| |
| num? get m41 native; |
| |
| num? get m42 native; |
| |
| num? get m43 native; |
| |
| num? get m44 native; |
| |
| DomMatrix flipX() native; |
| |
| DomMatrix flipY() native; |
| |
| static DomMatrixReadOnly fromFloat32Array(Float32List array32) native; |
| |
| static DomMatrixReadOnly fromFloat64Array(Float64List array64) native; |
| |
| static DomMatrixReadOnly fromMatrix([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _fromMatrix_1(other_1); |
| } |
| return _fromMatrix_2(); |
| } |
| |
| @JSName('fromMatrix') |
| static DomMatrixReadOnly _fromMatrix_1(other) native; |
| @JSName('fromMatrix') |
| static DomMatrixReadOnly _fromMatrix_2() native; |
| |
| DomMatrix inverse() native; |
| |
| DomMatrix multiply([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _multiply_1(other_1); |
| } |
| return _multiply_2(); |
| } |
| |
| @JSName('multiply') |
| DomMatrix _multiply_1(other) native; |
| @JSName('multiply') |
| DomMatrix _multiply_2() native; |
| |
| DomMatrix rotate([num? rotX, num? rotY, num? rotZ]) native; |
| |
| DomMatrix rotateAxisAngle([num? x, num? y, num? z, num? angle]) native; |
| |
| DomMatrix rotateFromVector([num? x, num? y]) native; |
| |
| DomMatrix scale( |
| [num? scaleX, |
| num? scaleY, |
| num? scaleZ, |
| num? originX, |
| num? originY, |
| num? originZ]) native; |
| |
| DomMatrix scale3d([num? scale, num? originX, num? originY, num? originZ]) |
| native; |
| |
| DomMatrix skewX([num? sx]) native; |
| |
| DomMatrix skewY([num? sy]) native; |
| |
| Float32List toFloat32Array() native; |
| |
| Float64List toFloat64Array() native; |
| |
| DomPoint transformPoint([Map? point]) { |
| if (point != null) { |
| var point_1 = convertDartToNative_Dictionary(point); |
| return _transformPoint_1(point_1); |
| } |
| return _transformPoint_2(); |
| } |
| |
| @JSName('transformPoint') |
| DomPoint _transformPoint_1(point) native; |
| @JSName('transformPoint') |
| DomPoint _transformPoint_2() native; |
| |
| 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. |
| |
| @Native("DOMParser") |
| class DomParser extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomParser._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DomParser() { |
| return DomParser._create_1(); |
| } |
| static DomParser _create_1() => JS('DomParser', 'new DOMParser()'); |
| |
| 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. |
| |
| @Native("DOMPoint") |
| class DomPoint extends DomPointReadOnly { |
| // To suppress missing implicit constructor warnings. |
| factory DomPoint._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DomPoint([num? x, num? y, num? z, num? w]) { |
| if (w != null) { |
| return DomPoint._create_1(x, y, z, w); |
| } |
| if (z != null) { |
| return DomPoint._create_2(x, y, z); |
| } |
| if (y != null) { |
| return DomPoint._create_3(x, y); |
| } |
| if (x != null) { |
| return DomPoint._create_4(x); |
| } |
| return DomPoint._create_5(); |
| } |
| static DomPoint _create_1(x, y, z, w) => |
| JS('DomPoint', 'new DOMPoint(#,#,#,#)', x, y, z, w); |
| static DomPoint _create_2(x, y, z) => |
| JS('DomPoint', 'new DOMPoint(#,#,#)', x, y, z); |
| static DomPoint _create_3(x, y) => JS('DomPoint', 'new DOMPoint(#,#)', x, y); |
| static DomPoint _create_4(x) => JS('DomPoint', 'new DOMPoint(#)', x); |
| static DomPoint _create_5() => JS('DomPoint', 'new DOMPoint()'); |
| |
| /// 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 native; |
| |
| set w(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get x native; |
| |
| set x(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get y native; |
| |
| set y(num? value) native; |
| |
| // Shadowing definition. |
| |
| num? get z native; |
| |
| set z(num? value) native; |
| |
| static DomPoint fromPoint([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _fromPoint_1(other_1); |
| } |
| return _fromPoint_2(); |
| } |
| |
| @JSName('fromPoint') |
| static DomPoint _fromPoint_1(other) native; |
| @JSName('fromPoint') |
| static DomPoint _fromPoint_2() 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. |
| |
| @Native("DOMPointReadOnly") |
| class DomPointReadOnly extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomPointReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DomPointReadOnly([num? x, num? y, num? z, num? w]) { |
| if (w != null) { |
| return DomPointReadOnly._create_1(x, y, z, w); |
| } |
| if (z != null) { |
| return DomPointReadOnly._create_2(x, y, z); |
| } |
| if (y != null) { |
| return DomPointReadOnly._create_3(x, y); |
| } |
| if (x != null) { |
| return DomPointReadOnly._create_4(x); |
| } |
| return DomPointReadOnly._create_5(); |
| } |
| static DomPointReadOnly _create_1(x, y, z, w) => |
| JS('DomPointReadOnly', 'new DOMPointReadOnly(#,#,#,#)', x, y, z, w); |
| static DomPointReadOnly _create_2(x, y, z) => |
| JS('DomPointReadOnly', 'new DOMPointReadOnly(#,#,#)', x, y, z); |
| static DomPointReadOnly _create_3(x, y) => |
| JS('DomPointReadOnly', 'new DOMPointReadOnly(#,#)', x, y); |
| static DomPointReadOnly _create_4(x) => |
| JS('DomPointReadOnly', 'new DOMPointReadOnly(#)', x); |
| static DomPointReadOnly _create_5() => |
| JS('DomPointReadOnly', 'new DOMPointReadOnly()'); |
| |
| num? get w native; |
| |
| num? get x native; |
| |
| num? get y native; |
| |
| num? get z native; |
| |
| static DomPointReadOnly fromPoint([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _fromPoint_1(other_1); |
| } |
| return _fromPoint_2(); |
| } |
| |
| @JSName('fromPoint') |
| static DomPointReadOnly _fromPoint_1(other) native; |
| @JSName('fromPoint') |
| static DomPointReadOnly _fromPoint_2() native; |
| |
| DomPoint matrixTransform([Map? matrix]) { |
| if (matrix != null) { |
| var matrix_1 = convertDartToNative_Dictionary(matrix); |
| return _matrixTransform_1(matrix_1); |
| } |
| return _matrixTransform_2(); |
| } |
| |
| @JSName('matrixTransform') |
| DomPoint _matrixTransform_1(matrix) native; |
| @JSName('matrixTransform') |
| DomPoint _matrixTransform_2() 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. |
| |
| @Native("DOMQuad") |
| class DomQuad extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomQuad._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DomQuad([Map? p1, Map? p2, Map? p3, Map? p4]) { |
| if (p4 != null) { |
| var p1_1 = convertDartToNative_Dictionary(p1); |
| var p2_2 = convertDartToNative_Dictionary(p2); |
| var p3_3 = convertDartToNative_Dictionary(p3); |
| var p4_4 = convertDartToNative_Dictionary(p4); |
| return DomQuad._create_1(p1_1, p2_2, p3_3, p4_4); |
| } |
| if (p3 != null) { |
| var p1_1 = convertDartToNative_Dictionary(p1); |
| var p2_2 = convertDartToNative_Dictionary(p2); |
| var p3_3 = convertDartToNative_Dictionary(p3); |
| return DomQuad._create_2(p1_1, p2_2, p3_3); |
| } |
| if (p2 != null) { |
| var p1_1 = convertDartToNative_Dictionary(p1); |
| var p2_2 = convertDartToNative_Dictionary(p2); |
| return DomQuad._create_3(p1_1, p2_2); |
| } |
| if (p1 != null) { |
| var p1_1 = convertDartToNative_Dictionary(p1); |
| return DomQuad._create_4(p1_1); |
| } |
| return DomQuad._create_5(); |
| } |
| static DomQuad _create_1(p1, p2, p3, p4) => |
| JS('DomQuad', 'new DOMQuad(#,#,#,#)', p1, p2, p3, p4); |
| static DomQuad _create_2(p1, p2, p3) => |
| JS('DomQuad', 'new DOMQuad(#,#,#)', p1, p2, p3); |
| static DomQuad _create_3(p1, p2) => JS('DomQuad', 'new DOMQuad(#,#)', p1, p2); |
| static DomQuad _create_4(p1) => JS('DomQuad', 'new DOMQuad(#)', p1); |
| static DomQuad _create_5() => JS('DomQuad', 'new DOMQuad()'); |
| |
| DomPoint? get p1 native; |
| |
| DomPoint? get p2 native; |
| |
| DomPoint? get p3 native; |
| |
| DomPoint? get p4 native; |
| |
| static DomQuad fromQuad([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _fromQuad_1(other_1); |
| } |
| return _fromQuad_2(); |
| } |
| |
| @JSName('fromQuad') |
| static DomQuad _fromQuad_1(other) native; |
| @JSName('fromQuad') |
| static DomQuad _fromQuad_2() native; |
| |
| static DomQuad fromRect([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _fromRect_1(other_1); |
| } |
| return _fromRect_2(); |
| } |
| |
| @JSName('fromRect') |
| static DomQuad _fromRect_1(other) native; |
| @JSName('fromRect') |
| static DomQuad _fromRect_2() native; |
| |
| Rectangle getBounds() 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. |
| |
| @Native("ClientRectList,DOMRectList") |
| class DomRectList extends Interceptor |
| with ListMixin<Rectangle>, ImmutableListMixin<Rectangle> |
| implements List<Rectangle>, JavaScriptIndexingBehavior<Rectangle> { |
| // To suppress missing implicit constructor warnings. |
| factory DomRectList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| int get length => JS("int", "#.length", this); |
| |
| Rectangle operator [](int index) { |
| if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) |
| throw new RangeError.index(index, this); |
| return JS("Rectangle", "#[#]", this, index); |
| } |
| |
| void operator []=(int index, Rectangle value) { |
| throw new UnsupportedError("Cannot assign element of immutable List."); |
| } |
| // -- start List<Rectangle> mixins. |
| // Rectangle is the element type. |
| |
| set length(int value) { |
| throw new UnsupportedError("Cannot resize immutable List."); |
| } |
| |
| Rectangle get first { |
| if (this.length > 0) { |
| return JS('Rectangle', '#[0]', this); |
| } |
| throw new StateError("No elements"); |
| } |
| |
| Rectangle get last { |
| int len = this.length; |
| if (len > 0) { |
| return JS('Rectangle', '#[#]', this, len - 1); |
| } |
| throw new StateError("No elements"); |
| } |
| |
| Rectangle get single { |
| int len = this.length; |
| if (len == 1) { |
| return JS('Rectangle', '#[0]', this); |
| } |
| if (len == 0) throw new StateError("No elements"); |
| throw new StateError("More than one element"); |
| } |
| |
| Rectangle elementAt(int index) => this[index]; |
| // -- end List<Rectangle> mixins. |
| |
| Rectangle? item(int index) 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. |
| |
| @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) => |
| other is Rectangle && |
| 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(this.left, this.top); |
| Point get topRight => new Point(this.left + this.width, this.top); |
| Point get bottomRight => |
| new Point(this.left + this.width, this.top + this.height); |
| Point get bottomLeft => new Point(this.left, this.top + this.height); |
| |
| // To suppress missing implicit constructor warnings. |
| factory DomRectReadOnly._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory DomRectReadOnly([num? x, num? y, num? width, num? height]) { |
| if (height != null) { |
| return DomRectReadOnly._create_1(x, y, width, height); |
| } |
| if (width != null) { |
| return DomRectReadOnly._create_2(x, y, width); |
| } |
| if (y != null) { |
| return DomRectReadOnly._create_3(x, y); |
| } |
| if (x != null) { |
| return DomRectReadOnly._create_4(x); |
| } |
| return DomRectReadOnly._create_5(); |
| } |
| static DomRectReadOnly _create_1(x, y, width, height) => JS( |
| 'DomRectReadOnly', 'new DOMRectReadOnly(#,#,#,#)', x, y, width, height); |
| static DomRectReadOnly _create_2(x, y, width) => |
| JS('DomRectReadOnly', 'new DOMRectReadOnly(#,#,#)', x, y, width); |
| static DomRectReadOnly _create_3(x, y) => |
| JS('DomRectReadOnly', 'new DOMRectReadOnly(#,#)', x, y); |
| static DomRectReadOnly _create_4(x) => |
| JS('DomRectReadOnly', 'new DOMRectReadOnly(#)', x); |
| static DomRectReadOnly _create_5() => |
| JS('DomRectReadOnly', 'new DOMRectReadOnly()'); |
| |
| // The following getter is incompatible with some browsers but |
| // must be made non-nullable to match the overridden method. |
| |
| @JSName('bottom') |
| num? get _bottom native; |
| |
| num get bottom => _bottom!; |
| |
| // The following getter is incompatible with some browsers but |
| // must be made non-nullable to match the overridden method. |
| |
| @JSName('height') |
| num? get _height native; |
| |
| num get height => _height!; |
| |
| // The following getter is incompatible with some browsers but |
| // must be made non-nullable to match the overridden method. |
| |
| @JSName('left') |
| num? get _left native; |
| |
| num get left => _left!; |
| |
| // The following getter is incompatible with some browsers but |
| // must be made non-nullable to match the overridden method. |
| |
| @JSName('right') |
| num? get _right native; |
| |
| num get right => _right!; |
| |
| // The following getter is incompatible with some browsers but |
| // must be made non-nullable to match the overridden method. |
| |
| @JSName('top') |
| num? get _top native; |
| |
| num get top => _top!; |
| |
| // The following getter is incompatible with some browsers but |
| // must be made non-nullable to match the overridden method. |
| |
| @JSName('width') |
| num? get _width native; |
| |
| num get width => _width!; |
| |
| num? get x native; |
| |
| num? get y native; |
| |
| static DomRectReadOnly fromRect([Map? other]) { |
| if (other != null) { |
| var other_1 = convertDartToNative_Dictionary(other); |
| return _fromRect_1(other_1); |
| } |
| return _fromRect_2(); |
| } |
| |
| @JSName('fromRect') |
| static DomRectReadOnly _fromRect_1(other) native; |
| @JSName('fromRect') |
| static DomRectReadOnly _fromRect_2() 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. |
| |
| @Native("DOMStringList") |
| class DomStringList extends Interceptor |
| with ListMixin<String>, ImmutableListMixin<String> |
| implements JavaScriptIndexingBehavior<String>, List<String> { |
| // To suppress missing implicit constructor warnings. |
| factory DomStringList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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 JS("String", "#[#]", this, 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. |
| |
| 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. |
| |
| @Native("DOMStringMap") |
| class DomStringMap extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomStringMap._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| void __delete__(String name) native; |
| |
| void __setter__(String name, String value) native; |
| |
| String item(String 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. |
| |
| @Native("DOMTokenList") |
| class DomTokenList extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory DomTokenList._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| int get length native; |
| |
| String? get value native; |
| |
| set value(String? value) native; |
| |
| void add(String tokens) native; |
| |
| bool contains(String token) native; |
| |
| String? item(int index) native; |
| |
| void remove(String tokens) native; |
| |
| void replace(String token, String newToken) native; |
| |
| bool supports(String token) native; |
| |
| 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. |
| |
| class _ChildrenElementList extends ListBase<Element> |
| implements NodeListWrapper { |
| // Raw Element. |
| final Element _element; |
| final HtmlCollection _childElements; |
| |
| _ChildrenElementList._wrap(Element element) |
| : _childElements = element._children as HtmlCollection, |
| _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] as Element; |
| } |
| |
| 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) { |
| _addAll(_element, iterable); |
| } |
| |
| static void _addAll(Element _element, 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 fillRange(int start, int end, [Element? fillValue]) { |
| throw new UnimplementedError(); |
| } |
| |
| void replaceRange(int start, int end, Iterable<Element> iterable) { |
| throw new UnimplementedError(); |
| } |
| |
| void removeRange(int start, int end) { |
| throw new UnimplementedError(); |
| } |
| |
| void setRange(int start, int end, Iterable<Element> iterable, |
| [int skipCount = 0]) { |
| throw new UnimplementedError(); |
| } |
| |
| bool remove(Object? object) { |
| return _remove(_element, object); |
| } |
| |
| static bool _remove(Element _element, 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 insertAll(int index, Iterable<Element> iterable) { |
| throw new UnimplementedError(); |
| } |
| |
| void setAll(int index, Iterable<Element> iterable) { |
| throw new UnimplementedError(); |
| } |
| |
| void clear() { |
| _element._clearChildren(); |
| } |
| |
| Element removeAt(int index) { |
| final result = this[index]; |
| // TODO(41258): Remove null check after unfork/strong mode. |
| if (result != null) { |
| _element._removeChild(result); |
| } |
| return result; |
| } |
| |
| Element removeLast() { |
| final result = this.last; |
| _element._removeChild(result); |
| return result; |
| } |
| |
| Element get first => _first(_element); |
| |
| @pragma('dart2js:noInline') |
| static Element _first(Element _element) { |
| 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 [Element]s 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 |
| * dimensions 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 [Element.getBoundingClientRect], the dimensions of this rectangle |
| * will return the same numerical height if the element is hidden or not. |
| */ |
| CssRect get contentEdge; |
| |
| /** |
| * Access dimensions and position of the first [Element]'s content + padding |
| * box in this list. |
| * |
| * This returns a rectangle with the dimensions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [Element.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. |
| */ |
| 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 dimensions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [Element.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. |
| */ |
| 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 dimensions actually available for content |
| * in this element, in pixels, regardless of this element's box-sizing |
| * property. Unlike [Element.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. |
| */ |
| CssRect get marginEdge; |
| |
| /// Stream of `abort` events handled by this [Element]. |
| ElementStream<Event> get onAbort; |
| |
| /// Stream of `beforecopy` events handled by this [Element]. |
| ElementStream<Event> get onBeforeCopy; |
| |
| /// Stream of `beforecut` events handled by this [Element]. |
| ElementStream<Event> get onBeforeCut; |
| |
| /// Stream of `beforepaste` events handled by this [Element]. |
| ElementStream<Event> get onBeforePaste; |
| |
| /// Stream of `blur` events handled by this [Element]. |
| ElementStream<Event> get onBlur; |
| |
| ElementStream<Event> get onCanPlay; |
| |
| ElementStream<Event> get onCanPlayThrough; |
| |
| /// Stream of `change` events handled by this [Element]. |
| ElementStream<Event> get onChange; |
| |
| /// Stream of `click` events handled by this [Element]. |
| ElementStream<MouseEvent> get onClick; |
| |
| /// Stream of `contextmenu` events handled by this [Element]. |
| ElementStream<MouseEvent> get onContextMenu; |
| |
| /// Stream of `copy` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onCopy; |
| |
| /// Stream of `cut` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onCut; |
| |
| /// Stream of `doubleclick` events handled by this [Element]. |
| @DomName('Element.ondblclick') |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| ElementStream<MouseEvent> get onDrop; |
| |
| ElementStream<Event> get onDurationChange; |
| |
| ElementStream<Event> get onEmptied; |
| |
| ElementStream<Event> get onEnded; |
| |
| /// Stream of `error` events handled by this [Element]. |
| ElementStream<Event> get onError; |
| |
| /// Stream of `focus` events handled by this [Element]. |
| ElementStream<Event> get onFocus; |
| |
| /// Stream of `input` events handled by this [Element]. |
| ElementStream<Event> get onInput; |
| |
| /// Stream of `invalid` events handled by this [Element]. |
| ElementStream<Event> get onInvalid; |
| |
| /// Stream of `keydown` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyDown; |
| |
| /// Stream of `keypress` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyPress; |
| |
| /// Stream of `keyup` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyUp; |
| |
| /// Stream of `load` events handled by this [Element]. |
| ElementStream<Event> get onLoad; |
| |
| ElementStream<Event> get onLoadedData; |
| |
| ElementStream<Event> get onLoadedMetadata; |
| |
| /// Stream of `mousedown` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseDown; |
| |
| /// Stream of `mouseenter` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseEnter; |
| |
| /// Stream of `mouseleave` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseLeave; |
| |
| /// Stream of `mousemove` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseMove; |
| |
| /// Stream of `mouseout` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseOut; |
| |
| /// Stream of `mouseover` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseOver; |
| |
| /// Stream of `mouseup` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseUp; |
| |
| /// Stream of `mousewheel` events handled by this [Element]. |
| ElementStream<WheelEvent> get onMouseWheel; |
| |
| /// Stream of `paste` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onPaste; |
| |
| ElementStream<Event> get onPause; |
| |
| ElementStream<Event> get onPlay; |
| |
| ElementStream<Event> get onPlaying; |
| |
| ElementStream<Event> get onRateChange; |
| |
| /// Stream of `reset` events handled by this [Element]. |
| ElementStream<Event> get onReset; |
| |
| ElementStream<Event> get onResize; |
| |
| /// Stream of `scroll` events handled by this [Element]. |
| ElementStream<Event> get onScroll; |
| |
| /// Stream of `search` events handled by this [Element]. |
| ElementStream<Event> get onSearch; |
| |
| ElementStream<Event> get onSeeked; |
| |
| ElementStream<Event> get onSeeking; |
| |
| /// Stream of `select` events handled by this [Element]. |
| ElementStream<Event> get onSelect; |
| |
| /// Stream of `selectstart` events handled by this [Element]. |
| ElementStream<Event> get onSelectStart; |
| |
| ElementStream<Event> get onStalled; |
| |
| /// Stream of `submit` events handled by this [Element]. |
| ElementStream<Event> get onSubmit; |
| |
| ElementStream<Event> get onSuspend; |
| |
| ElementStream<Event> get onTimeUpdate; |
| |
| /// Stream of `touchcancel` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchCancel; |
| |
| /// Stream of `touchend` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchEnd; |
| |
| /// Stream of `touchenter` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchEnter; |
| |
| /// Stream of `touchleave` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchLeave; |
| |
| /// Stream of `touchmove` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchMove; |
| |
| /// Stream of `touchstart` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchStart; |
| |
| /// Stream of `transitionend` events handled by this [Element]. |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| ElementStream<TransitionEvent> get onTransitionEnd; |
| |
| ElementStream<Event> get onVolumeChange; |
| |
| ElementStream<Event> get onWaiting; |
| |
| /// Stream of `fullscreenchange` events handled by this [Element]. |
| ElementStream<Event> get onFullscreenChange; |
| |
| /// Stream of `fullscreenerror` events handled by this [Element]. |
| ElementStream<Event> get onFullscreenError; |
| |
| ElementStream<WheelEvent> get onWheel; |
| } |
| |
| // 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) { |
| assert(this._nodeList.every((element) => element is E), |
| "Query expects only HTML elements of type $E but found ${this._nodeList.firstWhere((e) => e is! E)}"); |
| } |
| |
| int get length => _nodeList.length; |
| |
| E operator [](int index) => _nodeList[index] as E; |
| |
| 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 => _nodeList.first as E; |
| |
| E get last => _nodeList.last as E; |
| |
| E get single => _nodeList.single as E; |
| |
| 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]. |
| ElementStream<Event> get onAbort => Element.abortEvent._forElementList(this); |
| |
| /// Stream of `beforecopy` events handled by this [Element]. |
| ElementStream<Event> get onBeforeCopy => |
| Element.beforeCopyEvent._forElementList(this); |
| |
| /// Stream of `beforecut` events handled by this [Element]. |
| ElementStream<Event> get onBeforeCut => |
| Element.beforeCutEvent._forElementList(this); |
| |
| /// Stream of `beforepaste` events handled by this [Element]. |
| ElementStream<Event> get onBeforePaste => |
| Element.beforePasteEvent._forElementList(this); |
| |
| /// Stream of `blur` events handled by this [Element]. |
| ElementStream<Event> get onBlur => Element.blurEvent._forElementList(this); |
| |
| ElementStream<Event> get onCanPlay => |
| Element.canPlayEvent._forElementList(this); |
| |
| ElementStream<Event> get onCanPlayThrough => |
| Element.canPlayThroughEvent._forElementList(this); |
| |
| /// Stream of `change` events handled by this [Element]. |
| ElementStream<Event> get onChange => |
| Element.changeEvent._forElementList(this); |
| |
| /// Stream of `click` events handled by this [Element]. |
| ElementStream<MouseEvent> get onClick => |
| Element.clickEvent._forElementList(this); |
| |
| /// Stream of `contextmenu` events handled by this [Element]. |
| ElementStream<MouseEvent> get onContextMenu => |
| Element.contextMenuEvent._forElementList(this); |
| |
| /// Stream of `copy` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onCopy => |
| Element.copyEvent._forElementList(this); |
| |
| /// Stream of `cut` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onCut => |
| Element.cutEvent._forElementList(this); |
| |
| /// Stream of `doubleclick` events handled by this [Element]. |
| @DomName('Element.ondblclick') |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| ElementStream<MouseEvent> get onDrop => |
| Element.dropEvent._forElementList(this); |
| |
| ElementStream<Event> get onDurationChange => |
| Element.durationChangeEvent._forElementList(this); |
| |
| ElementStream<Event> get onEmptied => |
| Element.emptiedEvent._forElementList(this); |
| |
| ElementStream<Event> get onEnded => Element.endedEvent._forElementList(this); |
| |
| /// Stream of `error` events handled by this [Element]. |
| ElementStream<Event> get onError => Element.errorEvent._forElementList(this); |
| |
| /// Stream of `focus` events handled by this [Element]. |
| ElementStream<Event> get onFocus => Element.focusEvent._forElementList(this); |
| |
| /// Stream of `input` events handled by this [Element]. |
| ElementStream<Event> get onInput => Element.inputEvent._forElementList(this); |
| |
| /// Stream of `invalid` events handled by this [Element]. |
| ElementStream<Event> get onInvalid => |
| Element.invalidEvent._forElementList(this); |
| |
| /// Stream of `keydown` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyDown => |
| Element.keyDownEvent._forElementList(this); |
| |
| /// Stream of `keypress` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyPress => |
| Element.keyPressEvent._forElementList(this); |
| |
| /// Stream of `keyup` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyUp => |
| Element.keyUpEvent._forElementList(this); |
| |
| /// Stream of `load` events handled by this [Element]. |
| ElementStream<Event> get onLoad => Element.loadEvent._forElementList(this); |
| |
| ElementStream<Event> get onLoadedData => |
| Element.loadedDataEvent._forElementList(this); |
| |
| ElementStream<Event> get onLoadedMetadata => |
| Element.loadedMetadataEvent._forElementList(this); |
| |
| /// Stream of `mousedown` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseDown => |
| Element.mouseDownEvent._forElementList(this); |
| |
| /// Stream of `mouseenter` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseEnter => |
| Element.mouseEnterEvent._forElementList(this); |
| |
| /// Stream of `mouseleave` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseLeave => |
| Element.mouseLeaveEvent._forElementList(this); |
| |
| /// Stream of `mousemove` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseMove => |
| Element.mouseMoveEvent._forElementList(this); |
| |
| /// Stream of `mouseout` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseOut => |
| Element.mouseOutEvent._forElementList(this); |
| |
| /// Stream of `mouseover` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseOver => |
| Element.mouseOverEvent._forElementList(this); |
| |
| /// Stream of `mouseup` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseUp => |
| Element.mouseUpEvent._forElementList(this); |
| |
| /// Stream of `mousewheel` events handled by this [Element]. |
| ElementStream<WheelEvent> get onMouseWheel => |
| Element.mouseWheelEvent._forElementList(this); |
| |
| /// Stream of `paste` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onPaste => |
| Element.pasteEvent._forElementList(this); |
| |
| ElementStream<Event> get onPause => Element.pauseEvent._forElementList(this); |
| |
| ElementStream<Event> get onPlay => Element.playEvent._forElementList(this); |
| |
| ElementStream<Event> get onPlaying => |
| Element.playingEvent._forElementList(this); |
| |
| ElementStream<Event> get onRateChange => |
| Element.rateChangeEvent._forElementList(this); |
| |
| /// Stream of `reset` events handled by this [Element]. |
| ElementStream<Event> get onReset => Element.resetEvent._forElementList(this); |
| |
| ElementStream<Event> get onResize => |
| Element.resizeEvent._forElementList(this); |
| |
| /// Stream of `scroll` events handled by this [Element]. |
| ElementStream<Event> get onScroll => |
| Element.scrollEvent._forElementList(this); |
| |
| /// Stream of `search` events handled by this [Element]. |
| ElementStream<Event> get onSearch => |
| Element.searchEvent._forElementList(this); |
| |
| ElementStream<Event> get onSeeked => |
| Element.seekedEvent._forElementList(this); |
| |
| ElementStream<Event> get onSeeking => |
| Element.seekingEvent._forElementList(this); |
| |
| /// Stream of `select` events handled by this [Element]. |
| ElementStream<Event> get onSelect => |
| Element.selectEvent._forElementList(this); |
| |
| /// Stream of `selectstart` events handled by this [Element]. |
| ElementStream<Event> get onSelectStart => |
| Element.selectStartEvent._forElementList(this); |
| |
| ElementStream<Event> get onStalled => |
| Element.stalledEvent._forElementList(this); |
| |
| /// Stream of `submit` events handled by this [Element]. |
| ElementStream<Event> get onSubmit => |
| Element.submitEvent._forElementList(this); |
| |
| ElementStream<Event> get onSuspend => |
| Element.suspendEvent._forElementList(this); |
| |
| ElementStream<Event> get onTimeUpdate => |
| Element.timeUpdateEvent._forElementList(this); |
| |
| /// Stream of `touchcancel` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchCancel => |
| Element.touchCancelEvent._forElementList(this); |
| |
| /// Stream of `touchend` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchEnd => |
| Element.touchEndEvent._forElementList(this); |
| |
| /// Stream of `touchenter` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchEnter => |
| Element.touchEnterEvent._forElementList(this); |
| |
| /// Stream of `touchleave` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchLeave => |
| Element.touchLeaveEvent._forElementList(this); |
| |
| /// Stream of `touchmove` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchMove => |
| Element.touchMoveEvent._forElementList(this); |
| |
| /// Stream of `touchstart` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchStart => |
| Element.touchStartEvent._forElementList(this); |
| |
| /// Stream of `transitionend` events handled by this [Element]. |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| ElementStream<TransitionEvent> get onTransitionEnd => |
| Element.transitionEndEvent._forElementList(this); |
| |
| ElementStream<Event> get onVolumeChange => |
| Element.volumeChangeEvent._forElementList(this); |
| |
| ElementStream<Event> get onWaiting => |
| Element.waitingEvent._forElementList(this); |
| |
| /// Stream of `fullscreenchange` events handled by this [Element]. |
| ElementStream<Event> get onFullscreenChange => |
| Element.fullscreenChangeEvent._forElementList(this); |
| |
| /// Stream of `fullscreenerror` events handled by this [Element]. |
| ElementStream<Event> get onFullscreenError => |
| Element.fullscreenErrorEvent._forElementList(this); |
| |
| ElementStream<WheelEvent> get onWheel => |
| Element.wheelEvent._forElementList(this); |
| } |
| |
| /** |
| * An abstract class, which all HTML elements extend. |
| */ |
| @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 as Element; |
| } |
| |
| /** |
| * 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 better to use the element type constructors: |
| * |
| * var element = new DivElement(); |
| * |
| * It is better to use e.g `new CanvasElement()` because the type of the |
| * expression is `CanvasElement`, whereas the type of `Element.tag` is the |
| * less specific `Element`. |
| * |
| * See also: |
| * |
| * * [isTagSupported] |
| */ |
| factory Element.tag(String tag, [String? typeExtension]) => |
| _ElementFactoryProvider.createElement_tag(tag, typeExtension); |
| |
| /// Creates a new `<a>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('a')`. |
| factory Element.a() => new AnchorElement(); |
| |
| /// Creates a new `<article>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('article')`. |
| factory Element.article() => new Element.tag('article'); |
| |
| /// Creates a new `<aside>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('aside')`. |
| factory Element.aside() => new Element.tag('aside'); |
| |
| /// Creates a new `<audio>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('audio')`. |
| factory Element.audio() => new Element.tag('audio'); |
| |
| /// Creates a new `<br>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('br')`. |
| factory Element.br() => new BRElement(); |
| |
| /// Creates a new `<canvas>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('canvas')`. |
| factory Element.canvas() => new CanvasElement(); |
| |
| /// Creates a new `<div>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('div')`. |
| factory Element.div() => new DivElement(); |
| |
| /// Creates a new `<footer>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('footer')`. |
| factory Element.footer() => new Element.tag('footer'); |
| |
| /// Creates a new `<header>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('header')`. |
| factory Element.header() => new Element.tag('header'); |
| |
| /// Creates a new `<hr>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('hr')`. |
| factory Element.hr() => new Element.tag('hr'); |
| |
| /// Creates a new `<iframe>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('iframe')`. |
| factory Element.iframe() => new Element.tag('iframe'); |
| |
| /// Creates a new `<img>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('img')`. |
| factory Element.img() => new Element.tag('img'); |
| |
| /// Creates a new `<li>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('li')`. |
| factory Element.li() => new Element.tag('li'); |
| |
| /// Creates a new `<nav>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('nav')`. |
| factory Element.nav() => new Element.tag('nav'); |
| |
| /// Creates a new `<ol>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('ol')`. |
| factory Element.ol() => new Element.tag('ol'); |
| |
| /// Creates a new `<option>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('option')`. |
| factory Element.option() => new Element.tag('option'); |
| |
| /// Creates a new `<p>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('p')`. |
| factory Element.p() => new Element.tag('p'); |
| |
| /// Creates a new `<pre>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('pre')`. |
| factory Element.pre() => new Element.tag('pre'); |
| |
| /// Creates a new `<section>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('section')`. |
| factory Element.section() => new Element.tag('section'); |
| |
| /// Creates a new `<select>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('select')`. |
| factory Element.select() => new Element.tag('select'); |
| |
| /// Creates a new `<span>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('span')`. |
| factory Element.span() => new Element.tag('span'); |
| |
| /// Creates a new `<svg>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('svg')`. |
| factory Element.svg() => new Element.tag('svg'); |
| |
| /// Creates a new `<table>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('table')`. |
| factory Element.table() => new Element.tag('table'); |
| |
| /// Creates a new `<td>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('td')`. |
| factory Element.td() => new Element.tag('td'); |
| |
| /// Creates a new `<textarea>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('textarea')`. |
| factory Element.textarea() => new Element.tag('textarea'); |
| |
| /// Creates a new `<th>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('th')`. |
| factory Element.th() => new Element.tag('th'); |
| |
| /// Creates a new `<tr>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('tr')`. |
| factory Element.tr() => new Element.tag('tr'); |
| |
| /// Creates a new `<ul>` element. |
| /// |
| /// This is equivalent to calling `new Element.tag('ul')`. |
| factory Element.ul() => new Element.tag('ul'); |
| |
| /// Creates a new `<video>` element. |
| /// |
| /// This is equivalent 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]!; |
| } |
| } |
| |
| @pragma('dart2js:tryInline') |
| String? getAttribute(String name) { |
| // TODO(41258): Delete this assertion after forcing strong mode. |
| // Protect [name] against string conversion to "null" or "undefined". |
| assert(name != null, 'Attribute name cannot be null'); |
| return _getAttribute(name); |
| } |
| |
| @pragma('dart2js:tryInline') |
| String? getAttributeNS(String? namespaceURI, String name) { |
| // TODO(41258): Delete this assertion after forcing strong mode. |
| // Protect [name] against string conversion to "null" or "undefined". |
| // [namespaceURI] does not need protecting, both `null` and `undefined` map to `null`. |
| assert(name != null, 'Attribute name cannot be null'); |
| return _getAttributeNS(namespaceURI, name); |
| } |
| |
| @pragma('dart2js:tryInline') |
| bool hasAttribute(String name) { |
| // TODO(41258): Delete this assertion after forcing strong mode. |
| // Protect [name] against string conversion to "null" or "undefined". |
| assert(name != null, 'Attribute name cannot be null'); |
| return _hasAttribute(name); |
| } |
| |
| @pragma('dart2js:tryInline') |
| bool hasAttributeNS(String? namespaceURI, String name) { |
| // TODO(41258): Delete this assertion after forcing strong mode. |
| // Protect [name] against string conversion to "null" or "undefined". |
| // [namespaceURI] does not need protecting, both `null` and `undefined` map to `null`. |
| assert(name != null, 'Attribute name cannot be null'); |
| return _hasAttributeNS(namespaceURI, name); |
| } |
| |
| @pragma('dart2js:tryInline') |
| void removeAttribute(String name) { |
| // TODO(41258): Delete this assertion after forcing strong mode. |
| // Protect [name] against string conversion to "null" or "undefined". |
| assert(name != null, 'Attribute name cannot be null'); |
| _removeAttribute(name); |
| } |
| |
| @pragma('dart2js:tryInline') |
| void removeAttributeNS(String? namespaceURI, String name) { |
| // TODO(41258): Delete this assertion after forcing strong mode. |
| // Protect [name] against string conversion to "null" or "undefined". |
| assert(name != null, 'Attribute name cannot be null'); |
| _removeAttributeNS(namespaceURI, name); |
| } |
| |
| @pragma('dart2js:tryInline') |
| void setAttribute(String name, String value) { |
| // TODO(41258): Delete these assertions after forcing strong mode. |
| // Protect [name] against string conversion to "null" or "undefined". |
| assert(name != null, 'Attribute name cannot be null'); |
| // TODO(sra): assert(value != null, 'Attribute value cannot be null.'); |
| _setAttribute(name, value); |
| } |
| |
| @pragma('dart2js:tryInline') |
| void setAttributeNS(String? namespaceURI, String name, String value) { |
| // TODO(41258): Delete these assertions after forcing strong mode. |
| // Protect [name] against string conversion to "null" or "undefined". |
| assert(name != null, 'Attribute name cannot be null'); |
| // TODO(sra): assert(value != null, 'Attribute value cannot be null.'); |
| _setAttributeNS(namespaceURI, name, value); |
| } |
| |
| /** |
| * 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); |
| |
| List<Node> get _children => |
| // Element.children always returns the same list-like object which is a |
| // live view on the underlying DOM tree. So we can GVN it and remove it if |
| // unused. |
| JS( |
| 'returns:HtmlCollection;creates:HtmlCollection;' |
| 'depends:none;effects:none;gvn:true', |
| '#.children', |
| 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/). |
| */ |
| ElementList<T> querySelectorAll<T extends Element>(String selectors) => |
| new _FrozenElementList<T>._wrap(_querySelectorAll(selectors)); |
| |
| @JSName('setApplyScroll') |
| void _setApplyScroll(ScrollStateCallback scrollStateCallback, |
| String nativeScrollBehavior) native; |
| |
| Future<ScrollState> setApplyScroll(String nativeScrollBehavior) { |
| var completer = new Completer<ScrollState>(); |
| _setApplyScroll((value) { |
| completer.complete(value); |
| }, nativeScrollBehavior); |
| return completer.future; |
| } |
| |
| @JSName('setDistributeScroll') |
| void _setDistributeScroll(ScrollStateCallback scrollStateCallback, |
| String nativeScrollBehavior) native; |
| |
| Future<ScrollState> setDistributeScroll(String nativeScrollBehavior) { |
| var completer = new Completer<ScrollState>(); |
| _setDistributeScroll((value) { |
| completer.complete(value); |
| }, nativeScrollBehavior); |
| return completer.future; |
| } |
| |
| /** |
| * 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: |
| * |
| * * [Cascade and Inheritance](https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Cascade_and_inheritance) |
| * from MDN. |
| * * [Pseudo-elements](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements) |
| * from MDN. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| void detached() { |
| // For the deprecation period, call the old callback. |
| leftView(); |
| } |
| |
| /** *Deprecated*: override [attached] instead. */ |
| @deprecated |
| void enteredView() {} |
| |
| List<Rectangle> getClientRects() { |
| var value = _getClientRects(); |
| |
| // If no prototype we need one for the world to hookup to the proper Dart class. |
| var jsProto = JS('', '#.prototype', value); |
| if (jsProto == null) { |
| JS('', '#.prototype = Object.create(null)', value); |
| } |
| |
| applyExtension('DOMRectList', value); |
| |
| return value; |
| } |
| |
| /** *Deprecated*: override [detached] instead. */ |
| @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] parameter can be a double, representing the number of |
| * milliseconds for the transition, or a Map with fields corresponding to |
| * those of the [timing] object. |
| */ |
| @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); |
| } |
| |
| @JSName('animate') |
| 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) {} |
| |
| @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. |
| */ |
| 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](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView) |
| * from MDN. |
| * * [scrollIntoViewIfNeeded](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoViewIfNeeded) |
| * from MDN. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| * |
| * ```dart |
| * 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. |
| */ |
| 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. */ |
| bool matchesWithAncestors(String selectors) { |
| var elem = this as Element?; |
| 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. |
| */ |
| @SupportedBrowser(SupportedBrowser.CHROME, '25') |
| 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. |
| */ |
| @SupportedBrowser(SupportedBrowser.CHROME, '25') |
| ShadowRoot? get shadowRoot => |
| JS('ShadowRoot|Null', '#.shadowRoot || #.webkitShadowRoot', this, this); |
| |
| /** |
| * Access this element's content position. |
| * |
| * This returns a rectangle with the dimensions 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) |
| */ |
| CssRect get contentEdge => new _ContentCssRect(this); |
| |
| /** |
| * Access the dimensions and position of this element's content + padding box. |
| * |
| * This returns a rectangle with the dimensions 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) |
| */ |
| 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 dimensions 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) |
| */ |
| 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 dimensions 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) |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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(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(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') as BaseElement; |
| base.href = document.baseUri!; |
| _parseDocument!.head!.append(base); |
| } |
| |
| // TODO(terry): Fixes Chromium 50 change no body after createHtmlDocument() |
| if (_parseDocument!.body == null) { |
| _parseDocument!.body = |
| _parseDocument!.createElement("body") as BodyElement; |
| } |
| |
| var contextElement; |
| if (this is BodyElement) { |
| contextElement = _parseDocument!.body!; |
| } else { |
| contextElement = _parseDocument!.createElement(tagName); |
| _parseDocument!.body!.append(contextElement); |
| } |
| DocumentFragment fragment; |
| if (Range.supportsCreateContextualFragment && |
| _canBeUsedToCreateContextualFragment) { |
| _parseRange!.selectNodeContents(contextElement); |
| // createContextualFragment expects a non-nullable html string. |
| // If null is passed, it gets converted to 'null' instead. |
| fragment = _parseRange!.createContextualFragment(html ?? 'null'); |
| } 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; |
| |
| @JSName('innerText') |
| String get innerText native; |
| set innerText(String value) native; |
| |
| /** |
| * 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; |
| } |
| // If something has corrupted the traversal we want to detect |
| // these on not only the children (tested below) but on the node itself |
| // in case it was bypassed. |
| if (element["id"] == 'lastChild' || element["name"] == 'lastChild' || |
| element["id"] == 'previousSibling' || element["name"] == 'previousSibling' || |
| element["id"] == 'children' || element["name"] == 'children') { |
| 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"] == 'previousSibling' || child["name"] == 'previousSibling' || |
| 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; |
| } |
| |
| Element? get offsetParent native; |
| |
| int get offsetHeight => JS<num>('num', '#.offsetHeight', this).round(); |
| |
| int get offsetLeft => JS<num>('num', '#.offsetLeft', this).round(); |
| |
| int get offsetTop => JS<num>('num', '#.offsetTop', this).round(); |
| |
| int get offsetWidth => JS<num>('num', '#.offsetWidth', this).round(); |
| |
| int get scrollHeight => JS<num>('num', '#.scrollHeight', this).round(); |
| int get scrollLeft => JS<num>('num', '#.scrollLeft', this).round(); |
| |
| set scrollLeft(int value) { |
| JS("void", "#.scrollLeft = #", this, value.round()); |
| } |
| |
| int get scrollTop => JS<num>('num', '#.scrollTop', this).round(); |
| |
| set scrollTop(int value) { |
| JS("void", "#.scrollTop = #", this, value.round()); |
| } |
| |
| int get scrollWidth => JS<num>('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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<Event> blurEvent = |
| const EventStreamProvider<Event>('blur'); |
| |
| static const EventStreamProvider<Event> canPlayEvent = |
| const EventStreamProvider<Event>('canplay'); |
| |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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') |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<MouseEvent> dropEvent = |
| const EventStreamProvider<MouseEvent>('drop'); |
| |
| static const EventStreamProvider<Event> durationChangeEvent = |
| const EventStreamProvider<Event>('durationchange'); |
| |
| static const EventStreamProvider<Event> emptiedEvent = |
| const EventStreamProvider<Event>('emptied'); |
| |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<Event> loadEvent = |
| const EventStreamProvider<Event>('load'); |
| |
| static const EventStreamProvider<Event> loadedDataEvent = |
| const EventStreamProvider<Event>('loadeddata'); |
| |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<ClipboardEvent> pasteEvent = |
| const EventStreamProvider<ClipboardEvent>('paste'); |
| |
| static const EventStreamProvider<Event> pauseEvent = |
| const EventStreamProvider<Event>('pause'); |
| |
| static const EventStreamProvider<Event> playEvent = |
| const EventStreamProvider<Event>('play'); |
| |
| static const EventStreamProvider<Event> playingEvent = |
| const EventStreamProvider<Event>('playing'); |
| |
| 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. |
| */ |
| static const EventStreamProvider<Event> resetEvent = |
| const EventStreamProvider<Event>('reset'); |
| |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<Event> searchEvent = |
| const EventStreamProvider<Event>('search'); |
| |
| static const EventStreamProvider<Event> seekedEvent = |
| const EventStreamProvider<Event>('seeked'); |
| |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<Event> selectStartEvent = |
| const EventStreamProvider<Event>('selectstart'); |
| |
| 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. |
| */ |
| static const EventStreamProvider<Event> submitEvent = |
| const EventStreamProvider<Event>('submit'); |
| |
| static const EventStreamProvider<Event> suspendEvent = |
| const EventStreamProvider<Event>('suspend'); |
| |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| static const EventStreamProvider<TouchEvent> touchStartEvent = |
| const EventStreamProvider<TouchEvent>('touchstart'); |
| |
| static const EventStreamProvider<Event> volumeChangeEvent = |
| const EventStreamProvider<Event>('volumechange'); |
| |
| 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. |
| */ |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| 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. |
| */ |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| static const EventStreamProvider<Event> fullscreenErrorEvent = |
| const EventStreamProvider<Event>('webkitfullscreenerror'); |
| |
| static const EventStreamProvider<WheelEvent> wheelEvent = |
| const EventStreamProvider<WheelEvent>('wheel'); |
| |
| String get contentEditable native; |
| |
| set contentEditable(String value) native; |
| |
| String? get dir native; |
| |
| set dir(String? value) native; |
| |
| /** |
| * 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. |
| */ |
| |
| bool get draggable native; |
| |
| set draggable(bool value) native; |
| |
| /** |
| * 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. |
| */ |
| |
| bool get hidden native; |
| |
| set hidden(bool value) native; |
| |
| bool? get inert native; |
| |
| set inert(bool? value) native; |
| |
| String? get inputMode native; |
| |
| set inputMode(String? value) native; |
| |
| bool? get isContentEditable native; |
| |
| String? get lang native; |
| |
| set lang(String? value) native; |
| |
| bool? get spellcheck native; |
| |
| set spellcheck(bool? value) native; |
| |
| CssStyleDeclaration get style native; |
| |
| int? get tabIndex native; |
| |
| set tabIndex(int? value) native; |
| |
| String? get title native; |
| |
| set title(String? value) native; |
| |
| /** |
| * 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. |
| */ |
| |
| bool? get translate native; |
| |
| set translate(bool? value) native; |
| |
| void blur() native; |
| |
| void click() native; |
| |
| void focus() native; |
| |
| AccessibleNode? get accessibleNode native; |
| |
| SlotElement? get assignedSlot native; |
| |
| @JSName('attributes') |
| _NamedNodeMap? get _attributes native; |
| |
| String get className native; |
| |
| set className(String value) native; |
| |
| int get clientHeight native; |
| |
| int? get clientLeft native; |
| |
| int? get clientTop native; |
| |
| int get clientWidth native; |
| |
| String? get computedName native; |
| |
| String? get computedRole native; |
| |
| String get id native; |
| |
| set id(String value) native; |
| |
| @JSName('innerHTML') |
| String? get _innerHtml native; |
| |
| @JSName('innerHTML') |
| set _innerHtml(String? value) native; |
| |
| @JSName('localName') |
| String? get _localName native; |
| |
| @JSName('namespaceURI') |
| String? get _namespaceUri native; |
| |
| @JSName('outerHTML') |
| String? get outerHtml native; |
| |
| @JSName('scrollHeight') |
| int? get _scrollHeight native; |
| |
| @JSName('scrollLeft') |
| num get _scrollLeft native; |
| |
| @JSName('scrollLeft') |
| set _scrollLeft(num value) native; |
| |
| @JSName('scrollTop') |
| num get _scrollTop native; |
| |
| @JSName('scrollTop') |
| set _scrollTop(num value) native; |
| |
| @JSName('scrollWidth') |
| int? get _scrollWidth native; |
| |
| String? get slot native; |
| |
| set slot(String? value) native; |
| |
| StylePropertyMap? get styleMap native; |
| |
| String get tagName native; |
| |
| ShadowRoot attachShadow(Map shadowRootInitDict) { |
| var shadowRootInitDict_1 = |
| convertDartToNative_Dictionary(shadowRootInitDict); |
| return _attachShadow_1(shadowRootInitDict_1); |
| } |
| |
| @JSName('attachShadow') |
| ShadowRoot _attachShadow_1(shadowRootInitDict) native; |
| |
| Element? closest(String selectors) native; |
| |
| List<Animation> getAnimations() native; |
| |
| @JSName('getAttribute') |
| String? _getAttribute(String name) native; |
| |
| @JSName('getAttributeNS') |
| String? _getAttributeNS(String? namespaceURI, String localName) native; |
| |
| List<String> getAttributeNames() 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. |
| */ |
| @Creates('_DomRect') |
| @Returns('_DomRect|Null') |
| Rectangle getBoundingClientRect() native; |
| |
| @JSName('getClientRects') |
| /** |
| * 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. |
| */ |
| @Creates('DomRectList') |
| @Returns('DomRectList|Null') |
| 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. |
| */ |
| @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. |
| */ |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> getElementsByClassName(String classNames) native; |
| |
| @JSName('getElementsByTagName') |
| @Creates('NodeList|HtmlCollection') |
| @Returns('NodeList|HtmlCollection') |
| List<Node> _getElementsByTagName(String localName) native; |
| |
| @JSName('hasAttribute') |
| bool _hasAttribute(String name) native; |
| |
| @JSName('hasAttributeNS') |
| bool _hasAttributeNS(String? namespaceURI, String localName) native; |
| |
| bool hasPointerCapture(int pointerId) native; |
| |
| void releasePointerCapture(int pointerId) native; |
| |
| @JSName('removeAttribute') |
| void _removeAttribute(String name) native; |
| |
| @JSName('removeAttributeNS') |
| void _removeAttributeNS(String? namespaceURI, String localName) native; |
| |
| void requestPointerLock() native; |
| |
| 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') |
| void _scroll_1() native; |
| @JSName('scroll') |
| void _scroll_2(options) native; |
| @JSName('scroll') |
| void _scroll_3(num? x, y) native; |
| |
| 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') |
| void _scrollBy_1() native; |
| @JSName('scrollBy') |
| void _scrollBy_2(options) native; |
| @JSName('scrollBy') |
| void _scrollBy_3(num? x, y) native; |
| |
| @JSName('scrollIntoView') |
| void _scrollIntoView([Object? arg]) native; |
| |
| @JSName('scrollIntoViewIfNeeded') |
| void _scrollIntoViewIfNeeded([bool? centerIfNeeded]) native; |
| |
| 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') |
| void _scrollTo_1() native; |
| @JSName('scrollTo') |
| void _scrollTo_2(options) native; |
| @JSName('scrollTo') |
| void _scrollTo_3(num? x, y) native; |
| |
| @JSName('setAttribute') |
| void _setAttribute(String name, String value) native; |
| |
| @JSName('setAttributeNS') |
| void _setAttributeNS(String? namespaceURI, String name, String value) native; |
| |
| void setPointerCapture(int pointerId) native; |
| |
| @JSName('webkitRequestFullscreen') |
| /** |
| * Displays this element fullscreen. |
| * |
| * ## Other resources |
| * |
| * * [Fullscreen |
| * API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API) |
| * from MDN. |
| * * [Fullscreen specification](http://www.w3.org/TR/fullscreen/) from W3C. |
| */ |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| void requestFullscreen() native; |
| |
| // From ChildNode |
| |
| void after(Object nodes) native; |
| |
| void before(Object nodes) native; |
| |
| // From NonDocumentTypeChildNode |
| |
| Element? get nextElementSibling native; |
| |
| Element? get previousElementSibling native; |
| |
| // From ParentNode |
| |
| @JSName('childElementCount') |
| int get _childElementCount native; |
| |
| @JSName('firstElementChild') |
| Element? get _firstElementChild native; |
| |
| @JSName('lastElementChild') |
| Element? get _lastElementChild native; |
| |
| /** |
| * 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/). |
| */ |
| Element? querySelector(String selectors) native; |
| |
| @JSName('querySelectorAll') |
| @Creates('NodeList') |
| @Returns('NodeList') |
| List<Node> _querySelectorAll(String selectors) native; |
| |
| /// Stream of `abort` events handled by this [Element]. |
| ElementStream<Event> get onAbort => abortEvent.forElement(this); |
| |
| /// Stream of `beforecopy` events handled by this [Element]. |
| ElementStream<Event> get onBeforeCopy => beforeCopyEvent.forElement(this); |
| |
| /// Stream of `beforecut` events handled by this [Element]. |
| ElementStream<Event> get onBeforeCut => beforeCutEvent.forElement(this); |
| |
| /// Stream of `beforepaste` events handled by this [Element]. |
| ElementStream<Event> get onBeforePaste => beforePasteEvent.forElement(this); |
| |
| /// Stream of `blur` events handled by this [Element]. |
| ElementStream<Event> get onBlur => blurEvent.forElement(this); |
| |
| ElementStream<Event> get onCanPlay => canPlayEvent.forElement(this); |
| |
| ElementStream<Event> get onCanPlayThrough => |
| canPlayThroughEvent.forElement(this); |
| |
| /// Stream of `change` events handled by this [Element]. |
| ElementStream<Event> get onChange => changeEvent.forElement(this); |
| |
| /// Stream of `click` events handled by this [Element]. |
| ElementStream<MouseEvent> get onClick => clickEvent.forElement(this); |
| |
| /// Stream of `contextmenu` events handled by this [Element]. |
| ElementStream<MouseEvent> get onContextMenu => |
| contextMenuEvent.forElement(this); |
| |
| /// Stream of `copy` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onCopy => copyEvent.forElement(this); |
| |
| /// Stream of `cut` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onCut => cutEvent.forElement(this); |
| |
| /// Stream of `doubleclick` events handled by this [Element]. |
| @DomName('Element.ondblclick') |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| 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. |
| */ |
| ElementStream<MouseEvent> get onDrop => dropEvent.forElement(this); |
| |
| ElementStream<Event> get onDurationChange => |
| durationChangeEvent.forElement(this); |
| |
| ElementStream<Event> get onEmptied => emptiedEvent.forElement(this); |
| |
| ElementStream<Event> get onEnded => endedEvent.forElement(this); |
| |
| /// Stream of `error` events handled by this [Element]. |
| ElementStream<Event> get onError => errorEvent.forElement(this); |
| |
| /// Stream of `focus` events handled by this [Element]. |
| ElementStream<Event> get onFocus => focusEvent.forElement(this); |
| |
| /// Stream of `input` events handled by this [Element]. |
| ElementStream<Event> get onInput => inputEvent.forElement(this); |
| |
| /// Stream of `invalid` events handled by this [Element]. |
| ElementStream<Event> get onInvalid => invalidEvent.forElement(this); |
| |
| /// Stream of `keydown` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyDown => keyDownEvent.forElement(this); |
| |
| /// Stream of `keypress` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyPress => keyPressEvent.forElement(this); |
| |
| /// Stream of `keyup` events handled by this [Element]. |
| ElementStream<KeyboardEvent> get onKeyUp => keyUpEvent.forElement(this); |
| |
| /// Stream of `load` events handled by this [Element]. |
| ElementStream<Event> get onLoad => loadEvent.forElement(this); |
| |
| ElementStream<Event> get onLoadedData => loadedDataEvent.forElement(this); |
| |
| ElementStream<Event> get onLoadedMetadata => |
| loadedMetadataEvent.forElement(this); |
| |
| /// Stream of `mousedown` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseDown => mouseDownEvent.forElement(this); |
| |
| /// Stream of `mouseenter` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseEnter => |
| mouseEnterEvent.forElement(this); |
| |
| /// Stream of `mouseleave` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseLeave => |
| mouseLeaveEvent.forElement(this); |
| |
| /// Stream of `mousemove` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseMove => mouseMoveEvent.forElement(this); |
| |
| /// Stream of `mouseout` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseOut => mouseOutEvent.forElement(this); |
| |
| /// Stream of `mouseover` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseOver => mouseOverEvent.forElement(this); |
| |
| /// Stream of `mouseup` events handled by this [Element]. |
| ElementStream<MouseEvent> get onMouseUp => mouseUpEvent.forElement(this); |
| |
| /// Stream of `mousewheel` events handled by this [Element]. |
| ElementStream<WheelEvent> get onMouseWheel => |
| mouseWheelEvent.forElement(this); |
| |
| /// Stream of `paste` events handled by this [Element]. |
| ElementStream<ClipboardEvent> get onPaste => pasteEvent.forElement(this); |
| |
| ElementStream<Event> get onPause => pauseEvent.forElement(this); |
| |
| ElementStream<Event> get onPlay => playEvent.forElement(this); |
| |
| ElementStream<Event> get onPlaying => playingEvent.forElement(this); |
| |
| ElementStream<Event> get onRateChange => rateChangeEvent.forElement(this); |
| |
| /// Stream of `reset` events handled by this [Element]. |
| ElementStream<Event> get onReset => resetEvent.forElement(this); |
| |
| ElementStream<Event> get onResize => resizeEvent.forElement(this); |
| |
| /// Stream of `scroll` events handled by this [Element]. |
| ElementStream<Event> get onScroll => scrollEvent.forElement(this); |
| |
| /// Stream of `search` events handled by this [Element]. |
| ElementStream<Event> get onSearch => searchEvent.forElement(this); |
| |
| ElementStream<Event> get onSeeked => seekedEvent.forElement(this); |
| |
| ElementStream<Event> get onSeeking => seekingEvent.forElement(this); |
| |
| /// Stream of `select` events handled by this [Element]. |
| ElementStream<Event> get onSelect => selectEvent.forElement(this); |
| |
| /// Stream of `selectstart` events handled by this [Element]. |
| ElementStream<Event> get onSelectStart => selectStartEvent.forElement(this); |
| |
| ElementStream<Event> get onStalled => stalledEvent.forElement(this); |
| |
| /// Stream of `submit` events handled by this [Element]. |
| ElementStream<Event> get onSubmit => submitEvent.forElement(this); |
| |
| ElementStream<Event> get onSuspend => suspendEvent.forElement(this); |
| |
| ElementStream<Event> get onTimeUpdate => timeUpdateEvent.forElement(this); |
| |
| /// Stream of `touchcancel` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchCancel => |
| touchCancelEvent.forElement(this); |
| |
| /// Stream of `touchend` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchEnd => touchEndEvent.forElement(this); |
| |
| /// Stream of `touchenter` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchEnter => |
| touchEnterEvent.forElement(this); |
| |
| /// Stream of `touchleave` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchLeave => |
| touchLeaveEvent.forElement(this); |
| |
| /// Stream of `touchmove` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchMove => touchMoveEvent.forElement(this); |
| |
| /// Stream of `touchstart` events handled by this [Element]. |
| ElementStream<TouchEvent> get onTouchStart => |
| touchStartEvent.forElement(this); |
| |
| /// Stream of `transitionend` events handled by this [Element]. |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.FIREFOX) |
| @SupportedBrowser(SupportedBrowser.IE, '10') |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| ElementStream<TransitionEvent> get onTransitionEnd => |
| transitionEndEvent.forElement(this); |
| |
| ElementStream<Event> get onVolumeChange => volumeChangeEvent.forElement(this); |
| |
| ElementStream<Event> get onWaiting => waitingEvent.forElement(this); |
| |
| /// Stream of `fullscreenchange` events handled by this [Element]. |
| ElementStream<Event> get onFullscreenChange => |
| fullscreenChangeEvent.forElement(this); |
| |
| /// Stream of `fullscreenerror` events handled by this [Element]. |
| ElementStream<Event> get onFullscreenError => |
| fullscreenErrorEvent.forElement(this); |
| |
| ElementStream<WheelEvent> get onWheel => wheelEvent.forElement(this); |
| } |
| |
| class _ElementFactoryProvider { |
| // 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. |
| |
| @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"); |
| } |
| |
| factory EmbedElement() => document.createElement("embed") as EmbedElement; |
| /** |
| * 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'); |
| |
| String get height native; |
| |
| set height(String value) native; |
| |
| String? get name native; |
| |
| set name(String? value) native; |
| |
| String get src native; |
| |
| set src(String value) native; |
| |
| String get type native; |
| |
| set type(String value) native; |
| |
| String get width native; |
| |
| set width(String value) native; |
| |
| Node __getter__(String name) native; |
| |
| void __setter__(String 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. |
| |
| typedef void _EntriesCallback(List 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. |
| |
| @Native("Entry") |
| class Entry extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory Entry._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| FileSystem? get filesystem native; |
| |
| String? get fullPath native; |
| |
| bool? get isDirectory native; |
| |
| bool? get isFile native; |
| |
| String? get name native; |
| |
| @JSName('copyTo') |
| void _copyTo(DirectoryEntry parent, |
| [String? name, |
| _EntryCallback? successCallback, |
| _ErrorCallback? errorCallback]) native; |
| |
| @JSName('copyTo') |
| Future<Entry> copyTo(DirectoryEntry parent, {String? name}) { |
| var completer = new Completer<Entry>(); |
| _copyTo(parent, name, (value) { |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('getMetadata') |
| void _getMetadata(MetadataCallback successCallback, |
| [_ErrorCallback? errorCallback]) native; |
| |
| @JSName('getMetadata') |
| Future<Metadata> getMetadata() { |
| var completer = new Completer<Metadata>(); |
| _getMetadata((value) { |
| applyExtension('Metadata', value); |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('getParent') |
| void _getParent( |
| [_EntryCallback? successCallback, _ErrorCallback? errorCallback]) native; |
| |
| @JSName('getParent') |
| Future<Entry> getParent() { |
| var completer = new Completer<Entry>(); |
| _getParent((value) { |
| applyExtension('Entry', value); |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('moveTo') |
| void _moveTo(DirectoryEntry parent, |
| [String? name, |
| _EntryCallback? successCallback, |
| _ErrorCallback? errorCallback]) native; |
| |
| @JSName('moveTo') |
| Future<Entry> moveTo(DirectoryEntry parent, {String? name}) { |
| var completer = new Completer<Entry>(); |
| _moveTo(parent, name, (value) { |
| completer.complete(value); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('remove') |
| void _remove(VoidCallback successCallback, [_ErrorCallback? errorCallback]) |
| native; |
| |
| @JSName('remove') |
| Future remove() { |
| var completer = new Completer(); |
| _remove(() { |
| completer.complete(); |
| }, (error) { |
| completer.completeError(error); |
| }); |
| return completer.future; |
| } |
| |
| @JSName('toURL') |
| 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. |
| |
| 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. |
| |
| typedef void _ErrorCallback(DomException 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. |
| |
| @Unstable() |
| @Native("ErrorEvent") |
| class ErrorEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory ErrorEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| 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); |
| |
| int? get colno native; |
| |
| @Creates('Null') |
| Object? get error native; |
| |
| String? get filename native; |
| |
| int? get lineno native; |
| |
| String? get 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. |
| |
| // WARNING: Do not edit - generated code. |
| |
| @Native("Event,InputEvent,SubmitEvent") |
| 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); |
| */ |
| factory Event.eventType(String type, String name, |
| {bool canBubble: true, bool cancelable: true}) { |
| final Event e = document._createEvent(type); |
| e._initEvent(name, canBubble, cancelable); |
| return e; |
| } |
| |
| /** The CSS selector involved with event delegation. */ |
| String? get _selector native; |
| set _selector(String? value) native; |
| |
| /** |
| * A pointer to the element whose CSS selector matched within which an event |
| * was fired. If this Event was not associated with any Event delegation, |
| * accessing this value will throw an [UnsupportedError]. |
| */ |
| Element get matchingTarget { |
| if (_selector == null) { |
| throw new UnsupportedError('Cannot call matchingTarget if this Event did' |
| ' not arise as a result of event delegation.'); |
| } |
| Element? currentTarget = this.currentTarget as Element?; |
| Element? target = this.target as Element?; |
| var matchedTarget; |
| do { |
| if (target!.matches(_selector!)) return target; |
| target = target.parent; |
| } while (target != null && target != currentTarget!.parent); |
| throw new StateError('No selector matched for populating matchedTarget.'); |
| } |
| |
| List<EventTarget> get path => |
| JS<bool>('bool', '!!#.composedPath', this) ? composedPath() : []; |
| |
| factory Event._(String type, [Map? eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return Event._create_1(type, eventInitDict_1); |
| } |
| return Event._create_2(type); |
| } |
| static Event _create_1(type, eventInitDict) => |
| JS('Event', 'new Event(#,#)', type, eventInitDict); |
| static Event _create_2(type) => JS('Event', 'new Event(#)', type); |
| |
| /** |
| * This event is being handled by the event target. |
| * |
| * ## Other resources |
| * |
| * * [Target phase](http://www.w3.org/TR/DOM-Level-3-Events/#target-phase) |
| * from W3C. |
| */ |
| static const int AT_TARGET = 2; |
| |
| /** |
| * This event is bubbling up through the target's ancestors. |
| * |
| * ## Other resources |
| * |
| * * [Bubble phase](http://www.w3.org/TR/DOM-Level-3-Events/#bubble-phase) |
| * from W3C. |
| */ |
| static const int BUBBLING_PHASE = 3; |
| |
| /** |
| * This event is propagating through the target's ancestors, starting from the |
| * document. |
| * |
| * ## Other resources |
| * |
| * * [Bubble phase](http://www.w3.org/TR/DOM-Level-3-Events/#bubble-phase) |
| * from W3C. |
| */ |
| static const int CAPTURING_PHASE = 1; |
| |
| bool? get bubbles native; |
| |
| bool? get cancelable native; |
| |
| bool? get composed native; |
| |
| EventTarget? get currentTarget => |
| _convertNativeToDart_EventTarget(this._get_currentTarget); |
| @JSName('currentTarget') |
| @Creates('Null') |
| @Returns('EventTarget|=Object|Null') |
| dynamic get _get_currentTarget native; |
| |
| bool get defaultPrevented native; |
| |
| int get eventPhase native; |
| |
| bool? get isTrusted native; |
| |
| EventTarget? get target => _convertNativeToDart_EventTarget(this._get_target); |
| @JSName('target') |
| @Creates('Node') |
| @Returns('EventTarget|=Object') |
| dynamic get _get_target native; |
| |
| num? get timeStamp native; |
| |
| String get type native; |
| |
| List<EventTarget> composedPath() native; |
| |
| @JSName('initEvent') |
| void _initEvent(String type, [bool? bubbles, bool? cancelable]) native; |
| |
| void preventDefault() native; |
| |
| void stopImmediatePropagation() native; |
| |
| void stopPropagation() 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. |
| |
| @Native("EventSource") |
| class EventSource extends EventTarget { |
| factory EventSource(String url, {withCredentials: false}) { |
| var parsedOptions = { |
| 'withCredentials': withCredentials, |
| }; |
| return EventSource._factoryEventSource(url, parsedOptions); |
| } |
| // To suppress missing implicit constructor warnings. |
| factory EventSource._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| /** |
| * Static factory designed to expose `error` events to event |
| * handlers that are not necessarily instances of [EventSource]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| static const EventStreamProvider<Event> errorEvent = |
| const EventStreamProvider<Event>('error'); |
| |
| /** |
| * Static factory designed to expose `message` events to event |
| * handlers that are not necessarily instances of [EventSource]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| static const EventStreamProvider<MessageEvent> messageEvent = |
| const EventStreamProvider<MessageEvent>('message'); |
| |
| /** |
| * Static factory designed to expose `open` events to event |
| * handlers that are not necessarily instances of [EventSource]. |
| * |
| * See [EventStreamProvider] for usage information. |
| */ |
| static const EventStreamProvider<Event> openEvent = |
| const EventStreamProvider<Event>('open'); |
| |
| static EventSource _factoryEventSource(String url, |
| [Map? eventSourceInitDict]) { |
| if (eventSourceInitDict != null) { |
| var eventSourceInitDict_1 = |
| convertDartToNative_Dictionary(eventSourceInitDict); |
| return EventSource._create_1(url, eventSourceInitDict_1); |
| } |
| return EventSource._create_2(url); |
| } |
| |
| static EventSource _create_1(url, eventSourceInitDict) => |
| JS('EventSource', 'new EventSource(#,#)', url, eventSourceInitDict); |
| static EventSource _create_2(url) => |
| JS('EventSource', 'new EventSource(#)', url); |
| |
| static const int CLOSED = 2; |
| |
| static const int CONNECTING = 0; |
| |
| static const int OPEN = 1; |
| |
| int? get readyState native; |
| |
| String? get url native; |
| |
| bool? get withCredentials native; |
| |
| void close() native; |
| |
| /// Stream of `error` events handled by this [EventSource]. |
| Stream<Event> get onError => errorEvent.forTarget(this); |
| |
| /// Stream of `message` events handled by this [EventSource]. |
| Stream<MessageEvent> get onMessage => messageEvent.forTarget(this); |
| |
| /// Stream of `open` events handled by this [EventSource]. |
| Stream<Event> get onOpen => openEvent.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. |
| |
| /** |
| * Base class that supports listening for and dispatching browser events. |
| * |
| * Normally events are accessed via the Stream getter: |
| * |
| * element.onMouseOver.listen((e) => print('Mouse over!')); |
| * |
| * To access bubbling events which are declared on one element, but may bubble |
| * up to another element type (common for MediaElement events): |
| * |
| * MediaElement.pauseEvent.forTarget(document.body).listen(...); |
| * |
| * To useCapture on events: |
| * |
| * Element.keyDownEvent.forTarget(element, useCapture: true).listen(...); |
| * |
| * Custom events can be declared as: |
| * |
| * class DataGenerator { |
| * static EventStreamProvider<Event> dataEvent = |
| * new EventStreamProvider('data'); |
| * } |
| * |
| * Then listeners should access the event with: |
| * |
| * DataGenerator.dataEvent.forTarget(element).listen(...); |
| * |
| * Custom events can also be accessed as: |
| * |
| * element.on['some_event'].listen(...); |
| * |
| * This approach is generally discouraged as it loses the event typing and |
| * some DOM events may have multiple platform-dependent event names under the |
| * covers. By using the standard Stream getters you will get the platform |
| * specific event name automatically. |
| */ |
| class Events { |
| /* Raw event target. */ |
| final EventTarget _ptr; |
| |
| Events(this._ptr); |
| |
| Stream<Event> operator [](String type) { |
| return new _EventStream(_ptr, type, false); |
| } |
| } |
| |
| class ElementEvents extends Events { |
| static final webkitEvents = { |
| 'animationend': 'webkitAnimationEnd', |
| 'animationiteration': 'webkitAnimationIteration', |
| 'animationstart': 'webkitAnimationStart', |
| 'fullscreenchange': 'webkitfullscreenchange', |
| 'fullscreenerror': 'webkitfullscreenerror', |
| 'keyadded': 'webkitkeyadded', |
| 'keyerror': 'webkitkeyerror', |
| 'keymessage': 'webkitkeymessage', |
| 'needkey': 'webkitneedkey', |
| 'pointerlockchange': 'webkitpointerlockchange', |
| 'pointerlockerror': 'webkitpointerlockerror', |
| 'resourcetimingbufferfull': 'webkitresourcetimingbufferfull', |
| 'transitionend': 'webkitTransitionEnd', |
| 'speechchange': 'webkitSpeechChange' |
| }; |
| |
| ElementEvents(Element ptr) : super(ptr); |
| |
| Stream<Event> operator [](String type) { |
| if (webkitEvents.keys.contains(type.toLowerCase())) { |
| if (Device.isWebKit) { |
| return new _ElementEventStreamImpl( |
| _ptr, webkitEvents[type.toLowerCase()], false); |
| } |
| } |
| return new _ElementEventStreamImpl(_ptr, type, false); |
| } |
| } |
| |
| /** |
| * Base class for all browser objects that support events. |
| * |
| * Use the [on] property to add, and remove events |
| * for compile-time type checks and a more concise API. |
| */ |
| @Native("EventTarget") |
| class EventTarget extends Interceptor { |
| // Custom element created callback. |
| EventTarget._created(); |
| |
| /** |
| * This is an ease-of-use accessor for event streams which should only be |
| * used when an explicit accessor is not available. |
| */ |
| Events get on => new Events(this); |
| |
| void addEventListener(String type, EventListener? listener, |
| [bool? useCapture]) { |
| // TODO(leafp): This check is avoid a bug in our dispatch code when |
| // listener is null. The browser treats this call as a no-op in this |
| // case, so it's fine to short-circuit it, but we should not have to. |
| if (listener != null) { |
| _addEventListener(type, listener, useCapture); |
| } |
| } |
| |
| void removeEventListener(String type, EventListener? listener, |
| [bool? useCapture]) { |
| // TODO(leafp): This check is avoid a bug in our dispatch code when |
| // listener is null. The browser treats this call as a no-op in this |
| // case, so it's fine to short-circuit it, but we should not have to. |
| if (listener != null) { |
| _removeEventListener(type, listener, useCapture); |
| } |
| } |
| |
| // To suppress missing implicit constructor warnings. |
| factory EventTarget._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @JSName('addEventListener') |
| void _addEventListener(String type, EventListener? listener, [bool? options]) |
| native; |
| |
| bool dispatchEvent(Event event) native; |
| |
| @JSName('removeEventListener') |
| void _removeEventListener(String type, EventListener? listener, |
| [bool? 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. |
| |
| @Native("ExtendableEvent") |
| class ExtendableEvent extends Event { |
| // To suppress missing implicit constructor warnings. |
| factory ExtendableEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory ExtendableEvent(String type, [Map? eventInitDict]) { |
| if (eventInitDict != null) { |
| var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict); |
| return ExtendableEvent._create_1(type, eventInitDict_1); |
| } |
| return ExtendableEvent._create_2(type); |
| } |
| static ExtendableEvent _create_1(type, eventInitDict) => |
| JS('ExtendableEvent', 'new ExtendableEvent(#,#)', type, eventInitDict); |
| static ExtendableEvent _create_2(type) => |
| JS('ExtendableEvent', 'new ExtendableEvent(#)', type); |
| |
| void waitUntil(Future f) 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. |
| |
| @Native("ExtendableMessageEvent") |
| class ExtendableMessageEvent extends ExtendableEvent { |
| // To suppress missing implicit constructor warnings. |
| factory ExtendableMessageEvent._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| @annotation_Creates_SerializedScriptValue |
| @annotation_Returns_SerializedScriptValue |
| Object? get data native; |
| |
| String? get lastEventId native; |
| |
| String? get origin native; |
| |
| List<MessagePort>? get ports native; |
| |
| @Creates('Client|ServiceWorker|MessagePort') |
| @Returns('Client|ServiceWorker|MessagePort|Null') |
| Object? get 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. |
| |
| @Native("External") |
| class External extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory External._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| void AddSearchProvider() native; |
| |
| void IsSearchProviderInstalled() 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. |
| |
| @Native("FaceDetector") |
| class FaceDetector extends Interceptor { |
| // To suppress missing implicit constructor warnings. |
| factory FaceDetector._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory FaceDetector([Map? faceDetectorOptions]) { |
| if (faceDetectorOptions != null) { |
| var faceDetectorOptions_1 = |
| convertDartToNative_Dictionary(faceDetectorOptions); |
| return FaceDetector._create_1(faceDetectorOptions_1); |
| } |
| return FaceDetector._create_2(); |
| } |
| static FaceDetector _create_1(faceDetectorOptions) => |
| JS('FaceDetector', 'new FaceDetector(#)', faceDetectorOptions); |
| static FaceDetector _create_2() => JS('FaceDetector', 'new FaceDetector()'); |
| |
| Future<List<dynamic>> detect(/*ImageBitmapSource*/ image) => |
| promiseToFuture<List<dynamic>>(JS("", "#.detect(#)", this, image)); |
| } |
| // 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. |
| |
| @Native("FederatedCredential") |
| class FederatedCredential extends Credential implements CredentialUserData { |
| // To suppress missing implicit constructor warnings. |
| factory FederatedCredential._() { |
| throw new UnsupportedError("Not supported"); |
| } |
| |
| factory FederatedCredential(Map data) { |
| var data_1 = convertDartToNative_Dictionary(data); |
| return FederatedCredential._create_1(data_1); |
| } |
| static FederatedCredential _create_1(data) => |
| JS('FederatedCredential', 'new FederatedCredential(#)', data); |
| |
| String? get protocol native; |
| |
| String? get provider native; |
| |
| // From CredentialUserData |
| |
| @JSName('iconURL') |
| String? get iconUrl native; |
| |
| String? get 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 |
|