[openstreetmap/openstreetmap-website] Propagate iD title to parent (PR #5865)
Anton Khorev
notifications at github.com
Mon Mar 31 05:56:49 UTC 2025
@AntonKhorev commented on this pull request.
> @@ -76,5 +76,10 @@ document.addEventListener("DOMContentLoaded", function () {
const data = parent.OSM.mapParams();
goToLocation(data);
});
+
+ const projectTitle = parent.document.title;
+ new MutationObserver(() =>
+ parent.document.title = [document.title, projectTitle].filter(t => t).join(" | ")
+ ).observe(document.querySelector("title"), { childList: true, characterData: true });
I don't know why you removed `subtree` and how `characterData` is going to work without it.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5865#pullrequestreview-2728297441
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5865/review/2728297441 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250330/fbed847b/attachment.htm>
More information about the rails-dev
mailing list