Skip to content

Commit 178337f

Browse files
committed
Add hack for supporting help in Firefox
The Firefox console includes a function aliases as `help`. This alias is read-only, and, thus, the REPL `help()` function is not available. As a workaround, we need to use another alias. The least painful solution seemed to be adding an underscore prefix, even though is not optimal. Browsers. *sigh*
1 parent ec700f3 commit 178337f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/repl/scripts/browser.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ function main() {
7272

7373
// Create an object tree from value aliases...
7474
tmp = {
75-
'help': help
75+
'help': help,
76+
'_help': help // Firefox devtools already aliases `help` (and `?`) to a read-only value :(
7677
};
7778
paths = [];
7879
for ( i = 0; i < NAMESPACE.length; i++ ) {

0 commit comments

Comments
 (0)