DEP0163: channel.subscribe(onMessage), channel.unsubscribe(onMessage)

类型: 仅文档


使用做同样事情的 diagnostics_channel.subscribe(name, onMessage)diagnostics_channel.unsubscribe(name, onMessage)

Type: Documentation-only

These methods were deprecated because they can be used in a way which does not hold the channel reference alive long enough to receive the events.

Use diagnostics_channel.subscribe(name, onMessage) or diagnostics_channel.unsubscribe(name, onMessage) which does the same thing instead.