use self because it works in web workers as well as normal windows
update the tests to use `self`
1.0.0