OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 <script> | 7 <script> |
8 'use strict'; | 8 'use strict'; |
9 | 9 |
10 // Force Polymer into native shadowDom mode | 10 // Force Polymer into native shadowDom mode |
11 if (window.Polymer) { | 11 if (!window.Polymer) { |
12 window.Polymer = {}; | |
13 window.Polymer.dom = 'shadow'; | |
14 } else if (!window.Polymer.Settings.useNativeShadow) { | |
12 throw new Error('Cannot proceed. Polymer already present.'); | 15 throw new Error('Cannot proceed. Polymer already present.'); |
eakuefner
2017/06/26 16:43:25
Can you update this error message? Polymer already
| |
13 } | 16 } |
14 window.Polymer = {}; | |
15 window.Polymer.dom = 'shadow'; | |
16 </script> | 17 </script> |
OLD | NEW |