A map Web Component: reference use-case doesn't work with Chromium by default (without special flags)

57 views
Skip to first unread message

urbai...@gmail.com

unread,
Jan 17, 2014, 5:02:08 PM1/17/14
to polym...@googlegroups.com
exploration purpose.However, for some, it fails by Chromium running on my Windows 7 platform : 

TypeError
 "TypeError: Array.prototype.forEach called on null or undefined
    at forEach (native)
    at CSSRuleList.forEach (native)
    at forEach (native)
    at CSSRuleList.forEach (native)

NOTE : I use Chromium 33.0.1724.0 (Developer Build 237962). I haven't enabled anything special by chrome://flags
Thanks in advance for your help.

/* Urbain */

Hoa V. Dinh

unread,
Jan 17, 2014, 5:04:40 PM1/17/14
to urbai...@gmail.com, polym...@googlegroups.com
Hi Urbain,

I also encountered a similar issue:
I had to patch the shadow dom polyfill.

Here’s the patch I applied on shadow_dom.debug.js.
I can be helpful for you to find some way around this issue.

-- 
Hoa V. Dinh

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 polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/c1489208-126f-49a0-8d14-2c6ffbc492b4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

shadow_dom.patch

Daniel Freedman

unread,
Jan 17, 2014, 5:16:24 PM1/17/14
to Hoa V. Dinh, urbai...@gmail.com, polymer-dev
Urbain, I think part of the problem here is that you're loading HTMLImports and polymer-expressions twice, both are built into platform.js.

Hoa, I'm not sure what your patch is for, since shadow_dom.debug.js is not a file referenced anywhere. It seems like your patch would actually be applied against several files, some in TemplateBinding and some in Platform.js


hugo.m...@gmail.com

unread,
Jan 17, 2014, 8:08:13 PM1/17/14
to polym...@googlegroups.com, urbai...@gmail.com
Hi everyone. I faced the same kind of trouble and applied similar Hoa's WORKAROUND but in <Platform.js> this time:

            scopeRules: function(a, b, c) {      /* line 3403  ::  file <Platform.js> here enclosed */
                var d = "";
if (a == null) {     /* patch suggested by Hugo, according to Hoa's workaround */
                     return d
}
                return Array.prototype.forEach.call(a, function(a) {

Execution now runs successful as "proved" by http://hugo.machefer.free.fr/map4/web-components/map.html
JS instantiations twice were removed (not responsible for this issue, but cleaned, for the sake of sanity of course)

-- hmachefe

hugo.m...@gmail.com

unread,
Jan 17, 2014, 8:09:49 PM1/17/14
to polym...@googlegroups.com, urbai...@gmail.com, hugo.m...@gmail.com
Adding promised file as expected => always better this way ;-)
Platform.js
Reply all
Reply to author
Forward
0 new messages