Navigation Menu

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

dart.js : smarter about pointing to precompiled vs regular js file? #13891

Closed
kevmoo opened this issue Oct 8, 2013 · 6 comments
Closed

dart.js : smarter about pointing to precompiled vs regular js file? #13891

kevmoo opened this issue Oct 8, 2013 · 6 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-obsolete Closed as the reported issue is no longer relevant pkg-browser type-enhancement A request for a change that isn't a bug

Comments

@kevmoo
Copy link
Member

kevmoo commented Oct 8, 2013

I'm building a packaged app which needs to use the precompiled js output.

If dart.js was clever enough to detect CSP, it could rewrite the url to point to the precompiled js output, instead of the "normal" compiled output.

Which would save me a lot of hand-editing of HTML.

@iposva-google
Copy link
Contributor

Added Triaged label.

@mkustermann
Copy link
Member

+vsm/blois (you changed pkg/browser/lib/dart.js recently)

Who is the maintainer of this?


cc @blois.
cc @vsmenon.

@peter-ahe-google
Copy link
Contributor

Not entirely sure that "dart.js" falls under area-dart2js.

Also, it seems rather wierd to me that you would deploy both main.dart.js and main.dart.precompiled.js in a packaged app. Perhaps it would be better to change your build script to overwrite main.dart.js with the CSP version.

@kevmoo
Copy link
Member Author

kevmoo commented Oct 13, 2013

This is purely a development scenario.

For a web app, one can 'run as Javascript' and dart.js does the right thing, which is great to quickly validate that dart2js is doing the right thing.

For a packaged app, this does not work at the moment, because dart.js loades the non-CSP-friendly js file.
There are pretty simple tricks one can add to dart.js to allow it to detect inline evaluation. This would make testing the compiled packaged app a lot easier.

@blois
Copy link
Contributor

blois commented Oct 13, 2013

If it's a dev-time workaround for chrome apps then it sounds like it should be a separate file rather than being included in boot.js.

Agree with Peter that it seems that the generated main.dart.js should be compiled in the form that app needs it to be executed. I expect CSP to be enabled via an app or server policy, so at compile time the developer should know whether CSP is expected to be on or off.


Removed Area-Dart2JS label.
Added Area-Pkg label.

@sethladd
Copy link
Contributor

Added Pkg-Browser label.

@kevmoo kevmoo added Type-Enhancement area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. pkg-browser labels Jul 18, 2014
@mit-mit mit-mit added the closed-obsolete Closed as the reported issue is no longer relevant label Sep 3, 2015
@mit-mit mit-mit closed this as completed Sep 3, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-obsolete Closed as the reported issue is no longer relevant pkg-browser type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants