ResourceLinks ResourceFile - script defer attribute?

Posted by Community Admin on 04-Aug-2018 09:21

ResourceLinks ResourceFile - script defer attribute?

All Replies

Posted by Community Admin on 06-Oct-2011 00:00
Hi,

How can I set the "defer" attribute on a script added through a ResourceFile control?

Example:

<sf:ResourceLinks ID="resourceLinks" runat="server" UseEmbeddedThemes="false">
    <sf:ResourceFile Name="~/js/script.js" Static="true" />
</sf:ResourceLinks>

This will generate the following script in the page head:

<script src="/js/script.js" type="text/javascript"></script>

I'd like to add the defer attribute on this script element.

Thanks.
Posted by Community Admin on 07-Oct-2011 00:00
Hello Thomas,

Unfortunately this is not possible out of the box. If you wish to add a script with such attribute you could use a master page and hardcode the script tag there.

All the best,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
This thread is closed