- Issue created by @loze
- πΊπΈUnited States tr Cascadia
That comment, and the code implementing that comment, were added by #2651098: Emit javascript being triggered by ajax β to solve a specific problem.
I have no objections to changing this, if you want to write a patch to do that.
But it's important to me that we don't regress, so please read that previous issue and propose something that will work in your case without causing the same problem described in that other issue.
- πΊπΈUnited States loze Los Angeles
thanks @tr I will check that out and try to write a patch.
I think it makes sense that if an emitter field is being displayed, then it should emit.
- πΊπΈUnited States loze Los Angeles
Here is a MR that achieves what I have proposed, while not effecting what the initial issue was solving.
Instead of checking for a full page load, I am deleting the emit from drupalSettings once its been used, so subsequent requests will no longer use it. I am only making an ajax request if the emits array is not empty. This allows newly added emits to drupalSettings from ajax loaded content to be triggered