Pin playground to v1.7.28 and add polyfill for mutation events#1159
Pin playground to v1.7.28 and add polyfill for mutation events#1159
Conversation
gao-artur
left a comment
There was a problem hiding this comment.
I don't really understand what you did here but OK 🙂
|
@gao-artur I updated the PR description to more fully explain the changes. |
|
@Shane32 I think this PR broke the autocomplete in the Playground. |
|
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. |
|
I'm fine with that. We will probably stop using it soon. |
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: