Allow custom attributes to be passed in script() method
stubenbaines opened this issue · 1 comments
stubenbaines commented
When integrating LABjs with some other frameworks, it would be useful to allow custom data attributes to be passed to the script() method which would then be output in the script tag. For example, the Gumby CSS framework specifies configuration options in the script tag's attributes. See http://www.gumbyframework.com/docs/javascript/#!/manual-initialization
Building on the Gumby example, would be useful to be able to load Gumby JS with LABjs and also specify attributes.
$LAB.script({
"src" : "js/libs/gumby.js",
"type" : "text/javascript",
"attributes" : {
"gumby-init" : "false"
}
});
would result in a script tag being output as
<script gumby-init="false" src="js/libs/gumby.js"></script>
getify commented
This seems like a reasonable thing to consider for a future update.