Accessing iframes from a Chrome content-script extension

前端 未结 2 1144
谎友^
谎友^ 2020-12-28 08:43

I\'m writing a Chrome extension that needs to alter a popular web app when loaded. Unfortunately, most of the UI of that web app is rendered inside an iframe, and although t

2条回答
  •  感动是毒
    2020-12-28 09:03

    I've resolved the problem. The following option has to be specified in the content_scripts section of the manifest.json: "all_frames": true. Without it, the script is only applied to the top frame.

    // Sometimes one just has to RTFM carefully.

提交回复
热议问题