Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

import file in chrome extension

'use strict';

    const script = document.createElement('script');
    script.setAttribute("type", "module");
    script.setAttribute("src", chrome.extension.getURL('main.js'));
    const head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
    head.insertBefore(script, head.lastChild);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #import #file #chrome #extension
ADD COMMENT
Topic
Name
7+7 =