diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 4248eb4c728..d97e15e0b12 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -488,7 +488,7 @@ class AccessibleNodeList extends Interceptor {
int? get length native;
- set length(int value) native;
+ set length(int? value) native;
void __setter__(int index, AccessibleNode node) native;
@@ -552,7 +552,7 @@ class AnchorElement extends HtmlElement implements HtmlHyperlinkElementUtils {
String? get download native;
- set download(String value) native;
+ set download(String? value) native;
String get hreflang native;
@@ -560,7 +560,7 @@ class AnchorElement extends HtmlElement implements HtmlHyperlinkElementUtils {
String? get referrerPolicy native;
- set referrerPolicy(String value) native;
+ set referrerPolicy(String? value) native;
String get rel native;
@@ -578,45 +578,45 @@ class AnchorElement extends HtmlElement implements HtmlHyperlinkElementUtils {
String? get hash native;
- set hash(String value) native;
+ set hash(String? value) native;
String? get host native;
- set host(String value) native;
+ set host(String? value) native;
String? get hostname native;
- set hostname(String value) native;
+ set hostname(String? value) native;
String? get href native;
- set href(String value) native;
+ set href(String? value) native;
String? get origin native;
String? get password native;
- set password(String value) native;
+ set password(String? value) native;
String? get pathname native;
- set pathname(String value) native;
+ set pathname(String? value) native;
String? get port native;
- set port(String value) native;
+ set port(String? value) native;
String? get protocol native;
- set protocol(String value) native;
+ set protocol(String? value) native;
String? get search native;
- set search(String value) native;
+ set search(String? value) native;
String? get username native;
- set username(String value) native;
+ set username(String? value) native;
String toString() => JS('String', 'String(#)', this);
}
@@ -669,13 +669,13 @@ class Animation extends EventTarget {
String? get id native;
- set id(String value) native;
+ set id(String? value) native;
String? get playState native;
num? get playbackRate native;
- set playbackRate(num value) native;
+ set playbackRate(num? value) native;
Future get ready =>
promiseToFuture(JS("", "#.ready", this));
@@ -735,13 +735,13 @@ class AnimationEffectTiming extends AnimationEffectTimingReadOnly {
num? get delay native;
- set delay(num value) native;
+ set delay(num? value) native;
// Shadowing definition.
String? get direction native;
- set direction(String value) native;
+ set direction(String? value) native;
// Shadowing definition.
@@ -754,31 +754,31 @@ class AnimationEffectTiming extends AnimationEffectTimingReadOnly {
String? get easing native;
- set easing(String value) native;
+ set easing(String? value) native;
// Shadowing definition.
num? get endDelay native;
- set endDelay(num value) native;
+ set endDelay(num? value) native;
// Shadowing definition.
String? get fill native;
- set fill(String value) native;
+ set fill(String? value) native;
// Shadowing definition.
num? get iterationStart native;
- set iterationStart(num value) native;
+ set iterationStart(num? value) native;
// Shadowing definition.
num? get iterations native;
- set iterations(num value) 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
@@ -1106,11 +1106,11 @@ class AreaElement extends HtmlElement implements HtmlHyperlinkElementUtils {
String? get download native;
- set download(String value) native;
+ set download(String? value) native;
String? get referrerPolicy native;
- set referrerPolicy(String value) native;
+ set referrerPolicy(String? value) native;
String get rel native;
@@ -1128,45 +1128,45 @@ class AreaElement extends HtmlElement implements HtmlHyperlinkElementUtils {
String? get hash native;
- set hash(String value) native;
+ set hash(String? value) native;
String? get host native;
- set host(String value) native;
+ set host(String? value) native;
String? get hostname native;
- set hostname(String value) native;
+ set hostname(String? value) native;
String? get href native;
- set href(String value) native;
+ set href(String? value) native;
String? get origin native;
String? get password native;
- set password(String value) native;
+ set password(String? value) native;
String? get pathname native;
- set pathname(String value) native;
+ set pathname(String? value) native;
String? get port native;
- set port(String value) native;
+ set port(String? value) native;
String? get protocol native;
- set protocol(String value) native;
+ set protocol(String? value) native;
String? get search native;
- set search(String value) native;
+ set search(String? value) native;
String? get username native;
- set username(String value) native;
+ set username(String? value) native;
String toString() => JS('String', 'String(#)', this);
}
@@ -1570,7 +1570,7 @@ class BeforeUnloadEvent extends Event {
String? get returnValue native;
- set returnValue(String value) 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
@@ -1935,7 +1935,7 @@ class ButtonElement extends HtmlElement {
String? get formAction native;
- set formAction(String value) native;
+ set formAction(String? value) native;
String get formEnctype native;
@@ -2369,11 +2369,11 @@ class CanvasRenderingContext2D extends Interceptor
Matrix? get currentTransform native;
- set currentTransform(Matrix value) native;
+ set currentTransform(Matrix? value) native;
String? get direction native;
- set direction(String value) native;
+ set direction(String? value) native;
@Creates('String|CanvasGradient|CanvasPattern')
@Returns('String|CanvasGradient|CanvasPattern')
@@ -2383,7 +2383,7 @@ class CanvasRenderingContext2D extends Interceptor
String? get filter native;
- set filter(String value) native;
+ set filter(String? value) native;
String get font native;
@@ -2410,11 +2410,11 @@ class CanvasRenderingContext2D extends Interceptor
bool? get imageSmoothingEnabled native;
- set imageSmoothingEnabled(bool value) native;
+ set imageSmoothingEnabled(bool? value) native;
String? get imageSmoothingQuality native;
- set imageSmoothingQuality(String value) native;
+ set imageSmoothingQuality(String? value) native;
String get lineCap native;
@@ -2978,7 +2978,7 @@ class CharacterData extends Node
String? get data native;
- set data(String value) native;
+ set data(String? value) native;
int? get length native;
@@ -3212,7 +3212,7 @@ class ContentElement extends HtmlElement {
String? get select native;
- set select(String value) native;
+ set select(String? value) native;
@Returns('NodeList')
@Creates('NodeList')
@@ -3485,7 +3485,7 @@ class CssCharsetRule extends CssRule {
String? get encoding native;
- set encoding(String value) 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
@@ -3579,7 +3579,7 @@ class CssKeyframeRule extends CssRule {
String? get keyText native;
- set keyText(String value) native;
+ set keyText(String? value) native;
CssStyleDeclaration? get style native;
}
@@ -3600,7 +3600,7 @@ class CssKeyframesRule extends CssRule {
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
CssKeyframeRule __getter__(int index) native;
@@ -3629,7 +3629,7 @@ class CssKeywordValue extends CssStyleValue {
String? get value native;
- set value(String 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
@@ -3656,7 +3656,7 @@ class CssMatrixComponent extends CssTransformComponent {
DomMatrix? get matrix native;
- set matrix(DomMatrix value) 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
@@ -3723,7 +3723,7 @@ class CssPageRule extends CssRule {
String? get selectorText native;
- set selectorText(String value) native;
+ set selectorText(String? value) native;
CssStyleDeclaration? get style native;
}
@@ -3746,7 +3746,7 @@ class CssPerspective extends CssTransformComponent {
CssNumericValue? get length native;
- set length(CssNumericValue value) 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
@@ -3767,11 +3767,11 @@ class CssPositionValue extends CssStyleValue {
CssNumericValue? get x native;
- set x(CssNumericValue value) native;
+ set x(CssNumericValue? value) native;
CssNumericValue? get y native;
- set y(CssNumericValue value) 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
@@ -3820,19 +3820,19 @@ class CssRotation extends CssTransformComponent {
CssNumericValue? get angle native;
- set angle(CssNumericValue value) native;
+ set angle(CssNumericValue? value) native;
num? get x native;
- set x(num value) native;
+ set x(num? value) native;
num? get y native;
- set y(num value) native;
+ set y(num? value) native;
num? get z native;
- set z(num value) 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
@@ -3869,7 +3869,7 @@ class CssRule extends Interceptor {
String? get cssText native;
- set cssText(String value) native;
+ set cssText(String? value) native;
CssRule? get parentRule native;
@@ -3903,15 +3903,15 @@ class CssScale extends CssTransformComponent {
num? get x native;
- set x(num value) native;
+ set x(num? value) native;
num? get y native;
- set y(num value) native;
+ set y(num? value) native;
num? get z native;
- set z(num value) 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
@@ -3931,11 +3931,11 @@ class CssSkew extends CssTransformComponent {
CssNumericValue? get ax native;
- set ax(CssNumericValue value) native;
+ set ax(CssNumericValue? value) native;
CssNumericValue? get ay native;
- set ay(CssNumericValue value) native;
+ set ay(CssNumericValue? value) native;
}
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
@@ -4054,7 +4054,7 @@ class CssStyleDeclaration extends Interceptor with CssStyleDeclarationBase {
String? get cssText native;
- set cssText(String value) native;
+ set cssText(String? value) native;
int get length native;
@@ -8746,7 +8746,7 @@ class CssTransformComponent extends Interceptor {
bool? get is2D native;
- set is2D(bool value) 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
@@ -8812,15 +8812,15 @@ class CssTranslation extends CssTransformComponent {
CssNumericValue? get x native;
- set x(CssNumericValue value) native;
+ set x(CssNumericValue? value) native;
CssNumericValue? get y native;
- set y(CssNumericValue value) native;
+ set y(CssNumericValue? value) native;
CssNumericValue? get z native;
- set z(CssNumericValue value) 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
@@ -8843,11 +8843,11 @@ class CssUnitValue extends CssNumericValue {
String? get unit native;
- set unit(String value) native;
+ set unit(String? value) native;
num? get value native;
- set value(num 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
@@ -9055,7 +9055,7 @@ class DataElement extends HtmlElement {
String? get value native;
- set value(String 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
@@ -9106,11 +9106,11 @@ class DataTransfer extends Interceptor {
String? get dropEffect native;
- set dropEffect(String value) native;
+ set dropEffect(String? value) native;
String? get effectAllowed native;
- set effectAllowed(String value) native;
+ set effectAllowed(String? value) native;
@Returns('FileList')
@Creates('FileList')
@@ -9374,7 +9374,7 @@ class DetailsElement extends HtmlElement {
bool? get open native;
- set open(bool value) 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
@@ -9560,11 +9560,11 @@ class DialogElement extends HtmlElement {
bool? get open native;
- set open(bool value) native;
+ set open(bool? value) native;
String? get returnValue native;
- set returnValue(String value) native;
+ set returnValue(String? value) native;
void close([String? returnValue]) native;
@@ -9883,7 +9883,7 @@ class Document extends Node {
String? get cookie native;
- set cookie(String value) native;
+ set cookie(String? value) native;
ScriptElement? get currentScript native;
@@ -10769,133 +10769,133 @@ class DomMatrix extends DomMatrixReadOnly {
num? get a native;
- set a(num value) native;
+ set a(num? value) native;
// Shadowing definition.
num? get b native;
- set b(num value) native;
+ set b(num? value) native;
// Shadowing definition.
num? get c native;
- set c(num value) native;
+ set c(num? value) native;
// Shadowing definition.
num? get d native;
- set d(num value) native;
+ set d(num? value) native;
// Shadowing definition.
num? get e native;
- set e(num value) native;
+ set e(num? value) native;
// Shadowing definition.
num? get f native;
- set f(num value) native;
+ set f(num? value) native;
// Shadowing definition.
num? get m11 native;
- set m11(num value) native;
+ set m11(num? value) native;
// Shadowing definition.
num? get m12 native;
- set m12(num value) native;
+ set m12(num? value) native;
// Shadowing definition.
num? get m13 native;
- set m13(num value) native;
+ set m13(num? value) native;
// Shadowing definition.
num? get m14 native;
- set m14(num value) native;
+ set m14(num? value) native;
// Shadowing definition.
num? get m21 native;
- set m21(num value) native;
+ set m21(num? value) native;
// Shadowing definition.
num? get m22 native;
- set m22(num value) native;
+ set m22(num? value) native;
// Shadowing definition.
num? get m23 native;
- set m23(num value) native;
+ set m23(num? value) native;
// Shadowing definition.
num? get m24 native;
- set m24(num value) native;
+ set m24(num? value) native;
// Shadowing definition.
num? get m31 native;
- set m31(num value) native;
+ set m31(num? value) native;
// Shadowing definition.
num? get m32 native;
- set m32(num value) native;
+ set m32(num? value) native;
// Shadowing definition.
num? get m33 native;
- set m33(num value) native;
+ set m33(num? value) native;
// Shadowing definition.
num? get m34 native;
- set m34(num value) native;
+ set m34(num? value) native;
// Shadowing definition.
num? get m41 native;
- set m41(num value) native;
+ set m41(num? value) native;
// Shadowing definition.
num? get m42 native;
- set m42(num value) native;
+ set m42(num? value) native;
// Shadowing definition.
num? get m43 native;
- set m43(num value) native;
+ set m43(num? value) native;
// Shadowing definition.
num? get m44 native;
- set m44(num value) native;
+ set m44(num? value) native;
static DomMatrix fromFloat32Array(Float32List array32) native;
@@ -11173,25 +11173,25 @@ class DomPoint extends DomPointReadOnly {
num? get w native;
- set w(num value) native;
+ set w(num? value) native;
// Shadowing definition.
num? get x native;
- set x(num value) native;
+ set x(num? value) native;
// Shadowing definition.
num? get y native;
- set y(num value) native;
+ set y(num? value) native;
// Shadowing definition.
num? get z native;
- set z(num value) native;
+ set z(num? value) native;
static DomPoint fromPoint([Map? other]) {
if (other != null) {
@@ -11700,7 +11700,7 @@ class DomTokenList extends Interceptor {
String? get value native;
- set value(String value) native;
+ set value(String? value) native;
void add(String tokens) native;
@@ -14490,7 +14490,7 @@ class Element extends Node
String? get dir native;
- set dir(String value) native;
+ set dir(String? value) native;
/**
* Indicates whether the element can be dragged and dropped.
@@ -14526,31 +14526,31 @@ class Element extends Node
bool? get inert native;
- set inert(bool value) native;
+ set inert(bool? value) native;
String? get inputMode native;
- set inputMode(String value) native;
+ set inputMode(String? value) native;
bool? get isContentEditable native;
String? get lang native;
- set lang(String value) native;
+ set lang(String? value) native;
bool? get spellcheck native;
- set spellcheck(bool value) native;
+ set spellcheck(bool? value) native;
CssStyleDeclaration get style native;
int? get tabIndex native;
- set tabIndex(int value) native;
+ set tabIndex(int? value) native;
String? get title native;
- set title(String value) native;
+ set title(String? value) native;
/**
* Specifies whether this element's text content changes when the page is
@@ -14565,7 +14565,7 @@ class Element extends Node
bool? get translate native;
- set translate(bool value) native;
+ set translate(bool? value) native;
void blur() native;
@@ -14635,7 +14635,7 @@ class Element extends Node
String? get slot native;
- set slot(String value) native;
+ set slot(String? value) native;
StylePropertyMap? get styleMap native;
@@ -15267,7 +15267,7 @@ class EmbedElement extends HtmlElement {
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
String get src native;
@@ -16461,15 +16461,15 @@ class FontFace extends Interceptor {
String? get display native;
- set display(String value) native;
+ set display(String? value) native;
String? get family native;
- set family(String value) native;
+ set family(String? value) native;
String? get featureSettings native;
- set featureSettings(String value) native;
+ set featureSettings(String? value) native;
Future get loaded =>
promiseToFuture(JS("", "#.loaded", this));
@@ -16478,23 +16478,23 @@ class FontFace extends Interceptor {
String? get stretch native;
- set stretch(String value) native;
+ set stretch(String? value) native;
String? get style native;
- set style(String value) native;
+ set style(String? value) native;
String? get unicodeRange native;
- set unicodeRange(String value) native;
+ set unicodeRange(String? value) native;
String? get variant native;
- set variant(String value) native;
+ set variant(String? value) native;
String? get weight native;
- set weight(String value) native;
+ set weight(String? value) native;
Future load() =>
promiseToFuture(JS("", "#.load()", this));
@@ -16673,41 +16673,41 @@ class FormElement extends HtmlElement {
String? get acceptCharset native;
- set acceptCharset(String value) native;
+ set acceptCharset(String? value) native;
String? get action native;
- set action(String value) native;
+ set action(String? value) native;
String? get autocomplete native;
- set autocomplete(String value) native;
+ set autocomplete(String? value) native;
String? get encoding native;
- set encoding(String value) native;
+ set encoding(String? value) native;
String? get enctype native;
- set enctype(String value) native;
+ set enctype(String? value) native;
int? get length native;
String? get method native;
- set method(String value) native;
+ set method(String? value) native;
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
bool? get noValidate native;
- set noValidate(bool value) native;
+ set noValidate(bool? value) native;
String? get target native;
- set target(String value) native;
+ set target(String? value) native;
Object? __getter__(String name) native;
@@ -17542,7 +17542,7 @@ class History extends Interceptor implements HistoryBase {
String? get scrollRestoration native;
- set scrollRestoration(String value) native;
+ set scrollRestoration(String? value) native;
dynamic get state =>
convertNativeToDart_SerializedScriptValue(this._get_state);
@@ -17862,45 +17862,45 @@ class HtmlHyperlinkElementUtils extends Interceptor {
String? get hash native;
- set hash(String value) native;
+ set hash(String? value) native;
String? get host native;
- set host(String value) native;
+ set host(String? value) native;
String? get hostname native;
- set hostname(String value) native;
+ set hostname(String? value) native;
String? get href native;
- set href(String value) native;
+ set href(String? value) native;
String? get origin native;
String? get password native;
- set password(String value) native;
+ set password(String? value) native;
String? get pathname native;
- set pathname(String value) native;
+ set pathname(String? value) native;
String? get port native;
- set port(String value) native;
+ set port(String? value) native;
String? get protocol native;
- set protocol(String value) native;
+ set protocol(String? value) native;
String? get search native;
- set search(String value) native;
+ set search(String? value) native;
String? get username native;
- set username(String value) native;
+ set username(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
@@ -18488,7 +18488,7 @@ class HttpRequest extends HttpRequestEventTarget {
int? get timeout native;
- set timeout(int value) native;
+ set timeout(int? value) native;
/**
* [EventTarget] that can hold listeners to track the progress of the request.
@@ -18506,7 +18506,7 @@ class HttpRequest extends HttpRequestEventTarget {
bool? get withCredentials native;
- set withCredentials(bool value) native;
+ set withCredentials(bool? value) native;
/**
* Stop the current request.
@@ -18733,15 +18733,15 @@ class IFrameElement extends HtmlElement {
String? get allow native;
- set allow(String value) native;
+ set allow(String? value) native;
bool? get allowFullscreen native;
- set allowFullscreen(bool value) native;
+ set allowFullscreen(bool? value) native;
bool? get allowPaymentRequest native;
- set allowPaymentRequest(bool value) native;
+ set allowPaymentRequest(bool? value) native;
WindowBase? get contentWindow =>
_convertNativeToDart_Window(this._get_contentWindow);
@@ -18752,33 +18752,33 @@ class IFrameElement extends HtmlElement {
String? get csp native;
- set csp(String value) native;
+ set csp(String? value) native;
String? get height native;
- set height(String value) native;
+ set height(String? value) native;
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
String? get referrerPolicy native;
- set referrerPolicy(String value) native;
+ set referrerPolicy(String? value) native;
DomTokenList? get sandbox native;
String? get src native;
- set src(String value) native;
+ set src(String? value) native;
String? get srcdoc native;
- set srcdoc(String value) native;
+ set srcdoc(String? value) native;
String? get width native;
- set width(String value) native;
+ set width(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
@@ -18946,11 +18946,11 @@ class ImageElement extends HtmlElement implements CanvasImageSource {
String? get alt native;
- set alt(String value) native;
+ set alt(String? value) native;
String? get async native;
- set async(String value) native;
+ set async(String? value) native;
bool? get complete native;
@@ -18962,11 +18962,11 @@ class ImageElement extends HtmlElement implements CanvasImageSource {
int? get height native;
- set height(int value) native;
+ set height(int? value) native;
bool? get isMap native;
- set isMap(bool value) native;
+ set isMap(bool? value) native;
int get naturalHeight native;
@@ -18974,27 +18974,27 @@ class ImageElement extends HtmlElement implements CanvasImageSource {
String? get referrerPolicy native;
- set referrerPolicy(String value) native;
+ set referrerPolicy(String? value) native;
String? get sizes native;
- set sizes(String value) native;
+ set sizes(String? value) native;
String? get src native;
- set src(String value) native;
+ set src(String? value) native;
String? get srcset native;
- set srcset(String value) native;
+ set srcset(String? value) native;
String? get useMap native;
- set useMap(String value) native;
+ set useMap(String? value) native;
int? get width native;
- set width(int value) native;
+ set width(int? value) native;
Future decode() => promiseToFuture(JS("", "#.decode()", this));
}
@@ -19077,15 +19077,15 @@ class InputElement extends HtmlElement
String? get accept native;
- set accept(String value) native;
+ set accept(String? value) native;
String? get alt native;
- set alt(String value) native;
+ set alt(String? value) native;
String? get autocapitalize native;
- set autocapitalize(String value) native;
+ set autocapitalize(String? value) native;
String get autocomplete native;
@@ -19097,27 +19097,27 @@ class InputElement extends HtmlElement
String? get capture native;
- set capture(String value) native;
+ set capture(String? value) native;
bool? get checked native;
- set checked(bool value) native;
+ set checked(bool? value) native;
bool? get defaultChecked native;
- set defaultChecked(bool value) native;
+ set defaultChecked(bool? value) native;
String? get defaultValue native;
- set defaultValue(String value) native;
+ set defaultValue(String? value) native;
String? get dirName native;
- set dirName(String value) native;
+ set dirName(String? value) native;
bool? get disabled native;
- set disabled(bool value) native;
+ set disabled(bool? value) native;
@Returns('FileList|Null')
@Creates('FileList')
@@ -19149,15 +19149,15 @@ class InputElement extends HtmlElement
int? get height native;
- set height(int value) native;
+ set height(int? value) native;
bool? get incremental native;
- set incremental(bool value) native;
+ set incremental(bool? value) native;
bool? get indeterminate native;
- set indeterminate(bool value) native;
+ set indeterminate(bool? value) native;
@Returns('NodeList')
@Creates('NodeList')
@@ -19167,27 +19167,27 @@ class InputElement extends HtmlElement
String? get max native;
- set max(String value) native;
+ set max(String? value) native;
int? get maxLength native;
- set maxLength(int value) native;
+ set maxLength(int? value) native;
String? get min native;
- set min(String value) native;
+ set min(String? value) native;
int? get minLength native;
- set minLength(int value) native;
+ set minLength(int? value) native;
bool? get multiple native;
- set multiple(bool value) native;
+ set multiple(bool? value) native;
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
String get pattern native;
@@ -19199,7 +19199,7 @@ class InputElement extends HtmlElement
bool? get readOnly native;
- set readOnly(bool value) native;
+ set readOnly(bool? value) native;
bool get required native;
@@ -19219,19 +19219,19 @@ class InputElement extends HtmlElement
int? get size native;
- set size(int value) native;
+ set size(int? value) native;
String? get src native;
- set src(String value) native;
+ set src(String? value) native;
String? get step native;
- set step(String value) native;
+ set step(String? value) native;
String? get type native;
- set type(String value) native;
+ set type(String? value) native;
String get validationMessage native;
@@ -19257,7 +19257,7 @@ class InputElement extends HtmlElement
num? get valueAsNumber native;
- set valueAsNumber(num value) native;
+ set valueAsNumber(num? value) native;
@JSName('webkitEntries')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -19270,11 +19270,11 @@ class InputElement extends HtmlElement
bool? get directory native;
@JSName('webkitdirectory')
- set directory(bool value) native;
+ set directory(bool? value) native;
int? get width native;
- set width(int value) native;
+ set width(int? value) native;
bool get willValidate native;
@@ -19308,16 +19308,16 @@ abstract class InputElementBase implements Element {
set autofocus(bool value);
bool? get disabled;
- set disabled(bool value);
+ set disabled(bool? value);
bool? get incremental;
- set incremental(bool value);
+ set incremental(bool? value);
bool? get indeterminate;
- set indeterminate(bool value);
+ set indeterminate(bool? value);
String? get name;
- set name(String value);
+ set name(String? value);
String? get value;
set value(String? value);
@@ -19350,7 +19350,7 @@ abstract class TextInputElementBase implements InputElementBase {
set autocomplete(String value);
int? get maxLength;
- set maxLength(int value);
+ set maxLength(int? value);
String get pattern;
set pattern(String value);
@@ -19359,13 +19359,13 @@ abstract class TextInputElementBase implements InputElementBase {
set placeholder(String value);
bool? get readOnly;
- set readOnly(bool value);
+ set readOnly(bool? value);
bool get required;
set required(bool value);
int? get size;
- set size(int value);
+ set size(int? value);
void select();
@@ -19395,7 +19395,7 @@ abstract class SearchInputElement implements TextInputElementBase {
factory SearchInputElement() => new InputElement(type: 'search');
String? get dirName;
- set dirName(String value);
+ set dirName(String? value);
Element? get list;
@@ -19412,7 +19412,7 @@ abstract class TextInputElement implements TextInputElementBase {
factory TextInputElement() => new InputElement(type: 'text');
String? get dirName;
- set dirName(String value);
+ set dirName(String? value);
Element? get list;
}
@@ -19481,10 +19481,10 @@ abstract class EmailInputElement implements TextInputElementBase {
Element? get list;
int? get maxLength;
- set maxLength(int value);
+ set maxLength(int? value);
bool? get multiple;
- set multiple(bool value);
+ set multiple(bool? value);
String get pattern;
set pattern(String value);
@@ -19493,13 +19493,13 @@ abstract class EmailInputElement implements TextInputElementBase {
set placeholder(String value);
bool? get readOnly;
- set readOnly(bool value);
+ set readOnly(bool? value);
bool get required;
set required(bool value);
int? get size;
- set size(int value);
+ set size(int? value);
/// Returns true if this input type is supported on the current platform.
static bool get supported {
@@ -19521,16 +19521,16 @@ abstract class RangeInputElementBase implements InputElementBase {
Element? get list;
String? get max;
- set max(String value);
+ set max(String? value);
String? get min;
- set min(String value);
+ set min(String? value);
String? get step;
- set step(String value);
+ set step(String? value);
num? get valueAsNumber;
- set valueAsNumber(num value);
+ set valueAsNumber(num? value);
void stepDown([int? n]);
@@ -19550,7 +19550,7 @@ abstract class DateInputElement implements RangeInputElementBase {
set valueAsDate(DateTime value);
bool? get readOnly;
- set readOnly(bool value);
+ set readOnly(bool? value);
bool get required;
set required(bool value);
@@ -19574,7 +19574,7 @@ abstract class MonthInputElement implements RangeInputElementBase {
set valueAsDate(DateTime value);
bool? get readOnly;
- set readOnly(bool value);
+ set readOnly(bool? value);
bool get required;
set required(bool value);
@@ -19598,7 +19598,7 @@ abstract class WeekInputElement implements RangeInputElementBase {
set valueAsDate(DateTime value);
bool? get readOnly;
- set readOnly(bool value);
+ set readOnly(bool? value);
bool get required;
set required(bool value);
@@ -19622,7 +19622,7 @@ abstract class TimeInputElement implements RangeInputElementBase {
set valueAsDate(DateTime value);
bool? get readOnly;
- set readOnly(bool value);
+ set readOnly(bool? value);
bool get required;
set required(bool value);
@@ -19645,7 +19645,7 @@ abstract class LocalDateTimeInputElement implements RangeInputElementBase {
new InputElement(type: 'datetime-local');
bool? get readOnly;
- set readOnly(bool value);
+ set readOnly(bool? value);
bool get required;
set required(bool value);
@@ -19669,7 +19669,7 @@ abstract class NumberInputElement implements RangeInputElementBase {
set placeholder(String value);
bool? get readOnly;
- set readOnly(bool value);
+ set readOnly(bool? value);
bool get required;
set required(bool value);
@@ -19707,7 +19707,7 @@ abstract class CheckboxInputElement implements InputElementBase {
factory CheckboxInputElement() => new InputElement(type: 'checkbox');
bool? get checked;
- set checked(bool value);
+ set checked(bool? value);
bool get required;
set required(bool value);
@@ -19728,7 +19728,7 @@ abstract class RadioButtonInputElement implements InputElementBase {
factory RadioButtonInputElement() => new InputElement(type: 'radio');
bool? get checked;
- set checked(bool value);
+ set checked(bool? value);
bool get required;
set required(bool value);
@@ -19741,10 +19741,10 @@ abstract class FileUploadInputElement implements InputElementBase {
factory FileUploadInputElement() => new InputElement(type: 'file');
String? get accept;
- set accept(String value);
+ set accept(String? value);
bool? get multiple;
- set multiple(bool value);
+ set multiple(bool? value);
bool get required;
set required(bool value);
@@ -19782,7 +19782,7 @@ abstract class ImageButtonInputElement implements InputElementBase {
factory ImageButtonInputElement() => new InputElement(type: 'image');
String? get alt;
- set alt(String value);
+ set alt(String? value);
String get formAction;
set formAction(String value);
@@ -19800,13 +19800,13 @@ abstract class ImageButtonInputElement implements InputElementBase {
set formTarget(String value);
int? get height;
- set height(int value);
+ set height(int? value);
String? get src;
- set src(String value);
+ set src(String? value);
int? get width;
- set width(int value);
+ set width(int? value);
}
/**
@@ -20266,7 +20266,7 @@ class LinkElement extends HtmlElement {
String? get as native;
- set as(String value) native;
+ set as(String? value) native;
String? get crossOrigin native;
@@ -20274,7 +20274,7 @@ class LinkElement extends HtmlElement {
bool? get disabled native;
- set disabled(bool value) native;
+ set disabled(bool? value) native;
String get href native;
@@ -20288,7 +20288,7 @@ class LinkElement extends HtmlElement {
String? get integrity native;
- set integrity(String value) native;
+ set integrity(String? value) native;
String get media native;
@@ -20296,7 +20296,7 @@ class LinkElement extends HtmlElement {
String? get referrerPolicy native;
- set referrerPolicy(String value) native;
+ set referrerPolicy(String? value) native;
String get rel native;
@@ -20306,7 +20306,7 @@ class LinkElement extends HtmlElement {
String? get scope native;
- set scope(String value) native;
+ set scope(String? value) native;
StyleSheet? get sheet native;
@@ -20346,7 +20346,7 @@ class Location extends Interceptor implements LocationBase {
String? get hostname native;
- set hostname(String value) native;
+ set hostname(String? value) native;
String get href native;
@@ -20354,7 +20354,7 @@ class Location extends Interceptor implements LocationBase {
String? get pathname native;
- set pathname(String value) native;
+ set pathname(String? value) native;
String get port native;
@@ -20366,11 +20366,11 @@ class Location extends Interceptor implements LocationBase {
String? get search native;
- set search(String value) native;
+ set search(String? value) native;
TrustedUrl? get trustedHref native;
- set trustedHref(TrustedUrl value) native;
+ set trustedHref(TrustedUrl? value) native;
void assign([String? url]) native;
@@ -20597,7 +20597,7 @@ class MediaElement extends HtmlElement {
bool? get defaultMuted native;
- set defaultMuted(bool value) native;
+ set defaultMuted(bool? value) native;
num get defaultPlaybackRate native;
@@ -20653,7 +20653,7 @@ class MediaElement extends HtmlElement {
MediaStream? get srcObject native;
- set srcObject(MediaStream value) native;
+ set srcObject(MediaStream? value) native;
TextTrackList? get textTracks native;
@@ -20939,19 +20939,19 @@ class MediaMetadata extends Interceptor {
String? get album native;
- set album(String value) native;
+ set album(String? value) native;
String? get artist native;
- set artist(String value) native;
+ set artist(String? value) native;
List? get artwork native;
- set artwork(List value) native;
+ set artwork(List? value) native;
String? get title native;
- set title(String value) native;
+ set title(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
@@ -21080,7 +21080,7 @@ class MediaSession extends Interceptor {
String? get playbackState native;
- set playbackState(String value) native;
+ set playbackState(String? value) native;
void setActionHandler(String action, MediaSessionActionHandler? handler)
native;
@@ -21134,7 +21134,7 @@ class MediaSource extends EventTarget {
num? get duration native;
- set duration(num value) native;
+ set duration(num? value) native;
String? get readyState native;
@@ -21314,11 +21314,11 @@ class MediaStreamTrack extends EventTarget {
String? get contentHint native;
- set contentHint(String value) native;
+ set contentHint(String? value) native;
bool? get enabled native;
- set enabled(bool value) native;
+ set enabled(bool? value) native;
String? get id native;
@@ -21666,7 +21666,7 @@ class MetaElement extends HtmlElement {
String? get httpEquiv native;
- set httpEquiv(String value) native;
+ set httpEquiv(String? value) native;
String get name native;
@@ -23856,7 +23856,7 @@ class OListElement extends HtmlElement {
bool? get reversed native;
- set reversed(bool value) native;
+ set reversed(bool? value) native;
int get start native;
@@ -23960,11 +23960,11 @@ class OffscreenCanvas extends EventTarget {
int? get height native;
- set height(int value) native;
+ set height(int? value) native;
int? get width native;
- set width(int value) native;
+ set width(int? value) native;
Future convertToBlob([Map? options]) {
var options_dict = null;
@@ -24006,7 +24006,7 @@ class OffscreenCanvasRenderingContext2D extends Interceptor
String? get direction native;
- set direction(String value) native;
+ set direction(String? value) native;
Object? get fillStyle native;
@@ -24014,63 +24014,63 @@ class OffscreenCanvasRenderingContext2D extends Interceptor
String? get filter native;
- set filter(String value) native;
+ set filter(String? value) native;
String? get font native;
- set font(String value) native;
+ set font(String? value) native;
num? get globalAlpha native;
- set globalAlpha(num value) native;
+ set globalAlpha(num? value) native;
String? get globalCompositeOperation native;
- set globalCompositeOperation(String value) native;
+ set globalCompositeOperation(String? value) native;
bool? get imageSmoothingEnabled native;
- set imageSmoothingEnabled(bool value) native;
+ set imageSmoothingEnabled(bool? value) native;
String? get imageSmoothingQuality native;
- set imageSmoothingQuality(String value) native;
+ set imageSmoothingQuality(String? value) native;
String? get lineCap native;
- set lineCap(String value) native;
+ set lineCap(String? value) native;
num? get lineDashOffset native;
- set lineDashOffset(num value) native;
+ set lineDashOffset(num? value) native;
String? get lineJoin native;
- set lineJoin(String value) native;
+ set lineJoin(String? value) native;
num? get lineWidth native;
- set lineWidth(num value) native;
+ set lineWidth(num? value) native;
num? get miterLimit native;
- set miterLimit(num value) native;
+ set miterLimit(num? value) native;
num? get shadowBlur native;
- set shadowBlur(num value) native;
+ set shadowBlur(num? value) native;
String? get shadowColor native;
- set shadowColor(String value) native;
+ set shadowColor(String? value) native;
num? get shadowOffsetX native;
- set shadowOffsetX(num value) native;
+ set shadowOffsetX(num? value) native;
num? get shadowOffsetY native;
- set shadowOffsetY(num value) native;
+ set shadowOffsetY(num? value) native;
Object? get strokeStyle native;
@@ -24078,11 +24078,11 @@ class OffscreenCanvasRenderingContext2D extends Interceptor
String? get textAlign native;
- set textAlign(String value) native;
+ set textAlign(String? value) native;
String? get textBaseline native;
- set textBaseline(String value) native;
+ set textBaseline(String? value) native;
void beginPath() native;
@@ -24349,7 +24349,7 @@ class OptionElement extends HtmlElement {
String? get label native;
- set label(String value) native;
+ set label(String? value) native;
bool get selected native;
@@ -24401,7 +24401,7 @@ class OutputElement extends HtmlElement {
String? get defaultValue native;
- set defaultValue(String value) native;
+ set defaultValue(String? value) native;
FormElement? get form native;
@@ -24414,7 +24414,7 @@ class OutputElement extends HtmlElement {
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
String? get type native;
@@ -24424,7 +24424,7 @@ class OutputElement extends HtmlElement {
String? get value native;
- set value(String value) native;
+ set value(String? value) native;
bool? get willValidate native;
@@ -24501,7 +24501,7 @@ class PaintRenderingContext2D extends Interceptor implements _CanvasPath {
Matrix? get currentTransform native;
- set currentTransform(Matrix value) native;
+ set currentTransform(Matrix? value) native;
Object? get fillStyle native;
@@ -24509,59 +24509,59 @@ class PaintRenderingContext2D extends Interceptor implements _CanvasPath {
String? get filter native;
- set filter(String value) native;
+ set filter(String? value) native;
num? get globalAlpha native;
- set globalAlpha(num value) native;
+ set globalAlpha(num? value) native;
String? get globalCompositeOperation native;
- set globalCompositeOperation(String value) native;
+ set globalCompositeOperation(String? value) native;
bool? get imageSmoothingEnabled native;
- set imageSmoothingEnabled(bool value) native;
+ set imageSmoothingEnabled(bool? value) native;
String? get imageSmoothingQuality native;
- set imageSmoothingQuality(String value) native;
+ set imageSmoothingQuality(String? value) native;
String? get lineCap native;
- set lineCap(String value) native;
+ set lineCap(String? value) native;
num? get lineDashOffset native;
- set lineDashOffset(num value) native;
+ set lineDashOffset(num? value) native;
String? get lineJoin native;
- set lineJoin(String value) native;
+ set lineJoin(String? value) native;
num? get lineWidth native;
- set lineWidth(num value) native;
+ set lineWidth(num? value) native;
num? get miterLimit native;
- set miterLimit(num value) native;
+ set miterLimit(num? value) native;
num? get shadowBlur native;
- set shadowBlur(num value) native;
+ set shadowBlur(num? value) native;
String? get shadowColor native;
- set shadowColor(String value) native;
+ set shadowColor(String? value) native;
num? get shadowOffsetX native;
- set shadowOffsetX(num value) native;
+ set shadowOffsetX(num? value) native;
num? get shadowOffsetY native;
- set shadowOffsetY(num value) native;
+ set shadowOffsetY(num? value) native;
Object? get strokeStyle native;
@@ -24784,13 +24784,13 @@ class PasswordCredential extends Credential implements CredentialUserData {
String? get idName native;
- set idName(String value) native;
+ set idName(String? value) native;
String? get password native;
String? get passwordName native;
- set passwordName(String value) native;
+ set passwordName(String? value) native;
// From CredentialUserData
@@ -24932,7 +24932,7 @@ class PaymentManager extends Interceptor {
String? get userHint native;
- set userHint(String value) native;
+ set userHint(String? value) 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
@@ -25800,7 +25800,7 @@ class PresentationConnection extends EventTarget {
String? get binaryType native;
- set binaryType(String value) native;
+ set binaryType(String? value) native;
String? get id native;
@@ -26555,13 +26555,13 @@ class RtcDataChannel extends EventTarget {
String? get binaryType native;
- set binaryType(String value) native;
+ set binaryType(String? value) native;
int? get bufferedAmount native;
int? get bufferedAmountLowThreshold native;
- set bufferedAmountLowThreshold(int value) native;
+ set bufferedAmountLowThreshold(int? value) native;
int? get id native;
@@ -26712,15 +26712,15 @@ class RtcIceCandidate extends Interceptor {
String? get candidate native;
- set candidate(String value) native;
+ set candidate(String? value) native;
int? get sdpMLineIndex native;
- set sdpMLineIndex(int value) native;
+ set sdpMLineIndex(int? value) native;
String? get sdpMid native;
- set sdpMid(String value) native;
+ set sdpMid(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
@@ -27256,7 +27256,7 @@ class Screen extends Interceptor {
bool? get keepAwake native;
- set keepAwake(bool value) native;
+ set keepAwake(bool? value) native;
ScreenOrientation? get orientation native;
@@ -27314,7 +27314,7 @@ class ScriptElement extends HtmlElement {
bool? get async native;
- set async(bool value) native;
+ set async(bool? value) native;
String get charset native;
@@ -27326,15 +27326,15 @@ class ScriptElement extends HtmlElement {
bool? get defer native;
- set defer(bool value) native;
+ set defer(bool? value) native;
String? get integrity native;
- set integrity(String value) native;
+ set integrity(String? value) native;
bool? get noModule native;
- set noModule(bool value) native;
+ set noModule(bool? value) native;
String get src native;
@@ -27524,27 +27524,27 @@ class SelectElement extends HtmlElement {
int? get length native;
- set length(int value) native;
+ set length(int? value) native;
bool? get multiple native;
- set multiple(bool value) native;
+ set multiple(bool? value) native;
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
bool? get required native;
- set required(bool value) native;
+ set required(bool? value) native;
int? get selectedIndex native;
- set selectedIndex(int value) native;
+ set selectedIndex(int? value) native;
int? get size native;
- set size(int value) native;
+ set size(int? value) native;
String get type native;
@@ -27554,7 +27554,7 @@ class SelectElement extends HtmlElement {
String? get value native;
- set value(String value) native;
+ set value(String? value) native;
bool get willValidate native;
@@ -28107,7 +28107,7 @@ class SlotElement extends HtmlElement {
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
List assignedNodes([Map? options]) {
if (options != null) {
@@ -28141,11 +28141,11 @@ class SourceBuffer extends EventTarget {
num? get appendWindowEnd native;
- set appendWindowEnd(num value) native;
+ set appendWindowEnd(num? value) native;
num? get appendWindowStart native;
- set appendWindowStart(num value) native;
+ set appendWindowStart(num? value) native;
AudioTrackList? get audioTracks native;
@@ -28153,15 +28153,15 @@ class SourceBuffer extends EventTarget {
String? get mode native;
- set mode(String value) native;
+ set mode(String? value) native;
num? get timestampOffset native;
- set timestampOffset(num value) native;
+ set timestampOffset(num? value) native;
TrackDefaultList? get trackDefaults native;
- set trackDefaults(TrackDefaultList value) native;
+ set trackDefaults(TrackDefaultList? value) native;
bool? get updating native;
@@ -28269,7 +28269,7 @@ class SourceElement extends HtmlElement {
String? get sizes native;
- set sizes(String value) native;
+ set sizes(String? value) native;
String get src native;
@@ -28277,7 +28277,7 @@ class SourceElement extends HtmlElement {
String? get srcset native;
- set srcset(String value) native;
+ set srcset(String? value) native;
String get type native;
@@ -28325,11 +28325,11 @@ class SpeechGrammar extends Interceptor {
String? get src native;
- set src(String value) native;
+ set src(String? value) native;
num? get weight native;
- set weight(num value) native;
+ set weight(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
@@ -28522,23 +28522,23 @@ class SpeechRecognition extends EventTarget {
bool? get continuous native;
- set continuous(bool value) native;
+ set continuous(bool? value) native;
SpeechGrammarList? get grammars native;
- set grammars(SpeechGrammarList value) native;
+ set grammars(SpeechGrammarList? value) native;
bool? get interimResults native;
- set interimResults(bool value) native;
+ set interimResults(bool? value) native;
String? get lang native;
- set lang(String value) native;
+ set lang(String? value) native;
int? get maxAlternatives native;
- set maxAlternatives(int value) native;
+ set maxAlternatives(int? value) native;
void abort() native;
@@ -28826,19 +28826,19 @@ class SpeechSynthesisUtterance extends EventTarget {
String? get lang native;
- set lang(String value) native;
+ set lang(String? value) native;
num? get pitch native;
- set pitch(num value) native;
+ set pitch(num? value) native;
num? get rate native;
- set rate(num value) native;
+ set rate(num? value) native;
String? get text native;
- set text(String value) native;
+ set text(String? value) native;
SpeechSynthesisVoice? get voice native;
@@ -28846,7 +28846,7 @@ class SpeechSynthesisUtterance extends EventTarget {
num? get volume native;
- set volume(num value) native;
+ set volume(num? value) native;
/// Stream of `boundary` events handled by this [SpeechSynthesisUtterance].
Stream get onBoundary => boundaryEvent.forTarget(this);
@@ -29222,7 +29222,7 @@ class StyleSheet extends Interceptor {
bool? get disabled native;
- set disabled(bool value) native;
+ set disabled(bool? value) native;
String? get href native;
@@ -29708,7 +29708,7 @@ class TextAreaElement extends HtmlElement {
String? get autocapitalize native;
- set autocapitalize(String value) native;
+ set autocapitalize(String? value) native;
bool get autofocus native;
@@ -29720,11 +29720,11 @@ class TextAreaElement extends HtmlElement {
String? get defaultValue native;
- set defaultValue(String value) native;
+ set defaultValue(String? value) native;
String? get dirName native;
- set dirName(String value) native;
+ set dirName(String? value) native;
bool get disabled native;
@@ -29767,15 +29767,15 @@ class TextAreaElement extends HtmlElement {
String? get selectionDirection native;
- set selectionDirection(String value) native;
+ set selectionDirection(String? value) native;
int? get selectionEnd native;
- set selectionEnd(int value) native;
+ set selectionEnd(int? value) native;
int? get selectionStart native;
- set selectionStart(int value) native;
+ set selectionStart(int? value) native;
int? get textLength native;
@@ -29928,7 +29928,7 @@ class TextTrack extends EventTarget {
String? get mode native;
- set mode(String value) native;
+ set mode(String? value) native;
void addCue(TextTrackCue cue) native;
@@ -29968,19 +29968,19 @@ class TextTrackCue extends EventTarget {
num? get endTime native;
- set endTime(num value) native;
+ set endTime(num? value) native;
String? get id native;
- set id(String value) native;
+ set id(String? value) native;
bool? get pauseOnExit native;
- set pauseOnExit(bool value) native;
+ set pauseOnExit(bool? value) native;
num? get startTime native;
- set startTime(num value) native;
+ set startTime(num? value) native;
TextTrack? get track native;
@@ -30150,7 +30150,7 @@ class TimeElement extends HtmlElement {
String? get dateTime native;
- set dateTime(String value) native;
+ set dateTime(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
@@ -30500,25 +30500,25 @@ class TrackElement extends HtmlElement {
bool? get defaultValue native;
@JSName('default')
- set defaultValue(bool value) native;
+ set defaultValue(bool? value) native;
String? get kind native;
- set kind(String value) native;
+ set kind(String? value) native;
String? get label native;
- set label(String value) native;
+ set label(String? value) native;
int? get readyState native;
String? get src native;
- set src(String value) native;
+ set src(String? value) native;
String? get srclang native;
- set srclang(String value) native;
+ set srclang(String? value) native;
TextTrack? get track native;
}
@@ -30811,47 +30811,47 @@ class Url extends Interceptor {
String? get hash native;
- set hash(String value) native;
+ set hash(String? value) native;
String? get host native;
- set host(String value) native;
+ set host(String? value) native;
String? get hostname native;
- set hostname(String value) native;
+ set hostname(String? value) native;
String? get href native;
- set href(String value) native;
+ set href(String? value) native;
String? get origin native;
String? get password native;
- set password(String value) native;
+ set password(String? value) native;
String? get pathname native;
- set pathname(String value) native;
+ set pathname(String? value) native;
String? get port native;
- set port(String value) native;
+ set port(String? value) native;
String? get protocol native;
- set protocol(String value) native;
+ set protocol(String? value) native;
String? get search native;
- set search(String value) native;
+ set search(String? value) native;
UrlSearchParams? get searchParams native;
String? get username native;
- set username(String value) native;
+ set username(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
@@ -31009,11 +31009,11 @@ class VRDisplay extends EventTarget {
num? get depthFar native;
- set depthFar(num value) native;
+ set depthFar(num? value) native;
num? get depthNear native;
- set depthNear(num value) native;
+ set depthNear(num? value) native;
int? get displayId native;
@@ -31186,11 +31186,11 @@ class VRSession extends EventTarget {
num? get depthFar native;
- set depthFar(num value) native;
+ set depthFar(num? value) native;
num? get depthNear native;
- set depthNear(num value) native;
+ set depthNear(num? value) native;
VRDevice? get device native;
@@ -31410,7 +31410,7 @@ class VideoTrack extends Interceptor {
bool? get selected native;
- set selected(bool value) native;
+ set selected(bool? value) native;
SourceBuffer? get sourceBuffer native;
}
@@ -31499,7 +31499,7 @@ class VttCue extends TextTrackCue {
String? get align native;
- set align(String value) native;
+ set align(String? value) native;
@Creates('Null')
@Returns('num|String')
@@ -31519,19 +31519,19 @@ class VttCue extends TextTrackCue {
num? get size native;
- set size(num value) native;
+ set size(num? value) native;
bool? get snapToLines native;
- set snapToLines(bool value) native;
+ set snapToLines(bool? value) native;
String? get text native;
- set text(String value) native;
+ set text(String? value) native;
String? get vertical native;
- set vertical(String value) native;
+ set vertical(String? value) native;
@JSName('getCueAsHTML')
DocumentFragment getCueAsHtml() native;
@@ -31554,35 +31554,35 @@ class VttRegion extends Interceptor {
String? get id native;
- set id(String value) native;
+ set id(String? value) native;
int? get lines native;
- set lines(int value) native;
+ set lines(int? value) native;
num? get regionAnchorX native;
- set regionAnchorX(num value) native;
+ set regionAnchorX(num? value) native;
num? get regionAnchorY native;
- set regionAnchorY(num value) native;
+ set regionAnchorY(num? value) native;
String? get scroll native;
- set scroll(String value) native;
+ set scroll(String? value) native;
num? get viewportAnchorX native;
- set viewportAnchorX(num value) native;
+ set viewportAnchorX(num? value) native;
num? get viewportAnchorY native;
- set viewportAnchorY(num value) native;
+ set viewportAnchorY(num? value) native;
num? get width native;
- set width(num value) native;
+ set width(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
@@ -31694,7 +31694,7 @@ class WebSocket extends EventTarget {
String? get binaryType native;
- set binaryType(String value) native;
+ set binaryType(String? value) native;
int? get bufferedAmount native;
@@ -32385,13 +32385,13 @@ class Window extends EventTarget
String? get defaultStatus native;
- set defaultStatus(String value) native;
+ set defaultStatus(String? value) native;
/// *Deprecated*.
String? get defaultstatus native;
- set defaultstatus(String value) native;
+ set defaultstatus(String? value) native;
/**
* The ratio between physical pixels and logical CSS pixels.
@@ -32493,7 +32493,7 @@ class Window extends EventTarget
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
/**
* The user agent accessing this window.
@@ -32732,7 +32732,7 @@ class Window extends EventTarget
String? get status native;
- set status(String value) native;
+ set status(String? value) native;
/**
* This window's status bar.
@@ -33677,8 +33677,9 @@ class _BeforeUnloadEvent extends _WrappedEvent implements BeforeUnloadEvent {
String get returnValue => _returnValue;
- set returnValue(String value) {
- _returnValue = value;
+ set returnValue(String? value) {
+ // Typed as nullable only to be compatible with the overriden method.
+ _returnValue = value!;
// FF and IE use the value as the return value, Chrome will return this from
// the event callback function.
if (JS('bool', '("returnValue" in #)', wrapped)) {
@@ -34239,7 +34240,7 @@ class _Attr extends Node {
String? get value native;
- set value(String 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
@@ -34643,13 +34644,13 @@ class _DomRect extends DomRectReadOnly implements Rectangle {
num? get x native;
- set x(num value) native;
+ set x(num? value) native;
// Shadowing definition.
num? get y native;
- set y(num value) native;
+ set y(num? value) native;
}
/**
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
index c9cfa63dd01..f8fb0a709ac 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -660,7 +660,7 @@ class Index extends Interceptor {
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
ObjectStore? get objectStore native;
@@ -890,7 +890,7 @@ class ObjectStore extends Interceptor {
String? get name native;
- set name(String value) native;
+ set name(String? value) native;
Transaction? get transaction native;
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index 3bad447b591..f016890f23b 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -86,15 +86,15 @@ class Angle extends Interceptor {
num? get value native;
- set value(num value) native;
+ set value(num? value) native;
String? get valueAsString native;
- set valueAsString(String value) native;
+ set valueAsString(String? value) native;
num? get valueInSpecifiedUnits native;
- set valueInSpecifiedUnits(num value) native;
+ set valueInSpecifiedUnits(num? value) native;
void convertToSpecifiedUnits(int unitType) native;
@@ -222,7 +222,7 @@ class AnimatedBoolean extends Interceptor {
bool? get baseVal native;
- set baseVal(bool value) native;
+ set baseVal(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
@@ -240,7 +240,7 @@ class AnimatedEnumeration extends Interceptor {
int? get baseVal native;
- set baseVal(int value) native;
+ set baseVal(int? 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
@@ -258,7 +258,7 @@ class AnimatedInteger extends Interceptor {
int? get baseVal native;
- set baseVal(int value) native;
+ set baseVal(int? 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
@@ -308,7 +308,7 @@ class AnimatedNumber extends Interceptor {
num? get baseVal native;
- set baseVal(num value) native;
+ set baseVal(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
@@ -374,7 +374,7 @@ class AnimatedString extends Interceptor {
String? get baseVal native;
- set baseVal(String value) native;
+ set baseVal(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
@@ -1962,7 +1962,7 @@ class ImageElement extends GraphicsElement implements UriReference {
String? get async native;
- set async(String value) native;
+ set async(String? value) native;
AnimatedLength? get height native;
@@ -2018,15 +2018,15 @@ class Length extends Interceptor {
num? get value native;
- set value(num value) native;
+ set value(num? value) native;
String? get valueAsString native;
- set valueAsString(String value) native;
+ set valueAsString(String? value) native;
num? get valueInSpecifiedUnits native;
- set valueInSpecifiedUnits(num value) native;
+ set valueInSpecifiedUnits(num? value) native;
void convertToSpecifiedUnits(int unitType) native;
@@ -2279,27 +2279,27 @@ class Matrix extends Interceptor {
num? get a native;
- set a(num value) native;
+ set a(num? value) native;
num? get b native;
- set b(num value) native;
+ set b(num? value) native;
num? get c native;
- set c(num value) native;
+ set c(num? value) native;
num? get d native;
- set d(num value) native;
+ set d(num? value) native;
num? get e native;
- set e(num value) native;
+ set e(num? value) native;
num? get f native;
- set f(num value) native;
+ set f(num? value) native;
Matrix flipX() native;
@@ -2355,7 +2355,7 @@ class Number extends Interceptor {
num? get value native;
- set value(num 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
@@ -2522,11 +2522,11 @@ class Point extends Interceptor {
num? get x native;
- set x(num value) native;
+ set x(num? value) native;
num? get y native;
- set y(num value) native;
+ set y(num? value) native;
Point matrixTransform(Matrix matrix) native;
}
@@ -2656,11 +2656,11 @@ class PreserveAspectRatio extends Interceptor {
int? get align native;
- set align(int value) native;
+ set align(int? value) native;
int? get meetOrSlice native;
- set meetOrSlice(int value) native;
+ set meetOrSlice(int? 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
@@ -2710,19 +2710,19 @@ class Rect extends Interceptor {
num? get height native;
- set height(num value) native;
+ set height(num? value) native;
num? get width native;
- set width(num value) native;
+ set width(num? value) native;
num? get x native;
- set x(num value) native;
+ set x(num? value) native;
num? get y native;
- set y(num value) native;
+ set y(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
@@ -2781,7 +2781,7 @@ class ScriptElement extends SvgElement implements UriReference {
String? get type native;
- set type(String value) native;
+ set type(String? value) native;
// From SVGURIReference
@@ -2939,21 +2939,21 @@ class StyleElement extends SvgElement {
bool? get disabled native;
- set disabled(bool value) native;
+ set disabled(bool? value) native;
String? get media native;
- set media(String value) native;
+ set media(String? value) native;
StyleSheet? get sheet native;
// Use implementation from Element.
// String? get title native;
- // void set title(String value) native;
+ // void set title(String? value) native;
String? get type native;
- set type(String value) native;
+ set type(String? value) native;
}
// 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
@@ -3294,7 +3294,7 @@ class SvgElement extends Element implements GlobalEventHandlers, NoncedElement {
// Use implementation from Element.
// int? get tabIndex native;
- // void set tabIndex(int value) native;
+ // void set tabIndex(int? value) native;
SvgElement? get viewportElement native;
@@ -3460,7 +3460,7 @@ class SvgSvgElement extends GraphicsElement
num? get currentScale native;
- set currentScale(num value) native;
+ set currentScale(num? value) native;
Point? get currentTranslate native;
@@ -3541,7 +3541,7 @@ class SvgSvgElement extends GraphicsElement
int? get zoomAndPan native;
- set zoomAndPan(int value) native;
+ set zoomAndPan(int? 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
@@ -4006,7 +4006,7 @@ class ViewElement extends SvgElement implements FitToViewBox, ZoomAndPan {
int? get zoomAndPan native;
- set zoomAndPan(int value) native;
+ set zoomAndPan(int? 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
@@ -4027,7 +4027,7 @@ abstract class ZoomAndPan extends Interceptor {
int? get zoomAndPan native;
- set zoomAndPan(int value) native;
+ set zoomAndPan(int? 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
diff --git a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
index 049ee2ba878..da12ab39429 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -52,21 +52,21 @@ class AnalyserNode extends AudioNode {
int? get fftSize native;
- set fftSize(int value) native;
+ set fftSize(int? value) native;
int? get frequencyBinCount native;
num? get maxDecibels native;
- set maxDecibels(num value) native;
+ set maxDecibels(num? value) native;
num? get minDecibels native;
- set minDecibels(num value) native;
+ set minDecibels(num? value) native;
num? get smoothingTimeConstant native;
- set smoothingTimeConstant(num value) native;
+ set smoothingTimeConstant(num? value) native;
void getByteFrequencyData(Uint8List array) native;
@@ -146,15 +146,15 @@ class AudioBufferSourceNode extends AudioScheduledSourceNode {
bool? get loop native;
- set loop(bool value) native;
+ set loop(bool? value) native;
num? get loopEnd native;
- set loopEnd(num value) native;
+ set loopEnd(num? value) native;
num? get loopStart native;
- set loopStart(num value) native;
+ set loopStart(num? value) native;
AudioParam? get playbackRate native;
@@ -309,15 +309,15 @@ class AudioNode extends EventTarget {
int? get channelCount native;
- set channelCount(int value) native;
+ set channelCount(int? value) native;
String? get channelCountMode native;
- set channelCountMode(String value) native;
+ set channelCountMode(String? value) native;
String? get channelInterpretation native;
- set channelInterpretation(String value) native;
+ set channelInterpretation(String? value) native;
BaseAudioContext? get context native;
@@ -357,7 +357,7 @@ class AudioParam extends Interceptor {
num? get value native;
- set value(num value) native;
+ set value(num? value) native;
AudioParam cancelAndHoldAtTime(num startTime) native;
@@ -503,7 +503,7 @@ class AudioTrack extends Interceptor {
bool? get enabled native;
- set enabled(bool value) native;
+ set enabled(bool? value) native;
String? get id native;
@@ -720,7 +720,7 @@ class BiquadFilterNode extends AudioNode {
String? get type native;
- set type(String value) native;
+ set type(String? value) native;
void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse,
Float32List phaseResponse) native;
@@ -825,7 +825,7 @@ class ConvolverNode extends AudioNode {
bool? get normalize native;
- set normalize(bool value) native;
+ set normalize(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
@@ -1111,7 +1111,7 @@ class OscillatorNode extends AudioScheduledSourceNode {
String? get type native;
- set type(String value) native;
+ set type(String? value) native;
void setPeriodicWave(PeriodicWave periodicWave) native;
}
@@ -1140,23 +1140,23 @@ class PannerNode extends AudioNode {
num? get coneInnerAngle native;
- set coneInnerAngle(num value) native;
+ set coneInnerAngle(num? value) native;
num? get coneOuterAngle native;
- set coneOuterAngle(num value) native;
+ set coneOuterAngle(num? value) native;
num? get coneOuterGain native;
- set coneOuterGain(num value) native;
+ set coneOuterGain(num? value) native;
String? get distanceModel native;
- set distanceModel(String value) native;
+ set distanceModel(String? value) native;
num? get maxDistance native;
- set maxDistance(num value) native;
+ set maxDistance(num? value) native;
AudioParam? get orientationX native;
@@ -1166,7 +1166,7 @@ class PannerNode extends AudioNode {
String? get panningModel native;
- set panningModel(String value) native;
+ set panningModel(String? value) native;
AudioParam? get positionX native;
@@ -1176,11 +1176,11 @@ class PannerNode extends AudioNode {
num? get refDistance native;
- set refDistance(num value) native;
+ set refDistance(num? value) native;
num? get rolloffFactor native;
- set rolloffFactor(num value) native;
+ set rolloffFactor(num? value) native;
void setOrientation(num x, num y, num z) native;
@@ -1298,5 +1298,5 @@ class WaveShaperNode extends AudioNode {
String? get oversample native;
- set oversample(String value) native;
+ set oversample(String? value) native;
}
diff --git a/tests/lib/html/html_mock_test.dart b/tests/lib/html/html_mock_test.dart
index 94c016de9fc..ed3e85bc21f 100644
--- a/tests/lib/html/html_mock_test.dart
+++ b/tests/lib/html/html_mock_test.dart
@@ -35,7 +35,7 @@ class MockHtmlDocument extends Mock
class MockWindow extends Mock with _EventListeners implements Window {
Stream get onBeforeUnload => new Stream.fromIterable([]);
- String name = "MOCK_NAME";
+ String? name = "MOCK_NAME";
}
@proxy
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index e017c738ac4..08c65a85681 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -833,23 +833,19 @@ class HtmlDartGenerator(object):
attr_name == 'isContentEditable' and self._dart_js_interop):
return
else:
- template = '\n $GET_TYPE get $NAME;\n'
+ template = '\n $TYPE get $NAME;\n'
else:
- template = '\n $GET_TYPE get $NAME native;\n' \
- '\n set $NAME($SET_TYPE value) native;\n'
+ template = '\n $TYPE get $NAME native;\n' \
+ '\n set $NAME($TYPE value) native;\n'
- # Getter nullability is determined by attribute compatibility.
+ # Nullability is determined by attribute compatibility.
is_compat = self._mdn_reader.is_compatible(attribute)
- get_type = self.SecureOutputType(attribute.type.id,
- nullable=(not is_compat) or
- attribute.type.nullable)
- set_type = self.SecureOutputType(attribute.type.id,
- nullable=attribute.type.nullable)
+ nullable = attribute.type.nullable or not is_compat
self._members_emitter.Emit(template,
NAME=attr_name,
- GET_TYPE=get_type,
- SET_TYPE=set_type)
+ TYPE=self.SecureOutputType(
+ attribute.type.id, nullable=nullable))
def DeclareOperation(self, operation, return_type_name, method_name):
""" Declares an operation but does not include the code to invoke it.
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 6bcbdd1055d..0761fe6f32e 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -1141,9 +1141,9 @@ def _GetPromiseAttributeType(interface_operation):
return promise_attributes[interface_operation]
return None
-# Compatibility is used to help determine getter nullability i.e. if the
-# attribute is not compatible across all browsers, the getter is marked as
-# nullable. There are cases where the attribute belongs to a class that
+# Compatibility is used to help determine attribute nullability i.e. if the
+# attribute is not compatible across all browsers, the getter/setter is marked
+# as nullable. There are cases where the attribute belongs to a class that
# implements an interface whose methods are not in the IDL, however.
# Since attribute getters need to match their overridden method declaration,
# there are conflicts when the overriding method is not compatible, the
@@ -1434,9 +1434,8 @@ class Dart2JSBackend(HtmlDartGenerator):
# Compatible attribute, use the superclass property. This
# works because JavaScript will do its own dynamic dispatch.
- # Getter nullability is determined by attribute
- # compatibility.
- get_nullable = (not is_compat) or attribute.type.nullable
+ # Nullability is determined by attribute compatibility.
+ nullable = not is_compat or attribute.type.nullable
self._members_emitter.Emit(
'\n'
' // Use implementation from $SUPER.\n'
@@ -1446,10 +1445,10 @@ class Dart2JSBackend(HtmlDartGenerator):
NAME=html_name,
GET_TYPE=self.SecureOutputType(attribute.type.id,
can_narrow_type=read_only,
- nullable=get_nullable),
+ nullable=nullable),
SET_TYPE=self.SecureOutputType(attribute.type.id,
can_narrow_type=read_only,
- nullable=attribute.type.nullable or \
+ nullable=nullable or \
'TreatNullAs' in attribute.ext_attrs))
return
self._members_emitter.Emit('\n // Shadowing definition.')
@@ -1546,6 +1545,20 @@ class Dart2JSBackend(HtmlDartGenerator):
self._AddAttributeUsingProperties(attribute, html_name,
read_only, rename, metadata)
+ def _IsACompatibilityConflict(self, interface, attr):
+ if interface in compat_conflicts and attr.id in compat_conflicts[
+ interface]:
+ is_compat = self._mdn_reader.is_compatible(attr)
+ if is_compat or attr.type.nullable:
+ # Only attributes that are not compatible and not nullable
+ # belong in this list.
+ raise ValueError(
+ interface + '.' + attr.id +
+ ' has no conflict between compatibility and nullability.')
+ else:
+ return True
+ return False
+
def _AddAttributeUsingProperties(self, attribute, html_name, read_only,
rename=None, metadata=None):
self._AddRenamingGetter(attribute, html_name, rename, metadata)
@@ -1557,23 +1570,15 @@ class Dart2JSBackend(HtmlDartGenerator):
conversion = self._OutputConversion(attr.type.id, attr.id)
if conversion:
return self._AddConvertingGetter(attr, html_name, conversion)
- # Getter nullability is determined by attribute compatibility.
+ # If the attribute is incompatible, it must be marked nullable.
is_compat = self._mdn_reader.is_compatible(attr)
return_type = self.SecureOutputType(attr.type.id,
nullable=(not is_compat) or
attr.type.nullable)
native_type = self._NarrowToImplementationType(attr.type.id)
- interface = self._interface.id
non_null_return_type = self.SecureOutputType(attr.type.id,
nullable=False)
- if interface in compat_conflicts and attr.id in compat_conflicts[
- interface]:
- if is_compat or attr.type.nullable:
- # Only attributes that are not compatible and not nullable
- # belong in this list.
- raise ValueError(
- interface + '.' + attr.id +
- ' has no conflict between compatibility and nullability.')
+ if self._IsACompatibilityConflict(self._interface.id, attr):
if not rename:
rename = '@JSName(\'%s\')' % html_name
template = """\n
@@ -1607,8 +1612,13 @@ class Dart2JSBackend(HtmlDartGenerator):
# converting getter. We need to make sure the setter type matches the
# getter type.
conversion = self._OutputConversion(attr.type.id, attr.id)
- if conversion and conversion.nullable_output:
+ # If the attribute is incompatible, it must be marked nullable.
+ is_compat = self._mdn_reader.is_compatible(attr)
+ if (conversion and conversion.nullable_output) or not is_compat:
nullable_type = True
+ if self._IsACompatibilityConflict(self._interface.id, attr):
+ # Force non-nullable if it's a manual conflict.
+ nullable_type = False
self._members_emitter.Emit(
'\n $RENAME'
'\n $STATIC set $HTML_NAME($TYPE value) native;'
@@ -1622,9 +1632,9 @@ class Dart2JSBackend(HtmlDartGenerator):
# dynamic should not be marked with ?
nullable_out = conversion.nullable_output and \
not conversion.output_type == 'dynamic'
- # Getter nullability is determined by attribute compatibility.
+ # Nullability is determined by attribute compatibility.
is_compat = self._mdn_reader.is_compatible(attr)
- nullable_in = ((not is_compat) or attr.type.nullable) and \
+ nullable_in = (not is_compat or attr.type.nullable) and \
not conversion.input_type == 'dynamic'
self._members_emitter.Emit(
'\n $(METADATA)$RETURN_TYPE$NULLABLE_OUT get $HTML_NAME => '
@@ -1648,9 +1658,11 @@ class Dart2JSBackend(HtmlDartGenerator):
not conversion.nullable_input else '')
def _AddConvertingSetter(self, attr, html_name, conversion):
+ # If the attribute is incompatible, it must be marked nullable.
+ is_compat = self._mdn_reader.is_compatible(attr)
# If the attribute is nullable, the setter should be nullable.
- nullable_in = (attr.type.nullable or 'TreatNullAs' in attr.ext_attrs) \
- and not conversion.input_type == 'dynamic'
+ nullable_in = ((attr.type.nullable or 'TreatNullAs' in attr.ext_attrs) \
+ and not conversion.input_type == 'dynamic') or not is_compat
nullable_out = conversion.nullable_output and \
not conversion.output_type == 'dynamic'
self._members_emitter.Emit(
diff --git a/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
index 4180e443270..19aa83869c8 100644
--- a/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
@@ -54,16 +54,16 @@ abstract class InputElementBase implements Element {
set autofocus(bool value);
bool$NULLABLE get disabled;
- set disabled(bool value);
+ set disabled(bool$NULLABLE value);
bool$NULLABLE get incremental;
- set incremental(bool value);
+ set incremental(bool$NULLABLE value);
bool$NULLABLE get indeterminate;
- set indeterminate(bool value);
+ set indeterminate(bool$NULLABLE value);
String$NULLABLE get name;
- set name(String value);
+ set name(String$NULLABLE value);
String$NULLABLE get value;
set value(String$NULLABLE value);
@@ -97,7 +97,7 @@ abstract class TextInputElementBase implements InputElementBase {
set autocomplete(String value);
int$NULLABLE get maxLength;
- set maxLength(int value);
+ set maxLength(int$NULLABLE value);
String get pattern;
set pattern(String value);
@@ -106,13 +106,13 @@ abstract class TextInputElementBase implements InputElementBase {
set placeholder(String value);
bool$NULLABLE get readOnly;
- set readOnly(bool value);
+ set readOnly(bool$NULLABLE value);
bool get required;
set required(bool value);
int$NULLABLE get size;
- set size(int value);
+ set size(int$NULLABLE value);
void select();
@@ -142,7 +142,7 @@ abstract class SearchInputElement implements TextInputElementBase {
factory SearchInputElement() => new InputElement(type: 'search');
String$NULLABLE get dirName;
- set dirName(String value);
+ set dirName(String$NULLABLE value);
Element$NULLABLE get list;
@@ -159,7 +159,7 @@ abstract class TextInputElement implements TextInputElementBase {
factory TextInputElement() => new InputElement(type: 'text');
String$NULLABLE get dirName;
- set dirName(String value);
+ set dirName(String$NULLABLE value);
Element$NULLABLE get list;
}
@@ -228,10 +228,10 @@ abstract class EmailInputElement implements TextInputElementBase {
Element$NULLABLE get list;
int$NULLABLE get maxLength;
- set maxLength(int value);
+ set maxLength(int$NULLABLE value);
bool$NULLABLE get multiple;
- set multiple(bool value);
+ set multiple(bool$NULLABLE value);
String get pattern;
set pattern(String value);
@@ -240,13 +240,13 @@ abstract class EmailInputElement implements TextInputElementBase {
set placeholder(String value);
bool$NULLABLE get readOnly;
- set readOnly(bool value);
+ set readOnly(bool$NULLABLE value);
bool get required;
set required(bool value);
int$NULLABLE get size;
- set size(int value);
+ set size(int$NULLABLE value);
/// Returns true if this input type is supported on the current platform.
static bool get supported {
@@ -269,16 +269,16 @@ abstract class RangeInputElementBase implements InputElementBase {
Element$NULLABLE get list;
String$NULLABLE get max;
- set max(String value);
+ set max(String$NULLABLE value);
String$NULLABLE get min;
- set min(String value);
+ set min(String$NULLABLE value);
String$NULLABLE get step;
- set step(String value);
+ set step(String$NULLABLE value);
num$NULLABLE get valueAsNumber;
- set valueAsNumber(num value);
+ set valueAsNumber(num$NULLABLE value);
void stepDown([int$NULLABLE n]);
@@ -298,7 +298,7 @@ abstract class DateInputElement implements RangeInputElementBase {
set valueAsDate(DateTime value);
bool$NULLABLE get readOnly;
- set readOnly(bool value);
+ set readOnly(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -322,7 +322,7 @@ abstract class MonthInputElement implements RangeInputElementBase {
set valueAsDate(DateTime value);
bool$NULLABLE get readOnly;
- set readOnly(bool value);
+ set readOnly(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -346,7 +346,7 @@ abstract class WeekInputElement implements RangeInputElementBase {
set valueAsDate(DateTime value);
bool$NULLABLE get readOnly;
- set readOnly(bool value);
+ set readOnly(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -370,7 +370,7 @@ abstract class TimeInputElement implements RangeInputElementBase {
set valueAsDate(DateTime value);
bool$NULLABLE get readOnly;
- set readOnly(bool value);
+ set readOnly(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -393,7 +393,7 @@ abstract class LocalDateTimeInputElement implements RangeInputElementBase {
new InputElement(type: 'datetime-local');
bool$NULLABLE get readOnly;
- set readOnly(bool value);
+ set readOnly(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -417,7 +417,7 @@ abstract class NumberInputElement implements RangeInputElementBase {
set placeholder(String value);
bool$NULLABLE get readOnly;
- set readOnly(bool value);
+ set readOnly(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -455,7 +455,7 @@ abstract class CheckboxInputElement implements InputElementBase {
factory CheckboxInputElement() => new InputElement(type: 'checkbox');
bool$NULLABLE get checked;
- set checked(bool value);
+ set checked(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -477,7 +477,7 @@ abstract class RadioButtonInputElement implements InputElementBase {
factory RadioButtonInputElement() => new InputElement(type: 'radio');
bool$NULLABLE get checked;
- set checked(bool value);
+ set checked(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -490,10 +490,10 @@ abstract class FileUploadInputElement implements InputElementBase {
factory FileUploadInputElement() => new InputElement(type: 'file');
String$NULLABLE get accept;
- set accept(String value);
+ set accept(String$NULLABLE value);
bool$NULLABLE get multiple;
- set multiple(bool value);
+ set multiple(bool$NULLABLE value);
bool get required;
set required(bool value);
@@ -531,7 +531,7 @@ abstract class ImageButtonInputElement implements InputElementBase {
factory ImageButtonInputElement() => new InputElement(type: 'image');
String$NULLABLE get alt;
- set alt(String value);
+ set alt(String$NULLABLE value);
String get formAction;
set formAction(String value);
@@ -549,13 +549,13 @@ abstract class ImageButtonInputElement implements InputElementBase {
set formTarget(String value);
int$NULLABLE get height;
- set height(int value);
+ set height(int$NULLABLE value);
String$NULLABLE get src;
- set src(String value);
+ set src(String$NULLABLE value);
int$NULLABLE get width;
- set width(int value);
+ set width(int$NULLABLE value);
}
/**
diff --git a/tools/dom/templates/html/impl/impl_Window.darttemplate b/tools/dom/templates/html/impl/impl_Window.darttemplate
index bfd09a4f8bd..0c35a8b4cd4 100644
--- a/tools/dom/templates/html/impl/impl_Window.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Window.darttemplate
@@ -287,8 +287,9 @@ $endif
String get returnValue => _returnValue;
- set returnValue(String value) {
- _returnValue = value;
+ set returnValue(String$NULLABLE value) {
+ // Typed as nullable only to be compatible with the overriden method.
+ _returnValue = value$NULLASSERT;
// FF and IE use the value as the return value, Chrome will return this from
// the event callback function.
if (JS('bool', '("returnValue" in #)', wrapped)) {