Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This lesson explains features of the element and gives an example of using JS for Web Share API in the app.


Use cases:

You can use JS code to interact/change/modify/update all of platform’s entities, like screen elements, like data points. Use it to achieve ANY result needed for your application. 

...

  • calling Web APIs, for direct access to hardware
  • embedding games or special visual behaviour
  • connecting any JS libraries, for example for charts
  • etc 





How to Use Custom JS/HTML


ADD IT TO THE SCREEN


The HTML or JavaScript Element is marked RED, and code inputs, marked ORANGE, located in Properties of the element Custom JS/HTML. 

...

Code Block
languagejs
themeMidnight
MBST = {

platform: (string) 'ios|android',

ht: function (path[, value]),

watch: function (path, callback),

addActionListener: function(name, callback),

component: function (name),

action: function ([index], [actionsList])

}





FULL LIST OF MBST ACCESS FUNCTIONS


Again, at the constructor you use notation #Variable:test#, but in JS: MBST.ht("Variable:test")

...