You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 30, 2023. It is now read-only.
I have the following usecase: I want to test a software which uses the AudioContext object. I would like to mock it. Be aware that AudioContext is used in the global scope by this software ("audio = new AudioContext()"). So I want to inject Javascript when the first <script> tag was read, but none is executed yet. Now several approaches came to my mind:
Using an event such as onInitialized combined with injectJS to inject javascript code. I tried several approaches, but none provided the correct event.
Intercept the onResourceReceived event and add the javascript code to the body of the response. This does not work, because the response body is not modifiable (yet?).
I would really prefer approaches which do not require additional libraries or additional setup. Do you have any suggestions for this usecase?
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!
Hi,
I have the following usecase: I want to test a software which uses the AudioContext object. I would like to mock it. Be aware that AudioContext is used in the global scope by this software ("audio = new AudioContext()"). So I want to inject Javascript when the first <script> tag was read, but none is executed yet. Now several approaches came to my mind:
onInitialized
combined withinjectJS
to inject javascript code. I tried several approaches, but none provided the correct event.onResourceReceived
event and add the javascript code to the body of the response. This does not work, because the response body is not modifiable (yet?).I would really prefer approaches which do not require additional libraries or additional setup. Do you have any suggestions for this usecase?
The text was updated successfully, but these errors were encountered: