"pause" : 运行环境从前台切换到后台事件
document.addEventListener("pause", pauseCallback, capture);
tips: 当app从前台切换到后台时会触发此事件。 若应用需要处理从前台切换到后台的事件行为,可通过注册事件监听器来监听“pause”事件,此事件需要在plusready事件后通过document进行注册。
"resume": 运行环境从后台切换到前台事件
document.addEventListener("resume", resumeCallback, capture);
tips: 当app从后台切换到前台时会触发此事件。 若应用需要处理从后台切换到前台的事件行为,可通过注册事件监听器来监听“resume”事件,此事件需要在plusready事件后通过document进行注册。
此文章,参考Hbuilder官方文档:http://www.html5plus.org/doc/zh_cn/events.html#plus.Events.%22resume%22