1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add JavaScriptBridge buffer methods

This commit is contained in:
Adam Scott
2024-08-29 09:50:18 -04:00
parent 99a7a9ccd6
commit a9b934b657
5 changed files with 81 additions and 0 deletions

View File

@@ -60,6 +60,20 @@
Returns an interface to a JavaScript object that can be used by scripts. The [param interface] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage.
</description>
</method>
<method name="is_js_buffer">
<return type="bool" />
<param index="0" name="javascript_object" type="JavaScriptObject" />
<description>
Returns [code]true[/code] if the given [param javascript_object] is of type [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer][code]ArrayBuffer[/code][/url], [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView][code]DataView[/code][/url], or one of the many [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray]typed array objects[/url].
</description>
</method>
<method name="js_buffer_to_packed_byte_array">
<return type="PackedByteArray" />
<param index="0" name="javascript_buffer" type="JavaScriptObject" />
<description>
Returns a copy of [param javascript_buffer]'s contents as a [PackedByteArray]. See also [method is_js_buffer].
</description>
</method>
<method name="pwa_needs_update" qualifiers="const">
<return type="bool" />
<description>