Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nul800sebastiaan/8caf7ab8d5e152029c2c998d60ca8f1b to your computer and use it in GitHub Desktop.
Save nul800sebastiaan/8caf7ab8d5e152029c2c998d60ca8f1b to your computer and use it in GitHub Desktop.
Code block with syntax highlighting on Discord
```js
#onChange(event: InputEvent) {
if (event.target && event.target instanceof HTMLElement) {
const target = event.target;
const firstShadowRoot = target.shadowRoot;
if (firstShadowRoot) {
const umbInputDocument = firstShadowRoot.querySelector('umb-input-document');
if (umbInputDocument && umbInputDocument.shadowRoot) {
const refList = umbInputDocument.shadowRoot.querySelector('uui-ref-list');
if (refList) {
const id = refList.id; // Access the id of the uui-ref-list
console.log(id); // Use the id as needed
}
}
}
}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment