shadowrealm-api
shadowrealm-api copied to clipboard
question: can't return anything other than primitives?
Testing this (seemingly awesome) polyfill (aside: how secure is it?) - thanks!
But it seems to me I cannot return/export anything except primitives (or a function that returns primitives):
const test = { a: 1 }
export { test }
realm.importValue('/script.js', 'test')
=> Cross-Realm Error: TypeError: need primitive or callable, got [object Object]
This seems to be related to #4 - but I thought this might actually be according to spec (?!), so I created a separate issue :thinking: