mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 888486 - Use the remote protocol to copy innerHTML/outerHTML. r=paul
This commit is contained in:
parent
a89f2feefe
commit
4829fb0b64
@ -635,10 +635,7 @@ InspectorPanel.prototype = {
|
||||
if (!this.selection.isNode()) {
|
||||
return;
|
||||
}
|
||||
let toCopy = this.selection.node.innerHTML;
|
||||
if (toCopy) {
|
||||
clipboardHelper.copyString(toCopy);
|
||||
}
|
||||
this._copyLongStr(this.walker.innerHTML(this.selection.nodeFront));
|
||||
},
|
||||
|
||||
/**
|
||||
@ -649,10 +646,17 @@ InspectorPanel.prototype = {
|
||||
if (!this.selection.isNode()) {
|
||||
return;
|
||||
}
|
||||
let toCopy = this.selection.node.outerHTML;
|
||||
if (toCopy) {
|
||||
clipboardHelper.copyString(toCopy);
|
||||
}
|
||||
|
||||
this._copyLongStr(this.walker.outerHTML(this.selection.nodeFront));
|
||||
},
|
||||
|
||||
_copyLongStr: function(promise) {
|
||||
return promise.then(longstr => {
|
||||
return longstr.string().then(toCopy => {
|
||||
longstr.release().then(null, console.error);
|
||||
clipboardHelper.copyString(toCopy);
|
||||
});
|
||||
}).then(null, console.error);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user