# Javascript inject in Perspective... have fun

**URL:** <https://forum.inductiveautomation.com/t/javascript-inject-in-perspective-have-fun/65805>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 28, 2022, 9:17am UTC](https://forum.inductiveautomation.com/t/javascript-inject-in-perspective-have-fun/65805 "2022-10-28T09:17:54Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 2, 2022, 8:56am UTC](https://forum.inductiveautomation.com/t/javascript-inject-in-perspective-have-fun/65805/4 "2022-11-02T08:56:25Z")

</div>

Here ya go xd

> [@Perspective Mouse Click & Drag](https://forum.inductiveautomation.com/t/perspective-mouse-click-drag/28583/40):
>
> Gotcha mage const view = [...window.\_\_client.page.views.\_data.values()].find(view =\> view.value.mountPath == this.parentNode.parentNode.getAttributeNode('data-component-path').value.split('.')[0]).value; you can than do things like view.custom.read('yourprop'), view.custom.write('yourprop', thevalue), view.props.write('yourprop', thevalue), view.params.read('key') you could dig into the children/root too, but you should probably just use bindings to the custom props unless you know what you…

---

_[View the full topic](https://forum.inductiveautomation.com/t/javascript-inject-in-perspective-have-fun/65805)._
