21 lines
426 B
JavaScript
21 lines
426 B
JavaScript
import { BridgeComponent } from "@hotwired/hotwire-native-bridge"
|
|
|
|
export default class extends BridgeComponent {
|
|
static component = "stamp"
|
|
|
|
connect() {
|
|
super.connect()
|
|
this.notifyBridgeOfConnect()
|
|
}
|
|
|
|
disconnect() {
|
|
super.disconnect()
|
|
this.send("disconnect")
|
|
}
|
|
|
|
notifyBridgeOfConnect() {
|
|
console.log(this.bridgeElement.getStamp())
|
|
this.send("connect", this.bridgeElement.getStamp())
|
|
}
|
|
}
|