在使用ActionCable时, app/assets/javascripts/channels/calladdresses.coffee: App.calladdress = App.cable.subscriptions.create "CalladdressChannel", connected: -> # Called when the subscription is ready for use on the server disconnected: -> # Ca
做拖拽相关效果时,想在ondragover时给被拖拽元素添加一些样式,于是在dragover事件的函数中通过dataTransfer.getData()获取在dragstart中设置的数据,然而发现dataTransfer.getData()所返回的数据为空. 查询资料发现dataTransfer.setData()中所设置的数据是存储在drag data store中,而根据W3C标准,drag data store有三种模式,Read/write mode, Read-only mode跟P