BrowserWorks / Waterfox-Classic

The Waterfox Classic repository, for legacy systems and customisation.
https://classic.waterfox.net
Mozilla Public License 2.0
176 stars 33 forks source link

[Bug] "replaceChildren is not a function" | Please add DOM ParentNode#ReplaceChildren from either linked polyfill, backport Waterfox Current commit, or equivalent #14

Open CeruleanSky opened 2 years ago

CeruleanSky commented 2 years ago

Several websites use the ParentNode#Replace feature when filtering items while typing, including this website, GitHub itself

To Reproduce Steps to reproduce the behavior:

  1. Go to https://github.com/hawkeye116477/Waterfox-Classic/find/classic
  2. Type in a file you'd like to go to
  3. Notice this.replaceChildren is not a function in the console

Expected behavior Files to pop up

Screenshots (click to expand) ![image](https://user-images.githubusercontent.com/2829875/140657822-60878a65-7745-43ac-86cf-9210a4f5e954.png) ![image](https://user-images.githubusercontent.com/2829875/140657911-a8dc2e84-fb6c-42ba-9fd4-2b2a018b8a1b.png)

Desktop: Waterfox Classic 2021.10 any OS

Additional context Waterfox Commit implementing this feature https://github.com/WaterfoxCo/Waterfox/commit/3cb405965c7e6cfa9864f242da40e328f2be89d4

Polyfill: https://github.com/XboxYan/dom-polyfill

Alt Polyfill: https://github.com/yuzhe-han/ParentNode-replaceChildren

walmar commented 2 years ago

The following configuration is able to work around the GitHub repository Go to file finder issue.

This NoScript Classic Firefox extension Script Surrogate creates a surrogate for the missing Element.replaceChildren() method before the HTML parsing starts: