1

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

ɹɐqʞɐ zoɹǝɟ
  • 4,342
  • 3
  • 22
  • 35

1 Answers1

1

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

ɹɐqʞɐ zoɹǝɟ
  • 4,342
  • 3
  • 22
  • 35