整理下笔记,补充以前的一些经验,以免时间长了又会忘记。
dojo 框架
onChange 立即触发:intermediateChanges
parser的用法:在该dom节点中找到对象实例
parser.parse(node, {
noStart: !this._earlyTemplatedStartup,
template: true,
inherited: {dir: this.dir, lang: this.lang, textDir: this.textDir},
propsThis: this, // so data-dojo-props of widgets in the template can reference “this” to refer to me
contextRequire: this.contextRequire,
scope: “dojo” // even in multi-version mode templates use dojoType/data-dojo-type
}).then(lang.hitch(this, function(widgets){
this._startupWidgets = widgets;setter.apply(this, Array.prototype.slice.call(arguments, 1));
throw new Error(“错误内容 It works!”);
要注意的问题
0||undefined==undefined// Flag to enable support for textdir attribute
has.add(“dojo-bidi”, false);Selector.superclass.insertNodes.call(this, data, before, anchor);
for(var j = 0; j < type.length; ++j){
if(type[j] in this.accept){
flag = true;
break;
}
}
ie 兼容性
- ie 10 崩溃:
var a = []; a.length = 100; a.splice(17,17);