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

Unified Diff: tools/dom/templates/html/dartium/html_dartium.darttemplate

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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index 1e7d2c377439c83226895e5f35e53c8a3125c934..25122510e5f92dae540c07f8e6fc25233d7d8157 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -464,7 +464,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.).
@@ -549,7 +549,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 | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698