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

Unified Diff: pkg/web_components/test/interop_test.html

Issue 333073002: Support upgrading existing elements already on the page. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « pkg/web_components/test/interop_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/web_components/test/interop_test.html
diff --git a/pkg/web_components/test/interop_test.html b/pkg/web_components/test/interop_test.html
index 3c4f10e8b8790973b62d6fa1b89ff5471da15eb4..036c7ef761ed9e06755a81e54fb1551efd68d877 100644
--- a/pkg/web_components/test/interop_test.html
+++ b/pkg/web_components/test/interop_test.html
@@ -27,8 +27,14 @@
B.prototype.createdCallback = function() { this.x = counter++; };
B.extends = 'div';
+ var D = function() {};
+ D.prototype = Object.create(HTMLElement.prototype);
+ D.prototype.inc = function() { this.x = counter++; };
+ D.prototype.createdCallback = function() { this.inc(); };
+
document.registerElement('x-a', A);
document.registerElement('x-b', B);
+ document.registerElement('x-d', D);
function registerC() {
var proto = Object.create(HTMLElement.prototype, {
@@ -48,10 +54,14 @@
function addC() {
document.body.appendChild(document.createElement('x-c'));
}
+ function addD() {
+ document.body.appendChild(document.createElement('x-d'));
+ }
</script>
<x-a id="i1"></x-a>
<div is="x-b" id="i2"></div>
- <x-c id="i3"></x-b>
+ <x-c id="i3"></x-c>
+ <x-d id="i4"></x-d>
<script type="text/javascript"
src="/root_dart/tools/testing/dart/test_controller.js"></script>
%TEST_SCRIPTS%
« no previous file with comments | « pkg/web_components/test/interop_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698