Using lazy handler loader & full JS

Status
This content is read-only, or is not open for further replies.

Kirby

Guest
offline
Either I am missing smth. or using lazy loaded handlers & full JS is kinda complicated:

HTML:

Code:
<xf:if is="$xf.development && $xf.fullJs">
    <xf:js addon="vendorprefix/addonid" src="vendorprefix/addonid/file.js" />
<xf:else />
    <xf:js>XF.LazyHandlerLoader.register('js/vendorprefix/addonid/file.min.js', 'handlername', 'click');</xf:js>
</xf:if>

Is there a simpler way to achieve this?

If not:
Could we have smth. simpler like
HTML:

<xf:js addon="vendorprefix/addonid"...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom