How to insert async and defer in script tags with CakePHP 3 -


i'm using php framework cakephp 3.0.3 , know how insert keywords defer , async script tags:

how script injection framework:

 <? = $ this-> html-> script ('jquery-1.11.1.min.js')?>  

how rendered:

 <script src = "/ js / jquery-1.11.1.min.js"> </ script>  

like how be:

 <async script src = "/ js / jquery-1.11.1.min.js"> </ script>   <script defer src = "/ js / jquery-1.11.1.min.js"> </ script>  

in documentation saw nothing done insert.

an alternate form make follows:

 <? = $ this-> html-> script ('jquery-1.11.1.min.js' ['defer' => true])?>  

and rendering:

 <script src = "/ js / jquery-1.11.1.min.js" defer = "defer"> </ script> 

it's impossible $this->html->script() function. hard coded in cake\view\stringtemplate. suggest leave now, work anyway. if it's vital issue try override htmlhelper , implement own script() function.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -