Start of WebWorker implementation by deciding between whether file or function.