casperjs die 啥意思?

evaluateOrDie()
Signature: evaluateOrDie(Function fn[, String message, int status])

Evaluates an expression within the current page DOM and die() if it returns anything but true:

casper.start('http://foo.bar/home', function() {

this.evaluateOrDie(function() {
    return /logged in/.match(document.title);
}, 'not authenticated');

});

casper.run();

这里的die 是啥意思?
希望高手指教一下?谢谢

阅读 1.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题