javascript - Chrome extension, require once -
i looking js equivalent of php function require_once() chrome extension. extension uses lot of functions, , once background page used executescript("file": "blabla.js"), want call of functions. first problem when place executescript("code": "performaction()") right behind it, errors.
these caused because blabla.js not loaded yet. best way let script wait until blabla.js loaded? , can background page see whether script inserted on page? (i rather not store kind of information of seperate tabs in background page). or should stick chrome messaging system?
Comments
Post a Comment