Jump to content

Recommended Posts


Posted
32 minutes ago, NotHereToPlayGames said:

I use Tampermonkey.

Is there a "leaner" option which only embeds polyfills?

Posted

I'm finding that having "too many" polyfill injections cause more problems then they solve (breaks Sedecordle, breaks MS Teams, just the first two I've found).

For now, I just keep my list of polyfills disabled by default then enable them when needed as opposed to just injecting them all "just in case" they might be needed.

Technically, I've yet to encounter these on any web site I ever visit.

image.png.294de58e9b92babd81f1c996754dc275.png

Posted
1 hour ago, NotHereToPlayGames said:

(breaks Sedecordle, breaks MS Teams, just the first two I've found)

In both cases, it was only this polyfill that broke the page  --

if (!Array.prototype.findLastIndex) {
  Array.prototype.findLastIndex = function (callback, thisArg) {
    for (let i = this.length - 1; i >= 0; i--) {
      if (callback.call(thisArg, this, i, this)) return i;
    }
    return -1;
  };
}

Posted
6 hours ago, rereser said:

my posts for "Array.prototype.findLastIndex" ,  "Array.prototype.at"  and "Array.prototype.findLast" polyfills have been edited.

Awesome, thanks!

I did miss the edit and also somehow missed the findLast.

I can now keep all enabled without any page breaks.

Posted
6 hours ago, rereser said:

no tests available yet for the latest four very new ones.

I'm opting for this polyfill but do have the four "smaller" ones included-but-disabled in my Tampermonkey set of userscripts.

Won't really know the best option until we can find an example web site or two.

Posted

The 2ality post specifically states "this blog post only demonstrates the new methods with Arrays, but they are also available for Typed Arrays".

Typed Arrays are -
   Int8Array
   Uint8Array
   Uint8ClampedArray
   Int16Array
   Uint16Array
   Int32Array
   Uint32Array
   Float32Array
   Float64Array
   BigInt64Array
   BigUint64Array

This (same link as earlier post) polyfill should work for Arrays and Typed Arrays.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...