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

GAME.removeChild(rock) VS rock.remove() #24

Open
ecssiah opened this issue Apr 7, 2018 · 0 comments
Open

GAME.removeChild(rock) VS rock.remove() #24

ecssiah opened this issue Apr 7, 2018 · 0 comments

Comments

@ecssiah
Copy link

ecssiah commented Apr 7, 2018

It might be worth offering a slight hint to remove the rocks by using their remove() method rather than using the removeChild method on the GAME element.

Using removeChild led to a REALLY confusing bug that caused me to spend 99% of my time getting the endGame() test to pass ; )

I'm thinking that's because the remove() method gets rid of all the bound events to the element, and removeChild does not. There is still a number of suggestions around the internet to avoid remove(), because it isn't well supported.

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

No branches or pull requests

2 participants
@ecssiah and others