hinclude
hinclude copied to clipboard
Add BeforeRequestCallback and public getter/setter for ClassPrefix/BeforeRequestCallback
Add feature BeforeRequestCallback
Add public getter/setter for properties
- ClassPrefix
- BeforeRequestCallback
Offers the possibility to change the classprefix and modify the XHR request, e.g.:
hinclude.setClassPrefix('hinclude-http-error hinlcude-http-');
hinclude.setBeforeRequestCallback(function(req, url) {
req.setRequestHeader("X-Requested-With", "XMLHttpRequest");
req.setRequestHeader("X-Request-Source", "HTMLInclude");
});
If you rebase and add some tests (see the tests directory), I'll take the pull request. Sorry for the delay -- wanted to get the test infrastructure in place.
/ping @yberkholz
This would solve #24 too: With this PR everybody could decide themself, if they send this with or without X-Request-With
(as mentioned in this comment).
Up ?