Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome Packaged App: including the UI elements is not convenient #248

Closed
dinhvh opened this issue Aug 21, 2013 · 6 comments
Closed

Chrome Packaged App: including the UI elements is not convenient #248

dinhvh opened this issue Aug 21, 2013 · 6 comments
Assignees

Comments

@dinhvh
Copy link

dinhvh commented Aug 21, 2013

For now, I have to use vulcanizer and copy-paste the content of build.html in the every views (HTML files) using some polymer elements.

By using vulcanizer, I need to alter the source files of my application.

Also, I need to use the minified version of Polymer JS polyfill: polymer.min.js

It's probably blocked by the lack of support of native HTML import in Chrome.

@dinhvh
Copy link
Author

dinhvh commented Aug 21, 2013

Is there a bug on Chromium related to it?

@dfreedm
Copy link
Member

dfreedm commented Aug 21, 2013

@dfreedm
Copy link
Member

dfreedm commented Aug 21, 2013

I'm still confused by "I need to alter the source files of my application". When vulcanizer is run, it makes a modified index.html, index-vulcanized.html, that should be completely ready to go. This output file has one import (necessary for a few ShadowDOM CSS runtime fixups), and one JS file when run with the --csp flag.

There should be no reason to modify the source files.

@dinhvh
Copy link
Author

dinhvh commented Aug 21, 2013

Basic HTML import is not working because of the bug you mentionned.
Therefore, the output HTML file that includes the polymer elements cannot be itself imported in the HTML files that require them.
Does it make sense?

@dfreedm
Copy link
Member

dfreedm commented Aug 21, 2013

Polymer implements a polyfill of HTMLImports, so it does not matter that native HTML Imports are not yet available.
The only reason vulcanizer is needed is because the polyfill of HTMLImports has to create new scripts, which is forbidden by CSP.

Vulcanizer takes the scripts that would have been in the imports and makes a separate script file. What's left in the vulcanized import is only HTML and CSS, with no CSP problems.

@dinhvh
Copy link
Author

dinhvh commented Aug 21, 2013

Ok. Clarified. I was not sure if the polyfill worked with the CSP restrictions.
It shows no error in the console for now.
I'll check later when #249 will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants