Sample code "convert the binary hash data to a hex string"

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: alice0775, Assigned: arai)

Tracking

Details

(Reporter)

Description

3 years ago
Bug 1220564 was landed, 
I think the sample code should be revised.
https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Creating_reusable_modules
(Assignee)

Comment 2

3 years ago
Feel free to reopen when the change is not sufficient.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Reporter)

Comment 3

3 years ago
Thanks!

Comment 4

3 years ago
The documentation has been updated to:

var s = Array.from(hash, (c, i) => toHexChar(hash.charCodeAt(i))).join("");

But it's wrong, toHexChar() is undefined. The function name is toHexString().
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 5

3 years ago
(In reply to Sören Hentzschel from comment #4)
> The documentation has been updated to:
> 
> var s = Array.from(hash, (c, i) => toHexChar(hash.charCodeAt(i))).join("");
> 
> But it's wrong, toHexChar() is undefined. The function name is toHexString().

Thank you!
Fixed.
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.