Skip to content

Consider removing expose(), call() and kill() ? #26

Description

@ribizli
	worker.expose = methodName => {
		worker[i] = function() {
			return worker.call(methodName, [].slice.call(arguments));
		};
	};

Instead methodName parameter should be used:

	worker.expose = methodName => {
		worker[methodName] = function() {
			return worker.call(methodName, [].slice.call(arguments));
		};
	};

Beside that I don't see why the call and expose methods are accessible from outside. (Don't assign to worker at all)
The purpose of the kill method is also not clear for me.

Metadata

Metadata

Assignees

No one assigned

    标签

    enhancement新建 feature or requesthelp wantedExtra attention is needed

    项目

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions