Skip to content

Check if the window.performance should be used in a duck-typy way #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

getkey
Copy link

@getkey getkey commented Dec 31, 2017

In my Rollup setup, there is a fake global object that is a reference to window, which means that the polyfill (meant for Node.js) will be used instead of window.performance.
I'd rather check if window exists and has a performance() method, and then only use the polyfill if it's not the case.

In my Rollup setup, there is a fake `global` object that is a reference to `window`, which means that the polyfill (meant for Node.js) will be used instead of `window.performance`.
I'd rather check if `window` exists and has a `performance()` method, and then only use the polyfill if it's not the case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant