Skip to content

Required attachments #2

Description

@yckart

It would nice to have the possibility to add dependent attachments.

Sure, we could do this simply like so:

Attach.add('pluginName1', function(el) {
  var deps = el.dataset.split(' ')
  if (~deps.indexOf('pluginName2') && ~deps.indexOf('pluginName4')) {
    // stuff
  }
})

...however, makes sense to me to let this managed internally:

Attach.add('pluginName1', ['pluginName2', 'pluginName4'], function(el) {
  // stuff...
})

Update
Just don't know what's the best way to go. Either check if the current node resolves all dependencies, or for the existence of those dependencies somewhere in the dom...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions