Loading a custom library after all other libraries got loaded So i wan't to load a custom .js file at the very end of the page after all other .js files have been loaded.

This is my library file:

my_library:
  js:
    assets/js/custom.js: {}
  dependencies:
    - core/jquery
    - core/drupal
    - core/drupal.dialog.ajax
    - core/toolbar.escapeAdmin


So the lib is loaded in the page footer with all the rest of the .js files, but it's not last, it's somewhere in the middle. I even tried to add the dependency for toolbar.escapeAdmin as it's javascript file is loaded the very last, as you can see from the picture bellow of the of page:viewsource, but it didn't work.



Any ideas?
That is neither possible (because JS files have no "weight" anymore in Drupal 8), nor does it make sense: Any module can declare a JS file as async or defered, so even if your file would be in last position in HMTL markup, there is absolutely no guarantee that it will be executed in that order.

PS: Module dependencies seem to quite reliably affect ordering of their JS libs in markup, not really certain about it though.