Linking and scripting gadgets : Scripting linked gadgets : Writing to JavaScript console

Writing to JavaScript console

A developer using a JavaScript console for debugging that supports the toSource method, can customize a linked event with:

console.log(data.toSource());

This code writes the data exchanged between gadgets to the JavaScript console of the web browser used by the developer. JavaScript gives different results depending on the web browser it is used in. For example the toSource() method works in Firefox but not in the Internet Explorer or Safari web browser.

 


(c) Copyright Actuate Corporation 2011