πŸ‡²πŸ‡©Moldova @nyph1337

Account created on 17 May 2016, about 8 years ago
  • Front-End Developer at FFWΒ 
#

Recent comments

πŸ‡²πŸ‡©Moldova nyph1337

I encountered this same issue on my project which previously had already had a lot of javascript implemented without using once(). This issue is genuinely the cause of turning off BigPipe, in fact at this point it is cheaper for our team to implement another custom mini-variation of BigPipe instead of reworking our behaviors to use once().

#4 This is absolutely an issue and your module should be designed to have it. While I agree that once() method gives you more guarantees and add more safety - it should be just a fail-safe for those rare cases when duplicate attachBehaviors() cannot be avoided. This should not mean that we all just start neglecting the context param and throw attachBehaviors() at will, uncontrollably. The context param should only contain the newly-added HTML that came through AJAX, and I am sure that BigPipe can and should be accountable of that, its just a bit more technically challenging.

The official drupal.org Javascript API overview docs β†’ never says its a "requirement" but rather a "guarantee" and the article is right to suggest it because a lot of modules, like BigPipe, do it wrong.

Production build 0.69.0 2024