Gmail Web チャットまたはその他の Web チャットで、新しいテキストが入力されたことをどのように検出できますか
gmailでは、要素を検査するときの属性です
  <div chat-dir="f" class="km" role="chatMessage" aria-live="assertive">
  <div class="kk">
  ...
  ...
  </div>
  </div>
  <div chat-dir="t" class="km" role="chatMessage" aria-live="assertive">
  <div class="kk">
  ...
  ...
  </div>
 </div>
以下を使用しましたが、alert() が表示されません。テキストは以前の html に追加されているため、処理するチャット データを取得するにはどうすればよいですか
$("div.km").bind("DOMSubtreeModified", function() {
  alert("tree changed");
});
または、chat-dir 属性を使用してデータを取得できますか
EDIT 1:
Gmailチャットで次のことを試しましたが、一度でもアラートが表示されませんでした()
$(".AD").bind("DOMSubtreeModified", function() {
    alert("tree changed");
});
$("div.kk").bind("DOMSubtreeModified", function() {
    alert("tree changed");
});
$('div.kk').on('webkitAnimationEnd animationend', 'div', function(e){
    console.log(e.target.tagName.toLowerCase() + ' added!');
    alert("heree")
});
$(document).ready(function() {
  alert("hello world in ready");  
    $('div.no').on('webkitAnimationEnd animationend', 'div', function(e){
        console.log(e.target.tagName.toLowerCase() + ' added!');
        alert("heree")
});
$('div.no').change(function() {
    alert('Handler for .change() called.');
});
$('div.kk').change(function() {
   alert('Handler for .change() called.');
});
$('.kk').change(function() {
  alert('Handler for .change() called.');
});
alert($('.kk').val());
$('km').bind('DOMNodeInserted DOMNodeRemoved', function(event) {
if (event.type == 'DOMNodeInserted') {
    alert('Content added! Current content:' + '\n\n' + this.innerHTML);
} else {
    alert('Content removed! Current content:' + '\n\n' + this.innerHTML);
}
});
});