[rs-commit] r16 - /rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5
rs-commit at redwax.eu
rs-commit at redwax.eu
Sun Sep 19 14:31:08 CEST 2021
Author: minfrin at redwax.eu
Date: Sun Sep 19 14:31:08 2021
New Revision: 16
Log:
Emphasise the legacy nature of old code.
Modified:
rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5
Modified: rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5
==============================================================================
--- rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5 (original)
+++ rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5 Sun Sep 19 14:31:08 2021
@@ -29,10 +29,6 @@
The following example form shows how to trigger <code>crypto.signText()</code>
to sign the given text.
</p>
- <p>
- <code>crypto.signText()</code> returns a <code>Promise</code> which, when resolved,
- contains the signed text.
- </p>
<div class="index align-left">
<section>
<header>
@@ -42,6 +38,10 @@
<p>
To request text be signed, submit the form below.
+ </p>
+ <p>
+ <code>crypto.signText()</code> returns a <code>Promise</code> which, when resolved,
+ contains the signed text.
</p>
<form id="createform" method="POST" action="">
@@ -70,7 +70,7 @@
<p>
The original <code>crypto.signText()</code> as implemented by Netscape and then
Firefox returned a <code>string</code> instead of a <code>Promise</code>. The
- following code shows the legacy behaviour.
+ following code shows the legacy behaviour, and should not be used in modern code.
</p>
<form id="createform" method="POST" action="">
@@ -83,7 +83,7 @@
<textarea name="legacysigned" id="result"></textarea>
</p>
<p>
- <button id="submit" type="button" onclick="javascript:return signLegacyRequest(form);">Sign</button>
+ <button id="submit" type="button" onclick="javascript:return signLegacyRequest(form);">Legacy Sign</button>
</p>
</form>
@@ -114,7 +114,7 @@
function signLegacyRequest(form) {
if (crypto.signText) {
- form['signed'].value = crypto.signText(form['tobesigned'].value, 'ask');
+ form['legacysigned'].value = crypto.signText(form['tobelegacysigned'].value, 'ask');
return true;
}
else {
More information about the rs-commit
mailing list