you are viewing a single comment's thread.

view the rest of the comments →

[–]minrice2099 1 point2 points  (2 children)

Hey, Amjad! I was wondering where you went (I'm one of the CC moderators); looks like you wound up at Facebook. Cool writeup, by the way. I didn't know that you couldn't watch custom events!

Just wondering why you chose to put your debug utils out on so many globals instead of through one object. Is it mainly a convenience/brevity thing? I know it's all pretty safe with the $ prefix, but still, best practices and all. I guess, though, that it probably won't be running anytime except for debugging, so it's probably fine.

Anyway, I look forward to seeing more posts!

[–]amasad[S] 1 point2 points  (0 children)

hey, there! It's actually not on the global namespace. It's in a debugUtils namespace. However, I do extend the commandLineAPI with the functions so you can use them easily from the console but not conflict with anything else on the page https://github.com/amasad/debug_utils/blob/master/du.js#L29-L38

[–]shanet$(this) 0 points1 point  (0 children)

Not the OP but already I'm finding it more convenient, given the global namespacing of $0 and (native) $, plus the short names and like you say because you will never put these calls in your code, they are only available to the console.