Popup on mouseover event in Kango browser extension development

129 views Asked by At

I am developing a browser extension using Kango Extension Framework

By Using Content-scripts i have injected some code into the page like shown below

<span onmouseover= "hello('testing_name')" style='width:17%;padding: 3px; background-color: red; color: white; />

I have the hello(str) function definition in the same content-script only,

which is like below

function hello(test_name)
{
    alert(test_name);
}

But whenever i am trying to mouseover on the Span element , the ReferenceError: hello is not defined error is occurring.

What i am doing wrong here

1

There are 1 answers

0
ɹɐqʞɐ zoɹǝɟ On BEST ANSWER

okay , i have solved it by injecting external js file into the current loaded page, and wrote that function in that external js file. Now it is working fine