using the global Promise in a function will imply that Promise might change over time, affecting the locator implementation. That's why Promise should be a local variable to hold a reference to the Promise implementation (polyfill or native), this is important for them to control the promise polyfill from outside, and after that replace the global.Promise again without affecting locator.