Hello,
Injecting JavaScript code at runtime is a kind of cyber-attack, also known as a JavaScript injection attack. This is not supported on the forum.
In MAUI WebView
, if you have a need to call JavaScript methods, please write the JavaScript methods into the HTML ahead of time according to Invoke JavaScript and call them, instead of injecting them at runtime.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.