Make widgets loadable from header to better support Drupal
We need to import scripts separately in Drupal if we want to render them in the footer. Recent EFSA widgets were written with the expectation of being executed in the footer. This is problematic because now we're importing JS multiple times over (jQuery for instance).
The widgets currently affected: eclipsefdn-participating-organizations
and eclipsefdn-members-list
.
These widgets need to be adjusted to run in the header with the event DOMContentReady
(ES6 equivalent to $(document).ready()
. And from now on, all widgets should only run when the DOM content is loaded.