Browse Source

Qt provider

cl-refactor
obscuren 10 years ago
parent
commit
76b20be2ea
  1. 15
      qt.js

15
qt.js

@ -0,0 +1,15 @@
(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;
}
})();
Loading…
Cancel
Save