Using lazy handler loader & full JS

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

HTML:

Код:
<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

Читать далее...
 
Активность
Пока что здесь никого нет
Назад
Верх Низ