Added xdomain support