You can play around with it a little here, to see that your browser supports it, too. You should even be able to use a relative URL as the
base_url parameter, which should get resolved against the page url -- which here is the jsfiddle url shown, as that demo is running in an embedded iframe, rather than on this blog itself:
It of course won't work in node.js, but hopefully it'll be useful to something you or others are doing, too. Use as you like; it's all public domain / MIT licensed goodness, whichever you fancy.