I am storing anchor references only by name, but I have no way of tracking rename events. I see that GSAnchor objects don’t have an id property. Is this something that was never implemented on purpose? Would this be feasible? Is there some other way of reliably tracking anchor renames so that references don’t break?
Why do you need that?
Because I want to store a reference to an anchor in a node’s userData. However, all I can currently do is store the anchor’s name in the userData. So when I change the name of the anchor, this userData becomes useless. I would either like to update the anchor name in the userData when that anchor is renamed, or just store a unique ID that isn’t affected by the anchor being renamed.
You can add an ID to anchor.attributes.