https://github.com/klaytn/caver-js/blob/master/packages/caver-core-method/src/index.js#L512 here, the library refers to the presence or absence of the .on method from the provider and thereby determines whether the provider is a web socket or not. But since the provider is an external class, we cannot guarantee that even the HTTP provider will not have this method, because everyone can override it.
For example, metamask adds this method so that even for an HTTP provider it is possible to provide subscriptions by wrapping interval requests into a subscription.
It seems to us that this behavior is not obvious and can lead to unexpected results.
https://github.com/klaytn/caver-js/blob/master/packages/caver-core-method/src/index.js#L512 here, the library refers to the presence or absence of the .on method from the provider and thereby determines whether the provider is a web socket or not. But since the provider is an external class, we cannot guarantee that even the HTTP provider will not have this method, because everyone can override it.
For example, metamask adds this method so that even for an HTTP provider it is possible to provide subscriptions by wrapping interval requests into a subscription.
It seems to us that this behavior is not obvious and can lead to unexpected results.