stylus/content/util.js
2017-11-01 11:15:11 +08:00

11 lines
229 B
JavaScript

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