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

add dispose method #96

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add dispose method #96

wants to merge 2 commits into from

Conversation

trusktr
Copy link

@trusktr trusktr commented Mar 25, 2019

No description provided.

dispose: function () {

container.removeEventListener( 'click', clickHandler );
container.remove();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need container.remove();? Or should we leave that part to the user?

@trusktr
Copy link
Author

trusktr commented Mar 25, 2019

Maybe we don't need this at all, if it is true that the handler will be cleaned up if the app is free of references to he dom element.

Apparently old browsers like IE8 had issues, but Three.js is IE11 and up right?

@trusktr
Copy link
Author

trusktr commented Mar 25, 2019

Well, it doesn't hurt to perform this dispose, just to be sure.

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