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

Side by Side Diff: appengine/config_service/ui/bower_components/shadycss/examples/custom-style-element.js

Issue 2923973003: Added base template for config ui. (Closed)
Patch Set: Created 3 years, 6 months 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
(Empty)
1 /**
2 @license
3 Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 */
10
11 /*
12 Wrapper over <style> elements to co-operate with ShadyCSS
13
14 Example:
15 <custom-style>
16 <style>
17 ...
18 </style>
19 </custom-style>
20 */
21 (function() {
22 'use strict';
23
24 const CustomStyleInterface = window.ShadyCSS.CustomStyleInterface;
25
26 class CustomStyle extends HTMLElement {
27 constructor() {
28 super();
29 this._style = null;
30 CustomStyleInterface.addCustomStyle(this);
31 }
32 getStyle() {
33 if (!this._style) {
34 this._style = this.querySelector('style');
35 }
36 return this._style;
37 }
38 }
39
40 window.CustomStyle = CustomStyle;
41 window.customElements.define('custom-style', CustomStyle);
42 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698