forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebUI: Add a dummy Polymer3 WebUI demo page for experimentation.
This page is "parked" temporarily under chrome://print/polymer3/demo.html, and only included for optimize_webui=false, to avoid the overhead of adding a new top-level WebUI page, and should be removed once experimentation concludes. Bug: 965770 Change-Id: I9de73ccbdbd1150bc7ca73f09fe8b81d973ff0e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1613704 Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org> Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#664086}
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Polymer 3 WebUI demo</title> | ||
<script type="module" src="demo.js"></script> | ||
</head> | ||
<body> | ||
<hello-polymer3></hello-polymer3> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'chrome://resources/polymer/v3_0/paper-button/paper-button.js'; | ||
|
||
import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer-element.js'; | ||
|
||
class HelloPolymer3Element extends PolymerElement { | ||
static get template() { | ||
return html` | ||
<div>Hello Polymer3 [[time]]</div> | ||
<paper-button on-click="onClick_">Update time</paper-button> | ||
`; | ||
} | ||
|
||
static get properties() { | ||
return { | ||
time: { | ||
type: Number, | ||
value: Date.now(), | ||
}, | ||
}; | ||
} | ||
|
||
onClick_() { | ||
this.time = Date.now(); | ||
} | ||
} // class HelloPolymer3 | ||
|
||
customElements.define('hello-polymer3', HelloPolymer3Element); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters