Hi. I’m trying to create a widget encapsulating the new Dropbox Chooser API, which need to be included with a tag like this one:
<script type="text/javascript" src="https://www.dropbox.com/static/api/1/dropbox.js" id="dropboxjs" data-app-key="YOUR_APP_KEY"></script>
As you can see, there’s a non standard attribute [font=“Courier New”]data-app-key[/font] in it. So, this Javascript library can not be inserted using registerScriptFile, since the render generates a fixed [font=“Courier New”]<script>[/font] tag. Of course I can just drop a CHtml::tag(‘script’ blahblah) but this can not be included at the [font=“Courier New”]<head>[/font] section of the page and there’s no way to control if you already included a library in case the widget is used elsewhere in the page (of course I could use a singleton or something else, but it would be cumbersome).
So, something like this would be useful:
public CClientScript registerScriptFile(string $url, integer $position=NULL, array $htmlOptions=NULL)
Notice the new $htmlOptions parameter. I know this means to modify almost 50% of Yii’s core classes, but given the strange tendency of “cloud” providers of including weird ways to use their APIs, it is needed, IMO.
Please take it in consideration.