Added support for xmlhttprequest