Math.random undefined in compartment
See original GitHub issue> lockdown({ mathTaming: "unsafe" })
true
> Math.random
[Function: random] Function <Function <[Object: null prototype] {}>>
> const comp = new Compartment()
undefined
> comp
Compartment {}
> comp.evaluate("Math.random()")
Thrown:
TypeError <Object <Object <[Object: null prototype] {}>>>: Math.random is not a function
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
javascript - Why does it return undefined values?
Math.random() returns a value in the range of [0,1) (this is interval notation, [ and ] mean that the value is included the...
Read more >Math.random() returns undefined - JavaScript
i have this code to generate a random number, but it returns undefined. anyone knows why it says so? thanks.
Read more >Lots of Ways to Use Math.random() in JavaScript
Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0...
Read more >java.lang.Math.random java code examples
How to generate random SHA1 hash to use as ID in node.js? ; // get distribution ; for (var i=0; i<1000000; i++) {...
Read more >Why is this correct but returning "undefined"?
It should return a new card with a suit // that is a random number from 1 to ... s = Math.floor(Math.random()*4+1); var...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@erights that works!
Agreed. Please review the writing on https://github.com/Agoric/SES-shim/pull/494.