Custom Script

I implement this solution in the Wappler project: https://jsfiddle.net/68y2b53w/5/

My implementation looks like this:
20

For some reason, when calling the function in the script, there is a problem with dmx. The transitionend event listener also doesn’t work:
21

Note that if you call the showSizes() function using a static event (for example, when a button is clicked), the function works stably.

However, I need the resize_h variable to update its value every time the size of the messageArea element changes.

What prevents this script from working in the Wappler?

Probably the app isn’t initialized, the method is called to early. I would suggest setting a global variable, this is directly available and works the same.

dmx.global.set('resize_h', h);
1 Like