PerformanceWatchdog

监视应用程序的性能,如果检测到性能不佳,则显示消息。
new PerformanceWatchdog(options)
Parameters:
options (Object)
Name Description
options.container
(Element | String)
将包含该小部件的DOM元素或ID。
options.scene
Scene
用于监视性能的Scene
options.lowFrameRateMessage
String
default 'This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.'
检测到低帧速率时要显示的消息。消息以HTML形式插入,因此请确保它来自受信任的源,这样您的应用程序就不会受到跨站点脚本攻击的攻击。

Members

container : Element

获取父容器。

viewModel : PerformanceWatchdogViewModel

获取视图模型。

Methods

destroy()
销毁小部件。如果从布局中永久删除小部件,则应调用。
isDestroyed() → {Boolean}