Problem/Motivation
A polyfill for Array.includes() is needed for Internet Explorer 11 and Opera Mini.
This is one of the three polyfills from #3076171: Provide a new library to replace jQuery UI autocomplete and we are now addressing each in their own issue.
Note: While it is currently a nice-to-have, it will be necessary for the new Autocomplete issue #3076171: Provide a new library to replace jQuery UI autocomplete to land as it includes a library that uses a non-polyfilled Array.includes. It's also a nice way to phase out the indexOf hack, which won't be necessary in Drupal 10 since IE11 won't be supported.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | includes_in_both.mp4 | 1.39 MB | hooroomoo |
| #5 | array_includes_usage.mp4 | 5.28 MB | hooroomoo |
Issue fork drupal-3239500
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hooroomooComment #4
hooroomooComment #5
hooroomooUsage of polyfill with messages feature in Olivero
Comment #6
hooroomooComment #7
bnjmnmThis needs a change record and two small bits of feedback addressed, but otherwise looking good!
Comment #8
hooroomooUpdated with 2 usages of polyfill in messages feature in Olivero
Comment #9
hooroomooAdded change record
Comment #10
hooroomooComment #11
bnjmnm#5 includes an example of the polyfill working, the CR and add-to-somehwere (Olivero) implementation look good, and it follows the familiar pattern of polyfills based on MDN snippets added to core.
Comment #12
lauriiiComment #13
bnjmnmComment #14
bnjmnmBringing back the RTBC first applied in #11, but addressing @lauriii's feedback from the MR:
The @see link now points to a polyfill that matches the one in use - the only differences are changes to pass eslint that have no functionality differences. The polyfill itself continues to be the one that was manually reviewed in this issue, and still looks like it works well.
Comment #17
catchCommitted/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!
I'm leaving this in 9.4.x for now, but if we wanted to get autocomplete into 9.3.x as experimental I think we could backport these then.
Comment #19
quietone commentedPublished change record.