I changed the call in my controller to:
$this->load->js("/js/javascript_funcs_extensionloaded.js");
echo '<script type="text/javascript" > register_extension(); </script>';
I just can't tell if it is running. I put a breakpoint in my js register_extension module, but phpStorm is not stopping there. I think my xdebug is set correctly. It seems that I don't know how to declare a javascript function in my php program. I found this is the documentation re:
Javascript Class
"This library is DEPRECATED and should not be used. It has always been with an ‘experimental’ status and is now no longer supported. Currently only kept for backwards compatibility."
OK, so it was taken out . But what do the rest of us do now?
I am getting these errors in my console:
index:1
Uncaught ReferenceError: register_extension is not defined
javascript_funcs.js:1
Uncaught ReferenceError: $ is not defined
Uncaught SyntaxError: Unexpected token var
index
Here is the javascript
$(register_extension(
var editorExtensionId = "lamacgnkfoiknjpleghfknfigbmhdaei";
// Make a simple request:
chrome.runtime.sendMessage(editorExtensionId, "snapshot_mode",
function(response) {
if (!response.success)
handleError(url);
})
)
There seems to be something BIG I am missing here? It would seem that I would need to tell the PHP program that register_extension() is a valid javascript function?
proof that an old dog can learn new tricks