--
Ticket URL: <https://code.djangoproject.com/ticket/30229>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
Comment:
I've created a patch here: https://github.com/django/django/pull/11040
--
Ticket URL: <https://code.djangoproject.com/ticket/30229#comment:1>
* stage: Unreviewed => Ready for checkin
Comment:
Dan's explanation of why adding `rewrite_polyfills=false` to `compress.py`
is okay:
The parameter's badly-named, but it controls whether polyfills are added
to the code when the compiler detects that ES6+ features are being used.
In this case, it thinks Array.prototype.find is being used, which is an
ES2015 feature, and isn't available in all browsers. The polyfill code
will add an implementation for browsers which don't have a native
implementation.
Django's inlines.js only uses jQuery's .find() method, so this polyfill is
unnecessary.
It's possible that in future we'd want to rewrite Django's JavaScript code
using more modern syntax, which might require the use of polyfills.
However, I in that case I think it would be preferable to add those
libraries explicitly, rather than have them added during minification.
--
Ticket URL: <https://code.djangoproject.com/ticket/30229#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"fe65918dca405644047b7dbc295d14535626a83a" fe65918]:
{{{
#!CommitTicketReference repository=""
revision="fe65918dca405644047b7dbc295d14535626a83a"
Fixed #30229 -- Removed polyfill from inlines.min.js.
find() is only called on jQuery objects, so the polyfill is necessary.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30229#comment:3>