Skip to content

Commit fe93b16

Browse files
srujzsCommit Bot
authored and
Commit Bot
committed
[dart:html] Add MathMLElement
Fixes b/236721367 Per https://developer.mozilla.org/en-US/docs/Web/API/MathMLElement, MathMLElement is in the Element type hierarchy. This adds an empty class so that type-checking against Element can pass. Change-Id: Ie0c2e33c2236bedd5627ed8624437d24d9fbac2d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249945 Commit-Queue: Srujan Gaddam <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]>
1 parent 15cf794 commit fe93b16

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

sdk/lib/html/dart2js/html_dart2js.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20555,6 +20555,23 @@ class MapElement extends HtmlElement {
2055520555
// for details. All rights reserved. Use of this source code is governed by a
2055620556
// BSD-style license that can be found in the LICENSE file.
2055720557

20558+
@Native("MathMLElement")
20559+
class MathMLElement extends Element {
20560+
// To suppress missing implicit constructor warnings.
20561+
factory MathMLElement._() {
20562+
throw new UnsupportedError("Not supported");
20563+
}
20564+
/**
20565+
* Constructor instantiated by the DOM when a custom element has been created.
20566+
*
20567+
* This can only be called by subclasses from their created constructor.
20568+
*/
20569+
MathMLElement.created() : super.created();
20570+
}
20571+
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
20572+
// for details. All rights reserved. Use of this source code is governed by a
20573+
// BSD-style license that can be found in the LICENSE file.
20574+
2055820575
@Native("MediaCapabilities")
2055920576
class MediaCapabilities extends JavaScriptObject {
2056020577
// To suppress missing implicit constructor warnings.

tools/dom/dom.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12423,6 +12423,10 @@
1242312423
},
1242412424
"support_level": "untriaged"
1242512425
},
12426+
"MathMLElement": {
12427+
"members": {},
12428+
"support_level": "untriaged"
12429+
},
1242612430
"Matrix": {
1242712431
"members": {
1242812432
"Matrix": {},

tools/dom/idl/dart/dart.idl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,3 +681,5 @@ interface NoncedElement {
681681
// PositionCallback can be used on a deprecated Position object,
682682
// a GeolocationPosition object, or a Firefox-specific object.
683683
callback PositionCallback = void(object position);
684+
685+
interface MathMLElement : Element {};

0 commit comments

Comments
 (0)