Search code examples
javascriptdevexpressxpageslotus-notes

how to add a ressource in a headTag within xpage?


how can i add "polyfill.min.js?features=Intl.~locale.fr" to a xp:headTag ?

I tried this code but i get this error Failed to load resource: the server responded with a status of 400 (Bad Request).

This is the code that i used :

<xp:headTag tagName="script">
    <xp:this.attributes>
        <xp:parameter name="type" value="text/javascript" />
        <xp:parameter name="src" value="Dx/polyfill.min.js?features=Intl.~locale.fr" />
    </xp:this.attributes>
</xp:headTag>

Solution

  • Domino does not understand the first query parameter "features" so add the open parameter that Domino understands and then the features parameter afterwards:

    <xp:headTag tagName="script">
        <xp:this.attributes>
            <xp:parameter name="type" value="text/javascript" />
            <xp:parameter name="src" value="Dx/polyfill.min.js?open&features=Intl.~locale.fr" />
        </xp:this.attributes>
    </xp:headTag>