dutiyesh / dutiyesh/chrome-extension-cli

`document` is getting replaced by `background_document`

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.5k
Forks
105
PR merge metrics
No merged PRs in 30d

Description

I have background script that sends DOM script like this
```
let queryOptions = { active: true, lastFocusedWindow: true };
let [tab] = await chrome.tabs.query(queryOptions);
chrome.scripting.executeScript({
target: {tabId: tab.id},
args: [token['oauth2']],
func: revoke,
world: 'MAIN'
})
```

Now this `revoke` function is defined here in background which has ` ... var form = document.createElement('form'); ... `. This document is intended to be the DOM of the website not the `background_document`. This replacement is making a serious trouble over here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.