Events YUI:在页面加载后在某个事件队列的顶部添加事件?

Events YUI:在页面加载后在某个事件队列的顶部添加事件?,events,yui,Events,Yui,如何在页面加载之后将新事件放在链接到对象的所有附加事件的顶部 实际上,我有一个手风琴,使用一些YUI函数来激活它的行为,现在在不修改YUI主函数的情况下,我需要一些用于调用AJAX例程的新函数。 目前我正在尝试Event.getListeners,但我不知道如何处理返回的对象 从Event.getListeners获得的响应是传递到Event.addListener的所有参数。根据它返回的 因此,使用该对象,您可能只需使用删除侦听器,然后使用Event.addListener按照您希望的顺序重新

如何在页面加载之后将新事件放在链接到对象的所有附加事件的顶部

实际上,我有一个手风琴,使用一些YUI函数来激活它的行为,现在在不修改YUI主函数的情况下,我需要一些用于调用AJAX例程的新函数。 目前我正在尝试Event.getListeners,但我不知道如何处理返回的对象


从Event.getListeners获得的响应是传递到Event.addListener的所有参数。根据它返回的

因此,使用该对象,您可能只需使用删除侦听器,然后使用Event.addListener按照您希望的顺序重新添加它们。对象的属性与Event.addListener的参数映射为1:1,因此不会丢失任何内容

the listener. Contains the following fields:   
    type: (string) the type of event   
    fn: (function) the callback supplied to addListener   
    obj: (object) the custom object supplied to addListener   
    adjust: (boolean|object) whether or not to adjust the default context   
    scope: (boolean) the derived context based on the adjust parameter 
    index: (int) its position in the Event util listener cache