Skip to content

Commit

Permalink
minor #20580 [Mercure] Adding hint for multiple topics (ThomasLandauer)
Browse files Browse the repository at this point in the history
This PR was merged into the 6.4 branch.

Discussion
----------

[Mercure] Adding hint for multiple topics

Page: https://symfony.com/doc/6.4/mercure.html#subscribing

Closes #20574 Closes symfony/mercure-bundle#71 Closes symfony/mercure-bundle#82

Info is taken from #20574 (comment)

Commits
-------

3dca32e [Mercure] Adding hint for multiple topics
  • Loading branch information
javiereguiluz committed Jan 21, 2025
2 parents 6301562 + 3dca32e commit 33dee6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mercure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ as patterns:
}
</script>

However, on the client side (i.e. in JavaScript's ``EventSource``), there is no built-in way
to see which topic a certain message is coming from. So if this (or any other meta information)
is important to you, you need to include it in the message's data (e.g. by adding a key to the
JSON, or a `data-*` attribute to the HTML).

.. tip::

Test if a URI Template matches a URL using `the online debugger`_
Expand Down

0 comments on commit 33dee6f

Please sign in to comment.