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

Pass document as the value of context to Drupal.attachBehaviors #304

Merged
merged 2 commits into from
Feb 12, 2019

Conversation

philwolstenholme
Copy link
Contributor

If we don't pass a value for context then things like $('[data-video]', context) in Drupal behaviors won't work, and code won't be shareable between Drupal and PL.

If we don't pass a value for context then things like `$('[data-video]', context)` in Drupal behaviors won't work, and code won't be shareable between Drupal and PL.
@philwolstenholme
Copy link
Contributor Author

This might need reapplying after #288 is merged in

@philwolstenholme philwolstenholme changed the title Pass document as the value of context to attachBehaviors Pass document as the value of context to Drupal.attachBehaviors Nov 22, 2018
@evanmwillhite
Copy link
Contributor

@philwolstenholme after the big changes just merged in #288 does this error still occur for you? Note: You'll have to use the develop branch to test since we haven't done a release yet. Thanks!

@evanmwillhite
Copy link
Contributor

I went ahead and implemented this (in the new way) because the logic makes sense. I didn't see any functionality regressions within the default Pattern Lab components using javascript, so marking this as needs review since I tweaked the code.

@evanmwillhite
Copy link
Contributor

Testing instructions on this one include testing the default Javascript components in Pattern Lab (accordion, menu, etc.)

@mikeethedude mikeethedude self-requested a review February 12, 2019 20:32
Copy link
Collaborator

@mikeethedude mikeethedude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. No problems found.

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

Successfully merging this pull request may close these issues.

4 participants