How to use iMonkey in an iOS app

iMonkey looks like an interesting way of embedding a JS runtime in an iOS app, but I can’t find any examples on how to actually run some JS code. I can build/link the lib, include the jsapi.h header (from the src directory), but it trips over various linker errors (‘undefined symbol for architecture…’) when I try … Read more

AJAX response error: net::ERR_EMPTY_RESPONSE

The response you’re getting is actually correct. Per the docs, Firebase returns a 200 status code and an empty response. net::ERR_EMPTY_RESPONSE is exactly that. What you should do is check for both null and a 200 status code in the response; if true, you can safely assume that the post was deleted. My personal opinion is that Firebase should really consider returning something more … Read more

Should I use JSLint or JSHint JavaScript validation?

[EDIT]This answer has been edited. I’m leaving the original answer below for context (otherwise the comments wouldn’t make sense). When this question was originally asked, JSLint was the main linting tool for JavaScript. JSHint was a new fork of JSLint, but had not yet diverged much from the original. Since then, JSLint has remained pretty … Read more

Why is window.showModalDialog deprecated? What to use instead?

Why is window.showModalDialog deprecated? From http://tjvantoll.com/2012/05/02/showmodaldialog-what-it-is-and-why-you-should-never-use-it/, In general the idea of putting a native dialog implementation into the browser was a really good idea, but window.showModalDialog was a bad implementation that is riddled with issues and poor browser support. (…) Note that (…) [a modal dialog using showModalDialog] is a full HTML document, not a snippet that is injected … Read more

Completely disable scrolling of webpage

Presuming the simplified HTML code is: Set both body, html to height:100%; Put a div inside body, and set it to stretch across all the body height: This will prevent window from scrolling in weird ways, like, pressing mouse wheel and moving it, using anchors, etc. To remove the scroll bar itself (visually), you should … Read more