Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Allow custom attributes to be passed in script() method #108

Open
stubenbaines opened this issue Aug 13, 2015 · 1 comment
Open

Allow custom attributes to be passed in script() method #108

stubenbaines opened this issue Aug 13, 2015 · 1 comment
Labels

Comments

@stubenbaines
Copy link

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
Copy link
Owner

getify commented Jan 22, 2016

This seems like a reasonable thing to consider for a future update.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants