I have two JS files. First file contains a function obtains some data (particularly, my function gets state of AbstractJavaScriptComponent which is just a String, but I think it's not important). And I want to send this data to another JS file (or make it accessible in that file in any way).
com_company_htmlcontent_web_screens_JsData = function() {
// this value is what I want to send
document.getElementById('myButton').value = this.getState().xhtml();
this.onStateChange = function() {
e.innerHTML = this.getState().xhtml();
alert("on State changed is called"); // but this inner function is not called
}
}
Are there any ways to make it possible?