|
Make SkyElement more classy.
The syntax for implementing a SkyElement is now:
<sky-element name="element-name">
<template>
<!-- template here -->
</template>
<script>
module.exports = class extends SkyElement {
attached() {
// ...
}
// .. methods here ..
}.register();
</script>
</sky-element>
The register() static method on SkyElement subclasses calls
document.registerElement() and returns the generated constructor.
It uses the parent <sky-element>'s name attribute to set the name
of the element.
R=rafaelw@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/c1d1dd2b46936dadb4277671d13b6ee7ff6d6234
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+152 lines, -124 lines) |
Patch |
|
M |
sky/examples/city-list/city-list.sky
|
View
|
1
|
7 chunks |
+45 lines, -40 lines |
0 comments
|
Download
|
|
M |
sky/examples/file-browser.sky
|
View
|
|
3 chunks |
+10 lines, -7 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-header.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-menu-button.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-panel.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-panel-content.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-panel-header.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-scrollable.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-search-input.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-title.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-toast.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/app-toolbar.sky
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/flights-app.sky
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/examples/flights-app/index.sky
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
sky/framework/sky-element/sky-element.sky
|
View
|
|
2 chunks |
+40 lines, -41 lines |
0 comments
|
Download
|
Total messages: 4 (1 generated)
|