diff options
Diffstat (limited to 'kjsembed/tests/plugin.js')
-rw-r--r-- | kjsembed/tests/plugin.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/kjsembed/tests/plugin.js b/kjsembed/tests/plugin.js new file mode 100644 index 00000000..04d91a4f --- /dev/null +++ b/kjsembed/tests/plugin.js @@ -0,0 +1,40 @@ + +var plugins = Factory.listBindingPlugins(); +println("Currently Usable Plugins:"); +for ( var idx = 0; idx < plugins.length; ++idx) + println(plugins[idx]); + +try { +var invalid1 = new NotReallyThere(this); +} +catch(ex) { +println('Exception: '+ex); +} + +var foo1 = new MyCustomObject(this); +var foo2 = new MyCustomObject(this); + +foo1.setThing("Test"); + +println( foo1.On ); +println( foo1.Off ); + +foo2.setMode(foo2.On); +foo2.setThing(foo2.thing()); + +if( foo2.mode() == foo1.On ) +{ + var foo3 = foo2; + println("Foo3 thing " + foo3.thing()); + +} + +var foo4 = new MyCustomQObject(this); + +foo4.mode = foo4.On; +foo4.thing = "Test"; + +if( foo4.mode ) +{ + println( foo4.thing ); +} |