OLD | NEW |
(Empty) | |
| 1 /** |
| 2 * @license |
| 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
| 4 * This code may only be used under the BSD style license found at http://polyme
r.github.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/CON
TRIBUTORS.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/PA
TENTS.txt |
| 9 */ |
| 10 |
| 11 var JS = 'script:not([type]), script[type="text/javascript"]'; |
| 12 var URL_ATTR = ['href', 'src', 'action', 'style']; |
| 13 |
| 14 module.exports = { |
| 15 EOL: require('os').EOL, |
| 16 ELEMENTS: 'polymer-element:not([assetpath])', |
| 17 ELEMENTS_NOSCRIPT: 'polymer-element[noscript]', |
| 18 ABS_URL: /(^data:)|(^http[s]?:)|(^\/)|(^mailto:)|(^tel:)|(^sms:)/, |
| 19 REMOTE_ABS_URL: /(^http[s]?\:)|(^\/\/)/, |
| 20 IMPORTS: 'link[rel="import"][href]', |
| 21 URL: /url\([^)]*\)/g, |
| 22 URL_ATTR: URL_ATTR, |
| 23 URL_ATTR_SEL: '[' + URL_ATTR.join('],[') + ']', |
| 24 URL_TEMPLATE: '{{.*}}', |
| 25 JS: JS, |
| 26 JS_SRC: JS.split(',').map(function(s){ return s + '[src]'; }).join(','), |
| 27 JS_INLINE: JS.split(',').map(function(s) { return s + ':not([src])'; }).join('
,'), |
| 28 CSS: 'style:not([type]), style[type="text/css"]', |
| 29 // Output match is [ 'Polymer(', NAME_OF_ELEMENT OR undefined, ',', { or ) ] |
| 30 POLYMER_INVOCATION: /Polymer\(([^,{]+)?(,\s*)?({|\))/ |
| 31 }; |
OLD | NEW |