这指的是什么?

时间:2018-01-12 13:38:49

标签: javascript ruby-on-rails

从标准的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

的警告

有没有直接的方法来改善这个?

0 个答案:

没有答案