05/12
2014
Outputs javascript code using yii\web\View::registerJs().
A simple widget to wrap your javascript code and output it in specified position of the rendered page., (*1)
composer require "xbazilio/yii2-jswidget":"1.0.0"
By default it outputs code in the yii\web\View::POS_END
. Pass position
parameter if you want to change this behaviour., (*2)
If there are two widgets with the same id, the later will take precedence and overwrite the former, (*3)
'test']); ?> 'test']); ?>
Only 'test overwritten' will be logged., (*4)