Polymer in Chrome for iOS - it doesn't work, does it?

I was delighted with Polymer and started developing a web application. I soon found out that Firefox can't load the site correctly, see this SO post for details:

Polymer: layout nested in Firefox is fine in Chrome

Then I downloaded the latest Chrome on iPhone 4 (iOS7) and the same thing for iPhone 6 (iOS8) and tried the website. I see the same errors as in Firefix (see link above).

In other words - going to my Polymer based website using Chrome for iOS isn't as bad as Firefox isn't working.

  • So, I would just like to confirm that this is the case: Polymer does not work on iOS (no support in Safari, no support in Chrome for iOS). Right?

As I noted in my other SO question linked above, I expected it to work in the entire browser because of the "polyfill", but that doesn't seem to help.

Am I missing something? =)

Note. Using Chrome for Android works fine, no errors.

+3


source to share


2 answers


As I mentioned in another thread, this is not possible for CSS polyfill scoping. Chrome on iOS isn't actually Chrome, it's built using the iOS WebView (old in this one) which means there is no embedded Shadow DOM and CSS object. The shadow DOM polyfill correctly wraps DOM API methods such as querySelector and getElementById, so you end up with limited encapsulation , in that regard. But for CSS, the only thing a polyfill can do is rename your selectors, so: host.blah is renamed to x-foo.blah and appended to the style tag in the head. This means that you need to write defensive CSS (as you do today) and avoid very loose selectors because they will apply.



+1


source


I experienced something very strange today and maybe it could help you.

My firefox rendered as if no polyfills existed.
So I went back to false on about:config

dom.webcomponents.enabled and it came back to life.



Why? no clue.
It worked, so if you have it dom.webcomponents.enabled

true

in firefox about:config

try it. IMHO looks like a polyfill error on supported (albeit poorly supported) web component browsers. worth a try.

0


source







All Articles