Pass a Function and context to a worker instead of a url