I have a custom-element with shadow DOM, which listens to attribute target change. target is supposed to be the ID of the element which my comp
target
You just have to call ShadowRoot.
this.shadowRoot.getElementById('target') should work.
this.shadowRoot.getElementById('target')
Here's an example, the get syntax will bind an object property to a function.
get target() { return this.shadowRoot.getElementById('target'); }