Can I call Uno function or change Uno properties from FuseJS?

Can I call Uno function or change Uno properties from FuseJS?

You need to do a wrapper to expose the function.



public class JSWrapper : NativeModule
    public JSWrapper () {
        AddMember(new NativeFunction("wrapper", (NativeCallback)Wrapper));

    object Wrapper (Context c, object[] args) {


<JSWrapper ux:Global="jsw" />
    var wrap = require('jsw');

You cannot modify properties on objects declared in UX directly from JS. This is because JS runs on a separate thread.

However, you can data-bind properties in UX to Observables in JS, and control them this way. Note that this is not the approprate way to do animation, as communication between JS and UI is not synchronous. Animation should always be done in pure UX markup.

This said, we are working on a new mechanism (not yet released as of 0.9.11) that will allow you to call methods on objects in UX from JS through its script interface. However, this should only be used for one-off commands like .navigateTo(), .play() etc, and not for animating properties.

Maybe it’s just me, but I hate that I have no access to ux elements from code. (other then via Observable) Or I have access to them from class, but then again I have no access to those methods from FuseJS and vice versa.

This narrows down what I can do. Hopefully that 0.9.11 will give more access.