function get_history_ancestors(node) {
	const ancestors = [];
	for (node = node.parent; node; node = node.parent) {
		ancestors.push(node);
	}
	return ancestors;
}
@param {HistoryNode} node
@returns {HistoryNode[]} ancestors