Our cockpit JS API documentation currently has some way outdated information
about jQuery , suggesting that users of the Cockpit API should always load
jQuery, and use the Cockpit bundled version. This hasn't been true for a long
time, and was just forgotten to be cleaned up. Also, our examples did that, so
people using them as a start for their own modules were also misled.
The problem with this is that it makes the old jQuery version (2.2.5) part of
Cockpit's public API. This is not necessary: the Cockpit API is completely
independent of jQuery, and in fact many of our pages don't use jQuery at all.
It also prevents us from updating jQuery to a current upstream version, as 3.0
changed quite a few things .
As a first step, I just cleaned up the documentation and examples to completely
remove this . Next we need to find out which external Cockpit pages use the
bundled jQuery and make them stop doing that. In a lot of cases, it's fairly
trivial to just completely drop jQuery in favor of standard functions like
`document.getElementById()` or `addEventListener()`, and for the others the
project should use their own jQuery version through npm as usual.
I will go through Fedora, RHEL, and GitHub to search for these projects.
Does anyone know about such projects? Please point them out to me!
After that, we can update jQuery in Cockpit at last, and from then on treat it
as an internal implementation detail instead of API.
The same goes for PatternFly, but at least that was never documented as API nor
being used in the examples - so I think we should be okay there.