Start a new topic
Solved

How to Export a function on to an external javascript object

In the following class i am try to 'add' and function on to an already existing external

javascript object: but is does net work. Please look at the following:


 [Js(Name="webix.markup", Extern = true)]

 public static class markup

 {

            public static extern dynamic init(HTMLElement node);


            [Js(Name="render", Extern=false, Export=true)]

            public static void render(string html, HTMLElement target)

 {

                target.style.visibility = "hidden";

 target.innerHTML = html;

                Webix.markup.init(target);

                target.style.visibility = "visible";

 }

}



I dont have any documentation, but this attribute seems to imply that we can 'export' a function on to a object:


[Js(Name="render", Extern=false, Export=true)]

public static void render ()

{

....

}




1 Comment

Just a guess, but probably because the class itself is marked as extern it means it won't be creating any js code for that class.... yeah?

Login or Signup to post a comment