From aa744aee7dac7d421fa0d338e769e3619146512c Mon Sep 17 00:00:00 2001
From: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
Date: Tue, 14 Jan 2020 13:54:31 +0100
Subject: [PATCH] Update documentation to reflect HTML5 limitations.

---
 doc/classes/Crypto.xml                            | 1 +
 doc/classes/CryptoKey.xml                         | 1 +
 doc/classes/HashingContext.xml                    | 1 +
 doc/classes/StreamPeerSSL.xml                     | 1 +
 doc/classes/X509Certificate.xml                   | 1 +
 modules/websocket/doc_classes/WebSocketClient.xml | 4 +++-
 modules/websocket/doc_classes/WebSocketServer.xml | 2 +-
 7 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index bce78959739..bb2c4436183 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -22,6 +22,7 @@
 		    key.save("user://generated.key")
 		    cert.save("user://generated.crt")
 		[/codeblock]
+		[b]Note:[/b] Not available in HTML5 exports.
 	</description>
 	<tutorials>
 	</tutorials>
diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml
index 8c825c9e1c5..8feb7d4809f 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -6,6 +6,7 @@
 	<description>
 		The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource].
 		They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate.
+		[b]Note:[/b] Not available in HTML5 exports.
 	</description>
 	<tutorials>
 	</tutorials>
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index 802b186ef38..8a20eb99b8f 100644
--- a/doc/classes/HashingContext.xml
+++ b/doc/classes/HashingContext.xml
@@ -27,6 +27,7 @@
 		    # Print the result as hex string and array.
 		    printt(res.hex_encode(), Array(res))
 		[/codeblock]
+		[b]Note:[/b] Not available in HTML5 exports.
 	</description>
 	<tutorials>
 	</tutorials>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index b34d8d1b254..eea44ef93d0 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -38,6 +38,7 @@
 			</argument>
 			<description>
 				Connects to a peer using an underlying [StreamPeer] [code]stream[/code]. If [code]validate_certs[/code] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [code]for_hostname[/code].
+				[b]Note:[/b] Specifying a custom [code]valid_certificate[/code] is not supported in HTML5 exports due to browsers restrictions.
 			</description>
 		</method>
 		<method name="disconnect_from_stream">
diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml
index 50e9e4e0d48..5f3e91c4e6a 100644
--- a/doc/classes/X509Certificate.xml
+++ b/doc/classes/X509Certificate.xml
@@ -6,6 +6,7 @@
 	<description>
 		The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource].
 		They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream].
+		[b]Note:[/b] Not available in HTML5 exports.
 	</description>
 	<tutorials>
 	</tutorials>
diff --git a/modules/websocket/doc_classes/WebSocketClient.xml b/modules/websocket/doc_classes/WebSocketClient.xml
index 705e3485f58..52a98d8c320 100644
--- a/modules/websocket/doc_classes/WebSocketClient.xml
+++ b/modules/websocket/doc_classes/WebSocketClient.xml
@@ -27,7 +27,8 @@
 				Connects to the given URL requesting one of the given [code]protocols[/code] as sub-protocol. If the list empty (default), no sub-protocol will be requested.
 				If [code]true[/code] is passed as [code]gd_mp_api[/code], the client will behave like a network peer for the [MultiplayerAPI], connections to non-Godot servers will not work, and [signal data_received] will not be emitted.
 				If [code]false[/code] is passed instead (default), you must call [PacketPeer] functions ([code]put_packet[/code], [code]get_packet[/code], etc.) on the [WebSocketPeer] returned via [code]get_peer(1)[/code] and not on this object directly (e.g. [code]get_peer(1).put_packet(data)[/code]).
-				You can optionally pass a list of [code]custom_headers[/code] to be added to the handshake HTTP request (not supported in HTML5 platform).
+				You can optionally pass a list of [code]custom_headers[/code] to be added to the handshake HTTP request.
+				[b]Note:[/b] Specifying [code]custom_headers[/code] is not supported in HTML5 exports due to browsers restrictions.
 			</description>
 		</method>
 		<method name="disconnect_from_host">
@@ -59,6 +60,7 @@
 	<members>
 		<member name="trusted_ssl_certificate" type="X509Certificate" setter="set_trusted_ssl_certificate" getter="get_trusted_ssl_certificate">
 			If specified, this [X509Certificate] will be the only one accepted when connecting to an SSL host. Any other certificate provided by the server will be regarded as invalid.
+			[b]Note:[/b] Specifying a custom [code]trusted_ssl_certificate[/code] is not supported in HTML5 exports due to browsers restrictions.
 		</member>
 		<member name="verify_ssl" type="bool" setter="set_verify_ssl_enabled" getter="is_verify_ssl_enabled">
 			If [code]true[/code], SSL certificate verification is enabled.
diff --git a/modules/websocket/doc_classes/WebSocketServer.xml b/modules/websocket/doc_classes/WebSocketServer.xml
index 86f2dae64f6..f5fb77f3a18 100644
--- a/modules/websocket/doc_classes/WebSocketServer.xml
+++ b/modules/websocket/doc_classes/WebSocketServer.xml
@@ -6,7 +6,7 @@
 	<description>
 		This class implements a WebSocket server that can also support the high-level multiplayer API.
 		After starting the server ([method listen]), you will need to [method NetworkedMultiplayerPeer.poll] it at regular intervals (e.g. inside [method Node._process]). When clients connect, disconnect, or send data, you will receive the appropriate signal.
-		[b]Note:[/b] This class will not work in HTML5 exports due to browser restrictions.
+		[b]Note:[/b] Not available in HTML5 exports.
 	</description>
 	<tutorials>
 	</tutorials>