Make cross-site getTranslatorObject() work

This commit is contained in:
Simon Kornblith 2012-03-05 23:47:42 -05:00
parent 2facd4fcbd
commit d256caf94e

View file

@ -1425,13 +1425,10 @@ Zotero.Translate.Web.prototype._getTranslatorsGetPotentialTranslators = function
* Bind sandbox to document being translated
*/
Zotero.Translate.Web.prototype._getSandboxLocation = function() {
if("defaultView" in this.document) {
var defaultView = this.document.defaultView;
if("__wrappedDOMObject" in defaultView) {
return defaultView.__wrappedDOMObject;
} else {
return defaultView;
}
if(this._parentTranslator) {
return this._parentTranslator._sandboxLocation;
} else if("defaultView" in this.document) {
return this.document.defaultView;
} else {
return this.document.location.toString();
}