mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
Merge pull request #4045 from Calinou/javascript-eval-official-templates
Clarify that the JavaScript singleton is available in official templates
This commit is contained in:
@@ -39,7 +39,8 @@ either ``release`` for a release build or ``release_debug`` for a debug build::
|
||||
scons platform=javascript tools=no target=release_debug
|
||||
|
||||
By default, the :ref:`JavaScript singleton <doc_javascript_eval>` will be built
|
||||
into the engine. Since ``eval()`` calls can be a security concern, the
|
||||
into the engine. Official export templates also have the JavaScript singleton
|
||||
enabled. Since ``eval()`` calls can be a security concern, the
|
||||
``javascript_eval`` option can be used to build without the singleton::
|
||||
|
||||
scons platform=javascript tools=no target=release javascript_eval=no
|
||||
|
||||
@@ -213,9 +213,10 @@ returned by ``eval()`` under certain circumstances:
|
||||
|
||||
Any other JavaScript value is returned as ``null``.
|
||||
|
||||
HTML5 export templates may be built without support for the singleton. With such
|
||||
templates, and on platforms other than HTML5, calling ``JavaScript.eval`` will
|
||||
also return ``null``. The availability of the singleton can be checked with the
|
||||
HTML5 export templates may be :ref:`built <doc_compiling_for_web>` without
|
||||
support for the singleton to improve security. With such templates, and on
|
||||
platforms other than HTML5, calling ``JavaScript.eval`` will also return
|
||||
``null``. The availability of the singleton can be checked with the
|
||||
``JavaScript`` :ref:`feature tag <doc_feature_tags>`::
|
||||
|
||||
func my_func3():
|
||||
|
||||
Reference in New Issue
Block a user