Skip to content

question: can't return anything other than primitives? #6

@tennox

Description

@tennox

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 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions