Skip to content

allow calls to new Function(); - but not to the actual constructed function. under csp unsafe-eval. #229

@graingert

Description

@graingert

This will allow introspecting language support, eg ES2015 etc.

eg:

function isConstSupported() {
  try {
    new Function('const foo = 3');
    return true;
  catch (e) {
    return false;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs concrete proposalMoving the issue forward requires someone to figure out a detailed plan

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions