委任でイベントを操作できません。要素内のボタンが押されたときに特定の関数を起動しようとしています。ただし、提供されている構文 ( 'tap:delegate(button)': function(){});
) を使用すると、応答がありません。以下はコードの例です。助けていただければ幸いです。
HTML:
<my-tag></my-tag>
Js:
xtag.register('my-tag', {
content: '<span>Some Text</span><button>my button</button>',
events: {
'tap:delegate(button)': function(){
console.log('the button was pushed');
}
}
});