How to run Javascript code before fragment is rendered? (internal links)

Someone from the Wappler team or someone familiar with obscure Wappler stuff, pease enlighten me how to call a Javascript function after the fragment is downloaded but before the fragment is rendered, so I can manipulate the DOM of it before Wappler does its rendering stuff on it?

I’m using this one, but this is called after it’s rendered:

dmx-on:load="run([{runJS:{function:'fragmentLoaded',outputType:'text'}}])"

hey @Apple,

I am not familiar (I don’t even know what a fragment is)…
Maybe this helps you. If not, ignore me my friend.

Hi my friend,

A fragment is what’s downloaded when you click a link with the “internal” attribute, it’s a Wappler-specific feature to mimic SPA (Single Page Application) websites.

Wappler made their own fragment implementation, so I’m afraid the instructions you pointed can’t help me directly.

Thanks for your help attempt though, I really appreciate :wink:

1 Like