简体   繁体   English

JSF获取Ajax队列

[英]Jsf get ajax queue

Is it possible to get the current jsf-ajax-queue in javascript? 是否有可能在JavaScript中获取当前的jsf-ajax-queue?

I need to detect if there is currently any jsf-ajax request running. 我需要检测当前是否正在运行任何jsf-ajax请求。

The

jsf.ajax

object seems not to expose this information. 对象似乎没有公开此信息。

I dont want to add event listeners becuase this is only for selenium testing and not needed for production. 我不想添加事件侦听器,因为这仅用于硒测试,生产中不需要。

object seems not to expose this information. 对象似乎没有公开此信息。

There's indeed no public API for that, as confirmed by the jsf.ajax jsdoc . 正如jsf.ajax jsdoc所确认的,确实没有任何公共API。

Your best bet is to let Selenium programmatically register a global ajax listener beforehand via jsf.ajax.addOnEvent and jsf.ajax.addOnError . 最好的选择是让Selenium通过jsf.ajax.addOnEventjsf.ajax.addOnError以编程方式预先注册全局ajax侦听jsf.ajax.addOnError This way you can keep track of started, completed and errored requests yourself. 这样,您可以自己跟踪启动,完成和出错的请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM