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

Side by Side Diff: appengine/config_service/ui/bower_components/shadycss/src/style-placeholder.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) 2017 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 'use strict';
12
13 import {applyStylePlaceHolder} from './style-util.js'
14 import {nativeShadow} from './style-settings.js'
15
16 /** @type {Object<string, !Node>} */
17 let placeholderMap = {};
18
19 /**
20 * @const {CustomElementRegistry}
21 */
22 const ce = window['customElements'];
23 if (ce && !nativeShadow) {
24 /**
25 * @const {function(this:CustomElementRegistry, string,function(new:HTMLElemen t),{extends: string}=)}
26 */
27 const origDefine = ce['define'];
28 /**
29 * @param {string} name
30 * @param {function(new:HTMLElement)} clazz
31 * @param {{extends: string}=} options
32 * @return {function(new:HTMLElement)}
33 */
34 const wrappedDefine = (name, clazz, options) => {
35 placeholderMap[name] = applyStylePlaceHolder(name);
36 return origDefine.call(/** @type {!CustomElementRegistry} */(ce), name, claz z, options);
37 }
38 ce['define'] = wrappedDefine;
39 }
40
41 export default placeholderMap;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698