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

Added setter to observed properties #57

Closed

Conversation

kevinfarrugia
Copy link
Contributor

Fixes #54

Copy link
Member

@rviscomi rviscomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you take a look at the merge conflict?

Comment on lines 176 to 177
set: () => {
return original;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an application attempts to overwrite one of these properties, would this prevent it from working, since it's not actually setting the new value?

Worth testing if this works:

Suggested change
set: () => {
return original;
set: (new) => {
original = new;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above gives a number of issues (undefined or null), while my proposed solution removes any setters which are added through the app's code. So neither is a good solution as yet. I will try investigate the null/undefined to understand what's going on .

In the meantime I tried to rewrite it using a proxy but we are unable to proxy all objects. For example, it is not allowing me to proxy window.navigator.

@kevinfarrugia kevinfarrugia marked this pull request as draft November 4, 2022 11:30
@kevinfarrugia
Copy link
Contributor Author

I will close this and re-open when I have a working & tested version. I am not confident that the proposed solution works.

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.

Re-enable the observer custom metric
2 participants