Function("}),print('test'),({") should throw SyntaxError

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b94
    • generic
    • generic
    • Verified

      Function constructor should make sure that the passed arguments confirm to argument name syntax and function body syntax. If not, SyntaxError should result.

        Function("}),print('test'),({")

      should result in SyntaxError.

            Assignee:
            Sundararajan Athijegannathan
            Reporter:
            Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: