来自客户端的raise_event不在dev中工作

时间:2011-04-05 07:20:02

标签: krl

我有以下代码,并且提升网络事件并不会做它应该做的事情。我已禁用所有扩展程序,以确保它不是那里的东西。请帮忙。如果我无法调试我的垃圾,我发现很难建立一个应用程序。帮助我!!!

dispatch {
    // Some example dispatch domains
    // domain "example.com"
    domain "google.com"
}

global {

}
rule temp_rule is active{
    select when pageview ".*"
    pre{

    }
    {
        notify("111",'123');

        emit<<
            var tempapp = KOBJ.get_application("a710x19");
            tempapp.raise_event("temp2");
        >>;
    }
}

rule temp2 is active{
    select when web temp2
    pre{

    }
    {
        notify("222",'<div id="fbp_fblogo">123</div>');
        emit<<
            try{
                console.log("TEMP2'd");  
            }catch(e){}  
        >>;
    }
}

1 个答案:

答案 0 :(得分:4)

问题是您的事件名称包含数字。事件名称仅包含字母。

从您的[{1}}来自您的2语句中删除raise_eventselect语句将会有效。