从标准的Rails安装,在app / assets / javascripts / cable.js:
// Action Cable provides the framework to deal with WebSockets in Rails.
// You can generate new channels where WebSocket features live using the
// `rails generate channel` command.
//
// = require action_cable
// = require_self
// = require_tree ./channels
(function() {
this.App || (this.App = {});
App.cable = ActionCable.createConsumer();
}).call(this);
我不清楚this
指的是什么。另外,我收到一条关于它是顶级this
有没有直接的方法来改善这个?