Replace alert() with this.log(). #6

Merged
merged 1 commit into from Mar 17, 2013

Conversation

Projects
None yet
2 participants
Contributor

ctbarna commented Sep 7, 2012

I have an event on an input triggered on keyup to initialize a Tabletop object. When the input is deleted, Tabletop pops up it's alert. While alert is fine for local debugging, I don't think it should be used in a deployment.

Owner

jsoma commented Sep 8, 2012

Hrm, what's your use case for initializing an empty Tabletop object? I personally like to err on the side of making it plenty hard for people to do things wrong, which is why I prefer an alert to a log. I'm open to changing it if a keyless object has something going for it, though.

Contributor

ctbarna commented Sep 9, 2012

So I'm having users input a URL or key and currently have an event triggered by the input on "change" that creates a new Tabletop object. Admittedly, I can just wrap the object in an if statement checking for an empty string but I have a pretty serious aversion to alert() in production code. In practice, we'd never want the user to have to see it, even if they do something wrong. Totally your preference though.

jsoma added a commit that referenced this pull request Mar 17, 2013

Merge pull request #6 from ctbarna/master
Replace alert() with this.log().

@jsoma jsoma merged commit 692226a into jsoma:master Mar 17, 2013

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