HTML5 - JavaScript functions: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Azhrei moved page HTML5 - js functions to HTML5 - JavaScript functions without leaving a redirect)
No edit summary
Line 1: Line 1:
{{Experimental}}
{{Experimental}}
{{HTML5 javascript}}
A special class is available to JavaScript code running inside HTML5 pages. It allows access to a few values and functions.   
A special class is available to JavaScript code running inside HTML5 pages. It allows access to a few values and functions.   



Revision as of 15:48, 24 January 2024

 This article describes a feature or macro function that is experimental and may be subject to change.

Template:HTML5 javascript

A special class is available to JavaScript code running inside HTML5 pages. It allows access to a few values and functions.

The class itself is static and is called MapTool.

Functions

  • getName() - Returns the name of the panel.
  • getKind() - Returns the kind of the panel: frame5() or dialog5().
  • getuserData() - Returns the data passed to the panel via the value option.
  • log() - Anything passed to this method will be sent to the chat window, just like a broadcast() to self.

Additionally, console.log() will be redirected to the chat window as well.