Added support for cross origin requests for Javascript