Y
Y
Yaroslav42322020-12-12 15:27:17
Google Chrome
Yaroslav4232, 2020-12-12 15:27:17

I am writing a chrome extension. When you click on the button, you need to execute a JS function. How to implement it?

It was required to execute the JS function window.open(' https://google.com/ ') when the button is pressed .
How to implement it?
(It is worth considering that the script tag in the html file is prohibited)
PLEASE HELP!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Leonid Yakovlev, 2020-12-12
@deleo547

Learn the materiel, Kulagin!

have fun

N
Nadim Zakirov, 2020-12-12
@zkrvndm

It should be noted that the script tag in the html file is prohibited.

It is not forbidden, it's just that scripts in extension files should be linked as a link, and not inserted inline.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question