Hi James, We can achieve this using a decorator pattern, we can set the screen level js file on screen and can be included in the header.
Am I missing something here? Thanks & Regards -- Deepak Dixit ofbiz.apache.org On Wed, May 6, 2020 at 10:03 PM James Yong <jamesy...@apache.org> wrote: > Hi all, > > There are javascript files that only applies to a specific screen. > While the javascript can be added via ftl templates, the Content Security > Policy will need to be relaxed to allow inline scripts. > Using requireJs is not an appropriate solution as there is little > reusability between different screens. > > Propose a new <html-script> widget tag will add a script tag inside html > head tag, or after body tag. > e.g. > <platform-specific> > <html> > <html-script src=“/ordermgr/js/test.js” placement=“head”/> > > will render as: > <html> > <head> > … > <script src=“/ordermgr/js/test.js” > type="application/javascript"/> > </head> > > Regards, > James >