fune/dom/html/test/formSubmission_chrome.js
Victor Porof 0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35951

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00

17 lines
366 B
JavaScript

Cu.importGlobalProperties(["File"]);
addMessageListener("files.open", function(message) {
let list = [];
let promises = [];
for (let path of message) {
promises.push(
File.createFromFileName(path).then(file => {
list.push(file);
})
);
}
Promise.all(promises).then(() => {
sendAsyncMessage("files.opened", list);
});
});