Modernizing inline script tags for templates & JS API