Skip to content

new operator support in js library #207

@kateinoigakukun

Description

@kateinoigakukun

Discussed in #165

Originally posted by scally February 14, 2023
How do you call new on Javascript objects? I haven't found a workaround yet that will let me do this. I can call the object constructor but it will then tell me that I need to call the new operator:

for example:

observer = JS.global.MutationObserver do
  puts 'here'
end

results in

TypeError: Constructor requires 'new' operator (JS::Error)
```</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions