ドキュメント オブジェクトにバインドされたカスタム イベントに問題があります。私のアプリはいくつかのファイルに分割されています。これはほんの一例です:
events.js
(function($){
$(document).on("updateCommentsView", function(e, data){
console.debug(e, data);
});
})(jQuery);
app.js
// some code with functions inside .ready(), then
window.foo(formData, function(r){
$(document).trigger("updateCommentsView", [{"formData":formData, "response": r}]);
});
問題
ページを更新するたびに (F5または更新ボタンまたは を含むその他の方法を使用してlocation.reload()
)、カスタム バインドevents.js
がなくなります。Enterしかし、アドレスバーにヒットすると、すべて問題ありません。そこで何が起こっているのですか?