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 // Configure Polymer to use native shadow DOM instead of shady DOM. |
11 if (window.Polymer) { | 11 if (!window.Polymer) { |
12 throw new Error('Cannot proceed. Polymer already present.'); | 12 window.Polymer = {}; |
| 13 window.Polymer.dom = 'shadow'; |
| 14 } else if (!window.Polymer.Settings.useNativeShadow) { |
| 15 throw new Error('Polymer already initialized without useNativeShadow.'); |
13 } | 16 } |
14 window.Polymer = {}; | |
15 window.Polymer.dom = 'shadow'; | |
16 </script> | 17 </script> |
OLD | NEW |