Try changing your javascript to this:
angular.bootstrap(wrap(document), ['test']);
To Polyfill Shadow DOM we wrap the native DOM nodes and update their
methods to respect shadow boundaries. Some nodes, like document, window,
document.body, document.head, cannot be overridden so you have to wrap them
yourself and use the returned value. One good trick is to throw everything
into an immediately invoked function like this:
(function(document) {
// do all your stuff in here
})(wrap(document));
More in-depth explanation of wrappers can be found here:
http://www.polymer-project.org/platform/shadow-dom.html#wrappers
Hope that helps!
On Wed, Jul 30, 2014 at 9:38 AM, Sébastien Cevey <[email protected]>
wrote:
> I've been getting errors when trying to load platform.js (0.3.4) in an
> AngularJS (1.2.19 or 1.3.*) application. I'm finding it hard to track it
> down precisely because I couldn't find an unminimised platform.js source
> and FF doesn't seem to pick up the source map of the minimised one, but
> I've copied the stack trace below.
>
> My suspicion is that it may somehow be related to some kind of polyfill
> injected on `appendChild`/`insertBefore`? It works perfectly fine in Chrome
> 37.
>
> I've created a reduced test case here: http://jsbin.com/roxif/2/edit
>
> You can see the error in the console.
>
> Any help would be very much appreciated!
>
> c@http://cdn.jsdelivr.net/polymer.platform/0.3.4/platform.js:12:21782
> b@http://cdn.jsdelivr.net/polymer.platform/0.3.4/platform.js:13:8230
> .insertBefore@
> http://cdn.jsdelivr.net/polymer.platform/0.3.4/platform.js:13:11769
> .appendChild@
> http://cdn.jsdelivr.net/polymer.platform/0.3.4/platform.js:13:11708
> Q@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:2:736
> j@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:28103
> M@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:23435
> M@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:23603
> M@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:23603
> M@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:23603
> A@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:22668
> Z/s/</<@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:7018
> Vn/this.$get</l.prototype.$eval@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:2:26492
> Vn/this.$get</l.prototype.$apply@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:2:26776
> Z/s/<@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:6976
> i@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:17165
> Z/s@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:6958
> Z@
> http://cdn.jsdelivr.net/angular.all/1.3.0-beta.14/angular-all.min.js:1:7069
> @http://run.jsbin.com/runner:44:32
> newContext/context.execCb@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:1658:17
> newContext/Module.prototype.check@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:874:33
> newContext/Module.prototype.enable/</<@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:1121:29
> bind/<@http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:132:13
> newContext/Module.prototype.emit/<@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:1164:21
> each@http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:57:1
> newContext/Module.prototype.emit@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:1163:17
> newContext/Module.prototype.check@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:925:25
> newContext/Module.prototype.enable@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:1151:17
> newContext/Module.prototype.init@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:782:21
> callGetModule@http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:1178:17
> newContext/context.completeLoad@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:1572:71
> newContext/context.onScriptLoad@
> http://cdn.jsdelivr.net/requirejs/2.1.14/require.js:1679:21
> r@http://cdn.jsdelivr.net/polymer.platform/0.3.4/platform.js:13:810
> p@http://cdn.jsdelivr.net/polymer.platform/0.3.4/platform.js:13:166
> n@http://cdn.jsdelivr.net/polymer.platform/0.3.4/platform.js:12:32005
> m@http://cdn.jsdelivr.net/polymer.platform/0.3.4/platform.js:12:31595
>
>
> --
> Sébastien Cevey
> Software Developer
>
> ------------------------------
> Visit theguardian.com. On your mobile and tablet, download the Guardian
> iPhone and Android apps theguardian.com/guardianapp and our tablet
> editions theguardian.com/editions. Save up to 57% by subscribing to the
> Guardian and Observer - choose the papers you want and get full digital
> access. Visit subscribe.theguardian.com
>
> This e-mail and all attachments are confidential and may also be
> privileged. If you are not the named recipient, please notify the sender
> and delete the e-mail and all attachments immediately. Do not disclose the
> contents to another person. You may not use the information for any
> purpose, or store, or copy, it in any way. Guardian News & Media Limited
> is not liable for any computer viruses or other material transmitted with
> or as part of this e-mail. You should employ virus checking software.
>
> Guardian News & Media Limited is a member of Guardian Media Group plc.
> Registered
> Office: PO Box 68164, Kings Place, 90 York Way, London, N1P 2AP. Registered
> in England Number 908396
>
>
> Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/CALft9sTmw9FhQUd6w3nOSYyMLg3O%2Btd-bWJXF_JRZ5fMchB5PQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/polymer-dev/CALft9sTmw9FhQUd6w3nOSYyMLg3O%2Btd-bWJXF_JRZ5fMchB5PQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/CAJj5OwDBG%2BTmkAhDq7bSrF%3D-cdfqxbUSNZAM6mXKu3MY1ReKOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.