Get device innerheight and save it into a variable
Trying to get the innerheight of the user 's device and saving it into . variable . Tried to ask kapa but no success with that . I 'm trying to use a custom action on load that get 's the innerheight with an event that saves the event value in a variable , but apparently not getting the expected event data Custom action : function get _innerheight (args , ctx ) { / / Accessing the device 's innerHeight var height = window .innerHeight ; / / Emitting the innerHeight value as an event ctx .triggerActionEvent ( { deviceInnerHeight : height } ) ; } I think our docs are lacking a bit , so I 'm going to make sure to update it right away I have updated our docs a bit , maybe this will help a bit : - https://docs.nordcraft.com - https://docs.nordcraft.com ❤️1True ! Solved . For anyone looking at this the correct function is : function get _innerheight (args , ctx ) { / / Obtiene el valor de innerHeight const height = window .innerHeight ; / / Activa el evento en Toddle con el nombre y los datos ctx .triggerActionEvent ( "deviceInnerHeight " , { innerHeight : height } ) ; } We are working on getting type -safety into the code -editor , but no ETA right now
.jpeg/public)