Proposal add options param to registerJs()

proposal add options param to registerJs() like in registerJsFile().
In my case I want add nonce (Content-Security-Policy) to inline script tag.
Expected result is
<script nonce='same val'></script>

or may be somebody now how can I add nonce to inline script regitred via registerJs() ?

Please read the doc first always. registerJsFile($url, ['nonce' => 'same val'])

I khow that registerJsFile can do.
I proposal add that ability to registerJs()

I’m sorry, you are right.

As you see it’s not possible now, it would require changing the render* methods in View component. The need for that feature is not that big so I would rather suggest using Html::script() directly in the view file.

Bizley, thank you for your answer.
I think it would be nice if they add it in future versions,
because the requirements for seo are growing