Since the signature is public function registerJs($js, $position = self::POS_READY, $key = null) and the registering code is $this->js[$position][$key] = $js; you can try the following hack:
Thanks, Script A is not really dependent of Script B though and Script B is too dependant on the view (where it’s registered in) to put it in a seperate js file.
To make it more clear:
Script A does something with my layout, but it has to do it at the very last moment (after other javascript is executed).
Script B renders a carousel with specific options for each view where it’s registered in, but it changes my layout a bit as well.
If i can register a javascript file after the inline javascript it should be fixed as well, can i do that?
Or else, it’s maybe an idea to implement this feature so you can order inline javascript?
Can you relook at your view layout design to achieve this? You can use multiple layouts and lay them out in your master view layout and render them the way you want.