IE10 用の Javascript を更新するタスクが与えられました。解決策を無限に探しましたが、見つけられないようです。私が立ち往生しているコードは次のとおりです。
var svgns = "http://www.w3.org/2000/svg";
this.svgDoc = document.getElementById("SVGDoc").getSVGDocument();
this.grp = this.svgDoc.createElementNS(svgns, "g");
this.grp.setAttribute("id", this.id);
if (this.parent)
this.svgDoc.getElementById(this.parent.id).appendChild(this.grp);
else
this.svgDoc.getDocumentElement.appendChild(this.grp);
最後の行は失敗した場所で、Unable to get property appendChild
of undefined or null referenceというエラーが表示されます。IE8以下で動作したため、null参照である理由がわかりません。