@nschonni Even if it is more of a shim, it can still use the same loader as for the polyfills (to avoid mostly duplicate code).

@duboisp What about using $.trim for the shim/polyfill? No need for a custom regex if jQuery already provides an appropriate fallback,

@LaurentGoderre It probably would be best to wait until v4.0 like you suggest. There are several other things that would be good to shim (e.g., querySelectorAll, getElementsByClassName) so probably best to tackle the shims all at the same time.