commit much of the virtualization support, stubbed out
[moon.git] / plugin / debug.js
blob0731fc150b6c0fde353ce57f0de288e913d6db1e
2 var printf_proxy;
4 function printf (obj, message)
7         //alert ("host: " + host + " host.tostring: " + host.toString () + " host.content: " + host.content + " host.content.tostring: " + host.content.toString ());
8         //return;
9         if (printf_proxy == null) {
10                 var host;
11                 
12                 try {
13                         if (obj == null)
14                                 return;
16                         if (obj.toString () === "Canvas") {
17                                 printf_proxy = obj;
18                         } else {
19                                 host = obj.get_element ();
20                                 printf_proxy = host.content.root;
21                         }
22                 } catch (err) {
23                         alert ("err: " + err + " obj: " + obj + " tostring: " + obj.toString ());
24                         return;
25                 }
26         }
28         printf_proxy.printf (message);