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

Resize handler #200

Merged
merged 2 commits into from
Jan 29, 2013
Merged

Resize handler #200

merged 2 commits into from
Jan 29, 2013

Conversation

kberg
Copy link
Collaborator

@kberg kberg commented Jan 25, 2013

No description provided.

@@ -995,9 +999,14 @@ Dygraph.prototype.destroy = function() {
this.registeredEvents_ = [];

// remove mouse event handlers (This may not be necessary anymore)
Dygraph.removeEvent(this.mouseEventElement_, 'mouseout', this.mouseOutHandler);
Dygraph.removeEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler);
Copy link
Owner

Choose a reason for hiding this comment

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

do you need to add a null check to Dygraph.removeEvent()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so. From mozilla: Prior to Firefox 6, the browser would throw if the useCapture parameter was not explicitly false. Prior to Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6), addEventListener() would throw an exception if the listener parameter was null; now the method returns without error, but without doing anything.

I think addEventListener is a typo, meant removeEventListener. Could break someone, but TBH, the odds of those being null when the object is destroyed are low (oh perhaps with a URL fetch that never returns or something.)

danvk added a commit that referenced this pull request Jan 29, 2013
@danvk danvk merged commit 94efbca into danvk:master Jan 29, 2013
@manufitoussi manufitoussi mentioned this pull request Jan 30, 2013
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

Successfully merging this pull request may close these issues.

4 participants