目录

How do I load files that are intercepted on the web page?

Question

When an image request is intercepted, the response.setResponseData() method is used to return the image file in the local sandbox. However, the setResponseData method supports only the string | number and resource parameters. How do I convert the image file in the sandbox to a resource object?

Answer

Currently, the setResponseData method supports the ArrayBuffer type, including the image, font, audio, and video types.