As title, can I add a custom function in pepper plugin API?
Can the custom function return a value?
like this
HelloTutorialModule = document.getElementById('hello_tutorial');
var errorCode;
errorCode = HelloTutorialModule.myCustomFunction('Hello');
Thanks
yes, you can, because document.getElementById
will return an Object
, you can enhance this object if it is not freeze
.
Please refer to my DEMO