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

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

Description

@stubenbaines

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions