| Index: pkg/polymer/lib/src/build/polyfill_injector.dart
|
| diff --git a/pkg/polymer/lib/src/build/polyfill_injector.dart b/pkg/polymer/lib/src/build/polyfill_injector.dart
|
| index c6c0f884ab92e4eb4ae78dee8ab09446c02eb90d..f9786133c8768dce91168e8abd104470c0753105 100644
|
| --- a/pkg/polymer/lib/src/build/polyfill_injector.dart
|
| +++ b/pkg/polymer/lib/src/build/polyfill_injector.dart
|
| @@ -86,10 +86,13 @@ class PolyfillInjector extends Transformer with PolymerTransformer {
|
| }
|
| // Remove "packages/browser/dart.js"
|
| if (dartJs != null) dartJs.remove();
|
| + } else if (dartJs == null) {
|
| + document.body.nodes.add(parseFragment(
|
| + '<script src="packages/browser/dart.js"></script>'));
|
| }
|
|
|
| _addScript(urlSegment) {
|
| - document.body.nodes.insert(0, parseFragment(
|
| + document.head.nodes.insert(0, parseFragment(
|
| '<script src="packages/$urlSegment"></script>\n'));
|
| }
|
|
|
| @@ -99,7 +102,7 @@ class PolyfillInjector extends Transformer with PolymerTransformer {
|
| _addScript('custom_element/custom-elements.debug.js');
|
| }
|
|
|
| - // This polyfill needs to be the first one on the body
|
| + // This polyfill needs to be the first one on the head
|
| // TODO(jmesserly): this is .debug to workaround issue 13046.
|
| if (!shadowDomFound) _addScript('shadow_dom/shadow_dom.debug.js');
|
|
|
|
|