How can we access to the custom public methods of component/directive under mouse pointer.
let element:Element = document.elementFromPoint(x,'y); we get the requestet Element and let us assume we know the element is a component/directive from type CustomComponent which has a public method named checkSomething(). How can I call this method, like this
The only implementation I think could work is firing custom events for that
element.dispatchEvent(new Event('customEvent')); But isn’t there a other possibilty to do this, a method where we can do something like
let component: CustomComponent = abc.givMeTheComponentFromElement(document.elementFromPoint(x,y)); component.checkSomthing();
I try to omit fire unused events, we implement a custom drag & drop behavior using HAMMER and we know when we are over an drop element, but now we have to check if this drop element has an allowed dropzone so we would fire onDrop event only on allowed dropzones and for this we need to do