Page 1 of 1

Reading data from oxygen sdk on the js page

Posted: Wed Oct 18, 2023 2:11 pm
by karthickmv
Hi,

I am trying to read the data from the oxygen sdk returned by the AuthorOperationWithResult and this is the code that i have included in the oxygen framework's JS

Code: Select all

editorGlobal.getActionsManager().invokeOperation(
              'ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation', 
              {fragment: data}, 
              function(e) {
                console.log('Done!', e);
            });
in the console the output is "Done! null". I have verified that the operation is called but still i receive a null response. Any help on this would be great.

Thanks,
Karthick

Re: Reading data from oxygen sdk on the js page

Posted: Wed Oct 18, 2023 2:31 pm
by Bogdan Dumitru
Hello,

The callback function has two arguments, the first argument is the error object or null and the second one is the actual result. You are actually logging the error, which is null.