Worked for me. Wasn't sure if it affects eg deleteCookie but all seems to work and seems safe to merge for 4.0 release.
We will next need to merge this into a different branch in our repo, build the minified JS and add a simple test to
API methods that the method exists and update the documentation. Hoping to do this tomorrow.