Office 365 Tip: Referencing third-party JavaScript libraries in Master Pages with Design Manager

When you are converting existing HTML design to SharePoint Master Page with Design Manager, you often need to reference third-party script libraries used for functionality on pages. I recently had a case with SkelJS (version 0.4.9 ) which was used in source design to provide functionality to make pages responsive (source design was a freebie taken from Templated). During conversion Design Manager didn't change the <script> tags, but did add XML CDATA element between start and end tag, like this:

 

<script src="js/skel.min.js">//<![CDATA[//]]>
</script>

In this case, that particular CDATA element would break SkelJS functionality, as this library parses content of the <script> block and uses that content to configure library behavior. Because that is not valid configuration for library, skel.min.js would throw a "Syntax Error". Read more >>>

No Comments

Add a Comment

As it will appear on the website

Not displayed

Your website