From 63b1a096eb17fd52cd46c36177e5158dce54a60a Mon Sep 17 00:00:00 2001 From: Leon Krause Date: Thu, 16 Nov 2017 01:33:48 +0100 Subject: Facilitate exposing platform-exclusive interfaces to all platforms This makes the interfaces available, without implementation, in other platforms and the editor, which facilitates documenting platform-exclusive classes. Platform-exclusive APIs must be set up in platform//api/api.cpp. Provide noop method-implementations where necessary. Also setup and document the HTML5 platform's JavaScript singleton. --- doc/classes/@GlobalScope.xml | 2 ++ doc/classes/JavaScript.xml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 doc/classes/JavaScript.xml (limited to 'doc/classes') diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 258b06f320..98f2cf1896 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -44,6 +44,8 @@ [JSON] singleton + + [Marshalls] singleton diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml new file mode 100644 index 0000000000..9dd386f08e --- /dev/null +++ b/doc/classes/JavaScript.xml @@ -0,0 +1,30 @@ + + + + Singleton that connects the engine with the browser's JavaScript context in HTML5 export. + + + The JavaScript singleton is implemented only in HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. + + + http://docs.godotengine.org/en/stable/learning/workflow/export/exporting_for_web.html#calling-javascript-from-script + + + + + + + + + + + + + Execute the string [code]code[/code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code]. + If [code]use_global_execution_context[/code] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. + + + + + + -- cgit v1.2.3