Iker, Please check my comments inline.

On Feb 5, 2016, at 05:39, Iker Jamardo <[email protected]<mailto:[email protected]>> 
wrote:

Hello eveyrone,

I am playing around with Crosswalk embed extensions and I was wondering if it 
could be possible to call to postMessage inside the onInstanceCreated inherited 
from the base class XWalkExtension. My initial tests are crashing, but as I 
already have the instanceID, it would be great to be able to make the call.
I presume you’re trying the external C++ extension from your context. No, you 
can not use PostMessage inside OnInstanceCreated because the instance is not 
created and initiated yet. You could check 
https://github.com/crosswalk-project/tizen-extensions-crosswalk/blob/master/src/common/extension.cc#L149


If this is not an option, I would be very interested in knowing how to inject 
DOM manipulation code from a XWalkExtension. I know how to export functions to 
the extension object that will be present in the window object, but how about 
if I would like to modify something outside of the scope of the extension JS 
code?
To be honest, I do not quite sure I understand your requirement correctly.

https://github.com/crosswalk-project/crosswalk-android-extensions/blob/master/ardrone_video/ardrone_video.js#L63
 is an example to modify a canvas element.

I have seen also de entryPoints parameter of the XWalkExtension, but as far as 
I understand, these values are only to be able to expose the extension instance 
inside a global object, similar to a renaming of the extension instance. Is 
this right? Haven't been able to find much information about this constructor 
parameter to be honest.

Thanks,
Halton.
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to