Closed bestwestern closed 2 years ago
I am closing this issue - I don't think Web Components are 'supposed' to be able to do this :)
I think this is supposedly possible, as on web.dev:
The powerful thing about custom elements is that you can bundle tailored functionality with the element by defining properties and methods on the element definition. Think of this as a way to create a public API for your element.
Per #1, it does not seem like this is possible right now.
Is this possible to do
That is, call the method of a Preact Component from 'outside'? ( https://stackoverflow.com/questions/39439085/custom-methods-of-web-components )
Use case: I am making a web component to display data and want to expose a 'dataWasUpdated' method that can be called.