Talk:Canvas Nasal/JavaScript Subset

From FlightGear wiki
Revision as of 22:03, 30 January 2018 by Hooray (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
if(typeof(console) != 'object') {
console = {log: print};
}
else {
compile = eval("new Function('src','return new Function(src);')");
}

var runtime = compile("return (typeof(0)=='scalar')? 'nasal':'javascript';") ();

Wrapper = {

'nasal': {
 setprop: compile(0),
 getprop: compile(1),
 fgcommand: compile(2)
 },

'javascript': {
 }

};


console.log( runtime );