JavaScript

Explain the ShadowRealms API

Hard
3
Added
Sandboxed environments for running untrusted code (Stage 3).

Solution Code

JavaScript
const realm = new ShadowRealm();
const result = realm.evaluate('1 + 2');
Explanation
Isolated globals and module systems. Safer than eval()/Function.

Guided Hints

Cross-realm communication
Polyfill possibilities