webcomponentsjs icon indicating copy to clipboard operation
webcomponentsjs copied to clipboard

Investigate HTMLImports polyfill on Windows 8.1 Cordova

Open kevinpschaaf opened this issue 11 years ago • 5 comments

Report here https://github.com/Polymer/polymer/issues/2168 indicates Polymer fails to run on Windows 8.1 Cordova.

Could possibly be an issue with XHR to local filesystem in that environment.

kevinpschaaf avatar Jul 29 '15 22:07 kevinpschaaf

Hi, there were no any errors in the console. And actually I tried to start Windows 8.1 app for desktop, not mobile. But it's the same behavior as for desktop and also as for mobile, there are no any errors in console and no any content in controls.

Prontsevich avatar Aug 03 '15 18:08 Prontsevich

Ran into this same issue on Windows 10. Was able to get more information by debugging in Visual Studio:

Unhandled exception at line 10, column 21807 in ms-appx://io.cordova.myapp35698d/www/bower_components/webcomponentsjs/webcomponents-lite.min.js

0x800c001c - JavaScript runtime error: Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. 
For example, using the innerHTML property to add script or malformed HTML will generate this exception. 
Use the toStaticHTML method to filter dynamic content, or explicitly create elements and attributes with a method such as createElement.  
For more information, see http://go.microsoft.com/fwlink/?LinkID=247104.

chimon2000 avatar Aug 07 '15 13:08 chimon2000

Unminified version breaks at

Unhandled exception at line 1377, column 7 in ms-appx://io.cordova.myapp35698d/www/bower_components/webcomponentsjs/webcomponents-lite.js

chimon2000 avatar Aug 07 '15 13:08 chimon2000

It looks like we need to wrap our insertNode in MSApp.execUnsafeLocalFunction if it's available.

garlicnation avatar Aug 10 '15 23:08 garlicnation

Thanks for the issue. It has been a great while since this issue was opened. Sadly, this issue misses a live reproduction with the most recent version of the webcomponents polyfill for us to be able to debug and potentially fix. Versions 1 of the polyfills fix a large amount of issues, probably including this one as well.

Please see the CONTRIBUTING.md for guidelines on filing issues. You can start from this jsBin template as a starting point and link it in the issue template under "Live Demo".

Feel free to file a new issue following these instructions if you can still reproduce this issue with versions 1 of the polyfills. Thank you!

TimvdLippe avatar Apr 14 '18 17:04 TimvdLippe