0
爲了更好地組織Javascript,我對之前的工作XHTML文檔進行了一些更改,現在Sid.js在嘗試將Javascript文檔附加到頭部時遇到了問題。卡在Sid.js中很愚蠢的東西
在Chrome中我得到
Uncaught TypeError: Cannot read property 'appendChild' of undefined
在此行中Sid.js
scope.appendChild(node);
的問題是,
scope = (scope ? (scope == 'body' ? body : head) : (type == 'js' ? body : head));
是不確定的。
任何人都知道爲什麼這可能是?