Home>

The parse function does not run, or it runs but does nothing. What is the problem?

Manifesto:

{
    "name": "Parser for a list of words on learngerman.dw",
    "description": "Returns a list of words for the ReWord application",
    "version": "1.0",
    "manifest_version": 3,
    "action": {
        "default_icon": {
            "32": "favicon32.png"
        },
        "default_popup": "popup.html"
    },
    "permissions": [
        "scripting",
        "activeTab",
        "storage"
    ]
}

Script:

const butt= document.getElementById ("startButt");
butt.addEventListener ("click", async ()= >
 {
    let [tab]= await chrome.tabs.query ({active: true, currentWindow: true});
    chrome.scripting.executeScript ({
        target: {tabId: tab.id},
        function: parse,
    })
});
function parse () {
    document.body.style.backgroundColor= "green";
    let message= document.createElement ("div");
    message.style.position= "absolute";
    message.style.background= "white";
    if (document.location.href.indexOf ("learngerman.dw")!= -1) {
    } else {
    }
}

popup:

<
html lang= "en" >
<
head >
    <
meta charset= "UTF-8" >
<
/head >
<
body >
    <
button id= "startButt" >
Spar <
/button >
    <
script src= "background.js" >
<
/script >
<
/body >
<
/html >