タイトルの通り、pepper プラグイン API にカスタム関数を追加できますか?
カスタム関数は値を返すことができますか?
このような
HelloTutorialModule = document.getElementById('hello_tutorial');
var errorCode;
errorCode = HelloTutorialModule.myCustomFunction('Hello');
ありがとう
タイトルの通り、pepper プラグイン API にカスタム関数を追加できますか?
カスタム関数は値を返すことができますか?
このような
HelloTutorialModule = document.getElementById('hello_tutorial');
var errorCode;
errorCode = HelloTutorialModule.myCustomFunction('Hello');
ありがとう
はい、できます。 はdocument.getElementById
を返すため、そうでObject
ない場合はこのオブジェクトを拡張できますfreeze
。
私のDEMOを参照してください