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
DeferredLibrary loading not working in dart2js output #9483
Comments
This comment was originally written by @chrisbu To confirm, I've also just tried this with r20602 and it has the same issue. |
Set owner to @peter-ahe-google. |
Added this to the Later milestone. |
This comment was originally written by @sethladd Should we update the API docs in the meantime? I just ran into this issue, too. |
I don't understand what the hold up is with issue #8455. I'd rather try to submit my suggested diff than update the docs. |
Added TriageForM5 label. |
Removed TriageForM5 label. |
Marked this as blocking #3940. |
Should we reassign? |
Set owner to @sigurdm. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
Added AssumedStale label. |
This issue was originally filed by @chrisbu
What steps will reproduce the problem?
Specifically, my code looks like:
import 'dart:html';
import 'dart:async';
@lazy
import 'dialog_library.dart' as dialog;
const lazy = const DeferredLibrary('dialog_library');
void main() {
query("#clickme").onClick.listen(() {
lazy.load().then(() => dialog.showOkCancelBox("I am a message box"));
});
}
What is the expected output? What do you see instead?
Expect the part.js file to be loaded. A request for this is happening, but it's trying to load it from web/packages/browser rather than from /web. See the attached screenshot - interestingly, this seems to result in a cancelled request (rather than 404).
Secondly, if I try this in firefox (19.0.2) - it causes firefox to crash!
What version of the product are you using? On what operating system?
Win 64, editor+sdk: r20444, Chrome 26, Firefox 19.
Attachment:
deferredloading.png (75.90 KB)
The text was updated successfully, but these errors were encountered: