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

Canvas not being put into page when running compiled .dart.js file #33

Open
TheIceMageX50 opened this issue Apr 7, 2015 · 0 comments
Open

Comments

@TheIceMageX50
Copy link

I recently decided to test trying to run the dart.js output of my project by setting up a site via Github pages. Unfortunately I get this error in the browser console and the canvas I try to insert via code is not there

Uncaught TypeError: Cannot read property 'append$1' of null

My site for it is here so if you open devtools in Chrome for example you can see a stack trace, with source-maps. Sadly I think I may have accidentally borked something with the source map because the links in the dev tools don't quite seem to link to what they say they do in some cases but it's still fairly ok.

I was trying to debug this issue with a friend and they mentioned that one slight issue in the Phaser code here as well is the Game constructor's param parent is typed String but really the code within accepts String or Element or something like that, so that's a little misleading.
Oh and another thing, when I use Points in my code I get a warning in DartEditor about how phaser.dart (lib file) implicitly hides Point from math package. So I think your library file import of dart:math should read like import 'dart:math' hide Point; It may not be an issue in my case with what I've been doing but to quote my friend when we were talking about my issue....if you don't hide things like so "Dart has to guess what you mean and may guess wrong".

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

1 participant