bsc/qt.js

16 lines
449 B
JavaScript
Raw Normal View History

2014-10-21 01:26:34 +03:00
(function() {
var QtProvider = function() {};
QtProvider.prototype.send = function(payload) {
navigator.qt.postData(JSON.stringify(payload));
};
Object.defineProperty(QtProvider.prototype, "onmessage", {
set: function(handler) {
navigator.qt.onmessage = handler;
},
});
if(typeof(web3) !== "undefined" && web3.providers !== undefined) {
web3.QtProvider = QtProvider;
}
})();