Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: tests/io-element.test.js

Issue 29723623: Issue 6487 - IOElement as base component for ABP UI (Closed)
Patch Set: Created March 21, 2018, 8:10 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /* globals module, require */
2
3 "use strict";
4
5 const IOElement = require("../js/io-element");
6
7 class IOClock extends IOElement
8 {
9 connectedCallback()
10 {
11 this._timer = setInterval(() => this.render(), 1000);
12 }
13
14 disconnectedCallback()
15 {
16 clearInterval(this._timer);
17 }
18
19 render()
20 {
21 this.html`
22 ${{i18n: "io_clock"}}
23 @${(new Date()).toLocaleTimeString()}
24 `;
25 }
26 }
27
28 IOClock.define("io-clock");
OLDNEW
« package.json ('K') | « tests/io-element.html ('k') | tests/locale/en_US/common.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld