OpenWGA 7.6 - TMLScript reference
Object:
Console
Description |
The console object can be used to log messages to the application log. The console API is a de-facto standard API of JavaScript, found in many JavaScript frameworks to log messages to some debugging output. In TMLScript this is an alternative to using the log object on TMLContext, whose output also goes to the application log, which might be a bit more familiar to JavaScript developers. All message logging methods of this object have in common that they take a message as argument plus a custom number of additional parameters which are to be inserted somewhere into the message. To indicate the position for those parameters the following substitution patterns can be used inside the message:
If more parameters than string substitution patterns are given all of the left parameters are added at the end of the message. |
||||||||||||||||
Retrieval | As predefined object "console" on every TMLScript expression | ||||||||||||||||
Allowed in script types |
|
||||||||||||||||
Properties and methods |
|
||||||||||||||||
Examples |
Writing a message to the application log, injecting the content key of the document in context as parameter: console.log("Document %s was updated", KEY); |