Answer the question
In order to leave comments, you need to log in
Despair post. Why does it happen that the extension script is loaded but not executed?
The script is loaded
The content of test.js I include
the script like this:alert( "Test" );
$( '<script/>', {
src: browser.extension.getURL( 'js/test.js' )
} ).appendTo( $( 'head' ) );
fetch( browser.extension.getURL( 'js/test.js' ), {
credentials: 'include'
} )
.then( response => response.text() )
.then( ( script ) => {
$( '<script/>' ).html( script ).appendTo( $( 'head' ) );
} )
.catch( console.error );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question