私はWindowsガジェットを開発しています。背景オブジェクトにaddTextObjectという関数があり、必要なオブジェクトを作成します。このオブジェクトに後でグローとシャドウを追加できます。しかし、問題は、オブジェクトの場所を制御できないことです。たとえば、div、span、またはtd内に追加したい場合、appendChildメソッドが機能しません。どうすればこれを修正できますか?
var txtGlow = document.getElementById('imgBackground').addTextObject("test", "Verdana", 25, "Red", 50, 50);
txtGlow.opacity = 100;
txtGlow.addGlow("yellow", 50, 50);
var theDiv = document.getElementById('divx');
txtGlow.value = theDiv.innerText;
theDiv.appendChild(txtGlow);