Add isSameDomain method.