Initial
This commit is contained in:
16
web/js/demo-js-interop.js
Normal file
16
web/js/demo-js-interop.js
Normal file
@@ -0,0 +1,16 @@
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
window._stateSet = function () {
|
||||
window._stateSet = function() {
|
||||
console.log("Call _stateSet only once");
|
||||
};
|
||||
let appState = window._appState;
|
||||
|
||||
let btn = document.getElementById('token');
|
||||
btn.addEventListener('click', function() {
|
||||
appState.onTokenReceived('token123');
|
||||
})
|
||||
|
||||
}
|
||||
}());
|
||||
Reference in New Issue
Block a user