来自客户端的 raise_event 不在开发中工作
我有以下代码,并且引发网络事件没有执行其应该执行的操作。我已经禁用了所有扩展以确保它不存在。请帮忙。如果我无法调试我的垃圾,我发现很难构建应用程序。帮我!!!
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){}
>>;
}
}
I have the following code, and raising the web event doesn't do what it should do. I have disabled all of my extensions to ensure that it isn't something there. Please help. I find it hard to build an app if I can't debug my junk. HELP ME!!!
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){}
>>;
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是您的事件名称包含数字。事件名称只能包含字母。
从您的emit中的
raise_event
调用和您的select
语句中删除2
,它将起作用。The problem is that your event name contains a numeral. Event names are only to contain letters.
Remove the
2
from yourraise_event
call in your emit and from yourselect
statement and it will work.