【发布时间】:2019-07-31 13:53:08
【问题描述】:
FF 68.0.1 中的 GM 脚本中的以下代码:
let input = $( 'input#id' );
input.each( function(){console.debug(this)} );
input.each( debugn(this) );
function debugn( message ) {
console.debug(message)
}
先打印:
<input id="id" ...>
正如预期的那样:
Sandbox { browser: {...
即使内部迭代器在第一次调用时被使用并且在第二次调用时没有初始化(尽管.each() 没有提到这种行为)它不应该打印Sandbox 对象,而只是不调用debugn(...) ,不应该吗?
【问题讨论】:
标签: jquery firefox console each greasemonkey-4