Skip to content

How to use methods in worker ? #27

Description

@hamelraj89

i have methods like this

methods: {
    workerJob(){
        var count = 0;
        for (var i = 0; i < 5; i++) {
            count ++;
        }
   }
}

How can i call workerJob() using vue-worker ? below code is giving error Uncaught ReferenceError: _this is not defined

this.$worker.run(this.workerJob());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions