Skip to content
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

Instrument props defined in window.document itself #6

Open
yuhao opened this issue Apr 29, 2016 · 0 comments
Open

Instrument props defined in window.document itself #6

yuhao opened this issue Apr 29, 2016 · 0 comments

Comments

@yuhao
Copy link
Owner

yuhao commented Apr 29, 2016

Right now, instrumenting a prop defined in window.document itself leads to infinite loop.

This is because we do the following: getterOfProp = Object.getOwnPropertyDescriptor(ownerOfProp, prop).get; and we eventually call originalGetter.apply(window.document);, which leads to an infinite loop.

For now, we just return without instrumenting it. Need to figure out a way to fix it. One workaround maybe to define the instrumented property in document.__proto__

@yuhao yuhao changed the title Instrumenting a prop defined in window.document itself leads to infinite loop Instrument props defined in window.document itself May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant