# Impossibile accedere all'elemento definito nell'outlet del plugin con l'interfaccia DOM

**URL:** <https://meta.discourse.org/t/cant-access-element-defined-in-plugin-outlet-with-dom-interface/185213>\
**Category:** Development\
**Created:** [2 Aprile 2021, 6:44am UTC](https://meta.discourse.org/t/cant-access-element-defined-in-plugin-outlet-with-dom-interface/185213 "2021-04-02T06:44:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![MrDavis97](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrdavis97/32/206391_2.png) [@MrDavis97](https://meta.discourse.org/u/MrDavis97)\
**Post date:** [2 Aprile 2021, 8:00pm UTC](https://meta.discourse.org/t/cant-access-element-defined-in-plugin-outlet-with-dom-interface/185213/3 "2021-04-02T20:00:53Z")

</div>

Farei qualcosa di simile?

```plaintext
<script type="text/discourse-plugin" version="0.8">
    api.modifyClass('component:plugin-outlet', {
      didInsertElement() {
        this._super(...arguments);

        const button = document.getElementById('vic-button');
        console.log(button);
      },
    });
</script>

```

Quando lo faccio, ottengo un’uscita null ripetuta nella console. Sono un completo principiante, quindi ho solo cercato su Meta persone che fanno cose simili, quindi probabilmente non è la strada giusta.

---

_[View the full topic](https://meta.discourse.org/t/cant-access-element-defined-in-plugin-outlet-with-dom-interface/185213)._
