check with loadWithNewGlobal obj.x 344 obj.y 12 obj instanceof global.Point? true p.x 343 p.y 54 p instanceof P? true check with script engine obj.x 344 obj.y 12 obj instanceof global.Point? true p.x 343 p.y 54 p instanceof P? true