Commit 12b3c47e authored by dpapad's avatar dpapad Committed by Commit Bot

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: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664086}
parent 3d86d180
...@@ -10,6 +10,7 @@ module.exports = { ...@@ -10,6 +10,7 @@ module.exports = {
}, },
'parserOptions': { 'parserOptions': {
'ecmaVersion': 2017, 'ecmaVersion': 2017,
'sourceType': 'module',
}, },
'rules': { 'rules': {
// Enabled checks. // Enabled checks.
......
<!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>
// 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);
...@@ -429,6 +429,18 @@ ...@@ -429,6 +429,18 @@
<structure name="IDR_PRINT_PREVIEW_ICONS_HTML" <structure name="IDR_PRINT_PREVIEW_ICONS_HTML"
file="icons.html" file="icons.html"
type="chrome_html" /> type="chrome_html" />
<if expr="not optimize_webui">
<!-- TODO(crbug.com/965770): The folowing 2 files are unrelated to Print
Preview, they are only used during Polymer 3 experimentation, and
should be removed after experimentation concludes. -->
<structure name="IDR_PRINT_PREVIEW_POLYMER3_DEMO_HTML"
file="polymer3/demo.html"
type="chrome_html" />
<structure name="IDR_PRINT_PREVIEW_POLYMER3_DEMO_JS"
file="polymer3/demo.js"
type="chrome_html" />
</if>
</structures> </structures>
</release> </release>
</grit> </grit>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment