kissyteam / kissy

A Powerful Collection Of Modules
http://docs.kissyui.com
2.7k stars 863 forks source link

fire fails #204

Closed yiminghe closed 12 years ago

yiminghe commented 12 years ago

KISSY Version :

1.2.0

Browsers :

all

What steps will reproduce the problem?

var x=S.mix({item:1,length:2},S.EventTarget);
x.on("my",function(){alert(1);});
x.fire("my")

Expected

alert(1)

actual

nothing happened

yiminghe commented 12 years ago

KISSY.DOM.data 不支持普通对象!,只支持节点!

minghe commented 12 years ago

昨天帮人调bug的时候,就遇到这个问题。那边是代码从1.1.6升到1.2,自定义事件不触发,最后找到就是这个item属性冲突了。item这个关键字很容易被用到的,哥最好在文档上加上相关说明。

yiminghe commented 12 years ago

这是个 1.2 bug,见页尾

http://docs.kissyui.com/1.2/docs/html/api/core/event/event-target.html