Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 1392063003: More tests now pass and fixed custom elements to only work in default html and svg namespace (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | tests/co19/co19-dartium.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index a4d3eb755b61d0b3ac9a44b42ab3225d92542bc8..1f9f0249c529ff39b5b82b67c3128ab37ad7d945 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -1219,7 +1219,7 @@ class DartHtmlDomObject {
// Flag to disable JS interop asserts. Setting to false will speed up the
// wrap_jso calls.
-bool __interop_checks = true;
+bool __interop_checks = false;
/** Expando for JsObject, used by every Dart class associated with a Javascript
* class (e.g., DOM, WebAudio, etc.).
@@ -1304,7 +1304,11 @@ wrap_jso(jsObject) {
}
// Custom Element to upgrade.
- if (customElementClass != null && extendsTag == "") {
+ // Only allow custome elements to be created in the html or svg default
+ // namespace.
+ var defaultNS = jsObject['namespaceURI'] == 'http://www.w3.org/1999/xhtml' ||
+ jsObject['namespaceURI'] == 'http://www.w3.org/2000/svg';
+ if (customElementClass != null && extendsTag == "" && defaultNS) {
try {
dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
} finally {
« no previous file with comments | « no previous file | tests/co19/co19-dartium.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698