This might be something we want to make configurable for users who want
to completely control how errors are displayed.
This also adds the first use of OpenSeadragon.makeCenteredNode currently
so we might want to clean up that code as well.
Setting onreadystatechange can avoid the possibility of it somehow being
called twice but there's no point in nulling the request right before we
let the GC collect it.
* Since async is always true – and browsers are starting to deprecate
synchronous XHR – we were able to prune considerable amount of code
* Add an error callback to match the existing success callback
This code is still under-tested and documented but no longer relies on
`drawLevel` being leaked into the global namespace where `updateLevel`
to find it.
See #145
Previously `request.onreadystatechange` was assigned an empty function
on success but null on failures, which breaks in IE (see
http://jsbin.com/ezozax/6/).
This patch simply mimics the success behaviour in the cleanup function
Closes#143
This is nice but until jshint/jshint#1146 is fixed there's no way to
selectively disable W098 for unused function arguments which we wish to
include for documentary purposes.
With this change there are only three remaining warnings, all of which
are actionable.
This previously wasn't in scope outside of the main OpenSeadragon
closure. Now it's exposed with an underscore prefix to encourage people
not to think of it as a public interface.
Mostly unused function arguments but there were also a fair number
of legacy names which are now no longer used.
One question which comes up – mostly in tilesource.js – is whether
there is any value in leaving unused variables for functions which
are intended to be overridden anyway. I'm inclined to say that the
docs + tests need to be sufficient as there's no enforcement that
whatever is in the base implementation will actually be followed by
any of the real functions.
This also allows us to move our settings to .jshintrc for better IDE &
command-line integration - simply type "jshint" in the directory and it
will use the same options.