Hello,
I am working on a plugin for a chromium based browser. I need to provide a custom JS Object to the window Object.
My current plugin can provide a custom JS object (with ExecuteScript function of the PrivateInstance) and it works so far. But i can access it only if the whole page and plugin is fully loaded. That is too late.
The Custom JS Object have to be accessible on page loading like the window object.
For Example:
<!DOCTYPE html>
<html>
<head>
<script>
console.log(customObject.customFunktion()); // get error "customObject is not defined "
</script
</head>
<body>
<embed id="plugin" type="application/test"
width="1" height="1"/>
</body>
The Plugin is a trusted plugin, without NaCl. I build chromium from the sources and register the plugin through "--register-pepper-plugins" flag.
Chromium and PPAPI version 41.
Is there is a way to provide a JS Object to the JS Stack (through the Plugin and/or from somewhere in the chromium code) before the page is loading?
Or start the plugin first and then load the page.
Best Regards!