[quickjs-devel] Re: Create a new instance of the class using name

  • From: Alexander Mihalicyn <alexander@xxxxxxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Fri, 24 Jan 2020 16:33:47 +0300

Did you mean `new this['class_name']()` ? When you in "global" context
you could use this as reference to global context. You could create
global variable `var global = this;` and, later, use this variable as
a reference to the global scope. `new global['class_name']();`

On Thu, Jan 23, 2020 at 2:07 PM JM <jeevhi@xxxxxxxxx> wrote:


How to create an instance of a class using the class name (and not the class 
id). I couldn't find any function to achieve this.

Can someone point me to the right function?





Other related posts: