Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #47069, comment 74


Ignore:
Timestamp:
12/10/2019 08:30:39 PM (5 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47069, comment 74

    v1 v2  
    44Yeah, it's either that or perhaps wrapping the whole thing in a `try {} catch () {}`. Checking node existence seems cleaner, perhaps? :)
    55
    6 Also not really sure about the `Element.prototype.matches()` polyfill: https://developer.mozilla.org/en-US/docs/Web/API/Element/matches. It's not a bad idea, but might bring some compatibility issues eventually? Need to keep in mind that this will run on the front-end for logged-in users. Generally the browsers they use should conform to the minimal browser support for wp-admin (IE11, newer Edge, Chromium and Firefox) but having some "error silencing" for old browsers (to emulate jQuery behaviour) may be a good idea.
     6Also not really sure about the `Element.prototype.matches()` polyfill: https://developer.mozilla.org/en-US/docs/Web/API/Element/matches. It's not a bad idea, but might bring some compatibility issues eventually?
     7
     8This will run on the front-end for logged-in users. Generally the browsers they use should conform to the minimal browser support for wp-admin (IE11, newer Edge, Chromium and Firefox) but having some "error silencing" for old browsers (to emulate jQuery behaviour) may be a good idea.
     9
     10For example looking at the browser compat table at the bottom of https://developer.mozilla.org/en-US/docs/Web/API/Element, there's no `window.Element` for old Edge and Chrome for Android.