何かのインプレース編集を作成したいと思います。編集可能なテキストを含む div の作成から始めたいと思います...しかし、問題に直面しています:
Uncaught TypeError: Cannot call method 'setAttribute' of null
ここに私のコードがあります:
var node = dojo.createElement("div");
node.setAttribute("id", "ieb");
var area = new Textarea();
var newContent = document.createTextNode("When you click on this div you'll be able to edit it (in plain text).The editor's size will initially match the size of the (original) text, but will expand/contract as you type.");
node.appendChild(newContent);
var eb = new InlineEditBox({
editor: area,
autoSave: false
}, "ieb");
ここで何が間違っていますか?または私は何が欠けていますか?
私はこのチュートリアルを長く続けようとしていました: http://dojotoolkit.org/reference-guide/1.9/dijit/InlineEditBox.html
よろしくお願いします...道場は初めてです..
編集:
inlineeditbox.js に入り、この行で壊れているようです:this.displayNode.setAttribute("role", "button");