Here, you are going to learn how to:
You just have to add a wsscript tag inside a wsdiv:
Then, you can use regular JS inside the script tag:
It is possible to access to the div's methods through the element object. The element object refers to the wsdiv (or everything else see the Generalization chapter) which contains the wsscript.
The element object contains all native HTML methods and properties. You can, for example, get the innerHTML or classList properties.
The script runs when the div has been fully loaded.
NOTICE: for some browsers, use the .textContent propertie may generate bugs. To avoid these bugs, use the .changeTextContent(text) method.