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

Pin playground to v1.7.28 and add polyfill for mutation events #1159

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

Shane32
Copy link
Member

@Shane32 Shane32 commented Oct 23, 2024

Apparently 'mutation events' like DOMNodeRemoved were removed from Chrome this past July. Meanwhile, Playground hasn't had an update in years. This PR adds a polyfill for the removed functionality so that the obsolete Playground UI will continue to function.

In addition, I added subresource integrity hashes to the scripts. This is to prevent users from becoming susceptible to hackers if the CDN is compromised, such as occurred recently in this news article:

Browsers will reject the script if it doesn't match the SHA-384 hash embedded in our html page, preventing compromise of their server.

Since all scripts now have their content checked to match a predetermined hash, the exact version of the npm package was added to the links. Otherwise, if a newer version is released, Playground would not load since the hash would not match.

Closes:

See:

@Shane32 Shane32 added this to the 8.1.0 milestone Oct 23, 2024
@Shane32 Shane32 requested a review from gao-artur October 23, 2024 14:30
@Shane32 Shane32 self-assigned this Oct 23, 2024
Copy link
Contributor

@gao-artur gao-artur left a comment

Choose a reason for hiding this comment

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

I don't really understand what you did here but OK 🙂

@Shane32 Shane32 merged commit 22601b4 into master Oct 23, 2024
11 checks passed
@Shane32 Shane32 deleted the playground_patch branch October 23, 2024 14:46
@Shane32
Copy link
Member Author

Shane32 commented Oct 23, 2024

@gao-artur I updated the PR description to more fully explain the changes.

@gao-artur
Copy link
Contributor

@Shane32 I think this PR broke the autocomplete in the Playground.

@Shane32
Copy link
Member Author

Shane32 commented Nov 17, 2024

Well, it's not working properly now, but I must say, I think it was working even worse without this PR. What do you propose? Playground isn't supported and hasn't had a release in 5 years. I'm not really interesting in investing time figuring out how to patch the javascript code. My best suggestion is to mark all members as obsolete and release one final version, after which we remove the package from the solution. I had hoped that by introducing the polyfill, it would start working properly again. But it does not appear to have solved all the problems.

@gao-artur
Copy link
Contributor

I'm fine with that. We will probably stop using it soon.

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.

2 participants