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

Side by Side Diff: sky/framework/sky-element/sky-element.sky

Issue 694423002: Replace <link rel="import"> with <import> (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 <!-- 1 <!--
2 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 --> 5 -->
6 <link rel="import" href="TemplateBinding.sky" /> 6 <import src="TemplateBinding.sky" />
7 <script> 7 <script>
8 var Base = { 8 var Base = {
9 __proto__: HTMLElement.prototype, 9 __proto__: HTMLElement.prototype,
10 10
11 register: function() { 11 register: function() {
12 // |this| is prototype 12 // |this| is prototype
13 var template = document.currentScript.previousElementSibling; 13 var template = document.currentScript.previousElementSibling;
14 if (template && template.localName == 'template') 14 if (template && template.localName == 'template')
15 this.template_ = template; 15 this.template_ = template;
16 }, 16 },
(...skipping 30 matching lines...) Expand all
47 }; 47 };
48 48
49 function SkyElement(prototype) { 49 function SkyElement(prototype) {
50 prototype.__proto__ = Base; 50 prototype.__proto__ = Base;
51 document.registerElement(prototype.name, { prototype: prototype }); 51 document.registerElement(prototype.name, { prototype: prototype });
52 prototype.register(); 52 prototype.register();
53 }; 53 };
54 54
55 module.exports = SkyElement; 55 module.exports = SkyElement;
56 </script> 56 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698