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

Side by Side Diff: pkg/shadow_dom/tool/play.html

Issue 158083002: introduce web_components pkg for consolidated polyfills (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 Copyright 2012 The Polymer Authors. All rights reserved.
4 Use of this source code is goverened by a BSD-style
5 license that can be found in the LICENSE file.
6 -->
7 <meta charset="utf-8">
8 <script src="shadowdom.js"></script>
9 <style>
10
11 .el,
12 .sr {
13 height: 300px;
14 width: 300px;
15 }
16
17 </style>
18 <textarea class="el" placeholder="Element host"></textarea>
19 <textarea class="sr" placeholder="Shadow Root"></textarea>
20 <button onclick="update()">Update</button>
21
22 <div class="test">Real</div>
23
24 <script>
25
26 var el = document.querySelector('.test');
27 var sr = el.createShadowRoot();
28
29 sr.innerHTML = 'Before <content></content> After';
30
31 function update() {
32 el.innerHTML = document.querySelector('.el').value;
33 sr.innerHTML = document.querySelector('.sr').value;
34 }
35
36 document.querySelector('.el').value = el.innerHTML;
37 document.querySelector('.sr').value = sr.innerHTML;
38
39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698