2

Problem Setup

This example html:

<html>
    <head>
        <script>
            let blob = new Blob(["<html>Blob content!</html>"], {type: 'text/html'});
            let blobUrl= URL.createObjectURL(blob);
            window.location.href = blobUrl;
        </script>
    </head>
    <body>
        Initial Page
    </body>
</html>

Produces a new html page with the content: <html>Blob content!</html>.

The page URL is: blob:null/c608e557-cacb-4bec-bce2-1f68c6315415

I have a chrome extension with the manifest.json looking something like this:

"content_scripts": [{
    "matches": ["<all_urls>"],
    "match_origin_as_fallback": true,
    "run_at": "document_idle",
    "js": ["getPage.js"],
    "all_frames": true
}]

Question

Why does the content_script getPage.js not get injected into the blob URL?

Simon S.
  • 563
  • 4
  • 21

0 Answers0