mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 959230 - Use DOMWindowCreated events to add payments listeners. r=mfinkle
This commit is contained in:
parent
6ff8e54700
commit
90f61b9356
@ -133,7 +133,7 @@ PaymentUI.prototype = {
|
||||
let tab = content.BrowserApp.addTab(aPaymentFlowInfo.uri + aPaymentFlowInfo.jwt);
|
||||
|
||||
// Inject paymentSuccess and paymentFailed methods into the document after its loaded.
|
||||
tab.browser.addEventListener("DOMContentLoaded", function loadPaymentShim() {
|
||||
tab.browser.addEventListener("DOMWindowCreated", function loadPaymentShim() {
|
||||
let frame = tab.browser.contentDocument.defaultView;
|
||||
try {
|
||||
frame.wrappedJSObject.mozPaymentProvider = {
|
||||
@ -172,7 +172,7 @@ PaymentUI.prototype = {
|
||||
} catch (e) {
|
||||
_error(aRequestId, "ERROR_ADDING_METHODS");
|
||||
} finally {
|
||||
tab.browser.removeEventListener("DOMContentLoaded", loadPaymentShim);
|
||||
tab.browser.removeEventListener("DOMWindowCreated", loadPaymentShim);
|
||||
}
|
||||
}, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user