mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-20 01:11:07 +00:00
LibWeb: Expose crypto
object to workers
This change moves the `crypto()` getter from `Window` to `WorkerOrWindowGlobalScope`. This aligns our implementation with the WebCrypto specification.
This commit is contained in:
parent
d6a31d80c0
commit
89b6cd3fb1
Notes:
github-actions[bot]
2024-09-18 08:09:56 +00:00
Author: https://github.com/tcl3
Commit: 89b6cd3fb1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1419
9 changed files with 33 additions and 19 deletions
10
Tests/LibWeb/Text/input/Worker/Worker-crypto.html
Normal file
10
Tests/LibWeb/Text/input/Worker/Worker-crypto.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(done => {
|
||||
let work = new Worker("worker-crypto.js");
|
||||
work.onmessage = (evt) => {
|
||||
println(`Type of self.crypto: ${evt.data}`);
|
||||
done();
|
||||
};
|
||||
});
|
||||
</script>
|
1
Tests/LibWeb/Text/input/Worker/worker-crypto.js
Normal file
1
Tests/LibWeb/Text/input/Worker/worker-crypto.js
Normal file
|
@ -0,0 +1 @@
|
|||
postMessage(self.crypto.toString());
|
Loading…
Add table
Add a link
Reference in a new issue