Closed DenisNedvigok closed 7 years ago
Yes, the way that JS works requires to select elements in Micro Apps in a special way, by using the $("button", elem)
selector.
More infos on the following page under the JavaScript section: https://objecthub.io/docs#/Micro_App
We can't really think of another way to restrict JS from only accessing a part of the DOM. Is there another option?
Closing this issue now!
When you use document.querySelector with one item on the HTML markup in MicroApp (f.e. document.querySelector(‘button’)) chances are that you get some object that is not within your HTML markup.
Please refer example below: HTML markup:
JavaScript:
Console will show the button not from the HTML markup in HTML tab, but some other button from the DOM.