зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1015380 - Fix up UITour.jsm. r=gijs
This commit is contained in:
Родитель
19e1b6250d
Коммит
ecac8f5e13
|
@ -635,17 +635,9 @@ this.UITour = {
|
|||
},
|
||||
|
||||
sendPageCallback: function(aDocument, aCallbackID, aData = {}) {
|
||||
let detail = Cu.createObjectIn(aDocument.defaultView);
|
||||
detail.data = Cu.createObjectIn(detail);
|
||||
|
||||
for (let key of Object.keys(aData))
|
||||
detail.data[key] = aData[key];
|
||||
|
||||
Cu.makeObjectPropsNormal(detail.data);
|
||||
Cu.makeObjectPropsNormal(detail);
|
||||
|
||||
detail.callbackID = aCallbackID;
|
||||
|
||||
let detail = {data: aData, callbackID: aCallbackID};
|
||||
detail = Cu.cloneInto(detail, aDocument.defaultView);
|
||||
let event = new aDocument.defaultView.CustomEvent("mozUITourResponse", {
|
||||
bubbles: true,
|
||||
detail: detail
|
||||
|
|
Загрузка…
Ссылка в новой задаче