XenForo 2.1.8 и выше использует jQuery 3.4.1 (предупреждение об устаревании)

Мы уже обновили XF 2.2 для использования jQuery 3.4.x, но мы приняли решение перенести это изменение в учет потенциального XSS в jQuery 3.3.1, о котором вы можете прочитать здесь:
Чтобы было ясно, мы не считаем, что XF можно использовать с этим из коробки, и это, как правило, маловероятно, даже с плагинами и другим сторонним кодом.
Тем не менее, с этим, мы должны предупредить вас о нескольких устаревших методах.
Deprecating positional selectors and the sunset of Sizzle

...

Specifically, jQuery 3.4.0 is deprecating :first, :last, :eq, :even, :odd, :lt, :gt, and :nth. When we remove Sizzle, we’ll replace it with a small wrapper around querySelectorAll, and it would be almost impossible to reimplement these selectors without a larger selector engine.

We think this trade-off is worth it. Keep in mind we will still support the positional methods, such as .first, .last, and .eq. Anything you can do with positional selectors, you can do with positional methods instead. They perform better anyway.
Хотя позиционные селекторы все еще будут работать, сейчас мы рекомендуем вам внести изменения, чтобы избежать поломок кода после их окончательного удаления.
Например, если у вас есть код, который выглядит следующим образом:
JavaScript:
var $header = $content.find('.block-header:first');
Вы бы изменили это на:
JavaScript:
var $header = $content.find('.block-header').first();
Мы рекомендуем выполнить поиск по всему вашему коду JavaScript (и коду jQuery от поставщиков), чтобы увидеть, использовались ли эти позиционные селекторы::first,:last,:eq,:even,:odd, :lt, :gt и :nth.
Если они использовались, мы рекомендуем внести изменения сейчас, чтобы при обновлении до будущей версии jQuery и удалении этих селекторов ваш код продолжал работать.
We had already upgraded XF 2.2 to use jQuery 3.4.x but we have made the decision to bring that change forward to account for a potential XSS in jQuery 3.3.1, which you can read about here:

To be clear, we do not believe XF to be exploitable with this out of the box and it is generally unlikely to be, even with add-on and other third party code.

However, with this, we need to make you aware of a few deprecations.

While the positional selectors will still work, for now, we recommend you make changes for now to avoid code breakages when they are finally removed.

As an example, if you have some code which looks like:
JavaScript:
var $header = $content.find('.block-header:first');
You would change this to:
JavaScript:
var $header = $content.find('.block-header').first();

We recommend searching all of your JavaScript code (and jQuery code from vendors) to see if these positional selectors have been used: :first, :last, :eq, :even, :odd, :lt, :gt, and :nth.

If they have been used we recommend making changes now so that when we upgrade to a future version of jQuery and those selectors are removed your code will continue to work.
 
Современный облачный хостинг провайдер | Aéza
Назад
Сверху Снизу