stylus/content/util.js
2017-11-09 05:35:45 +08:00

11 lines
219 B
JavaScript

'use strict';
function runtimeSend(request) {
return new Promise((resolve, reject) => {
chrome.runtime.sendMessage(
request,
({success, result}) => (success ? resolve : reject)(result)
);
});
}