It seems like the library does not correctly implement the parsing of itemrefs. In particular, it seems to go into an infinite recursion between readAttr and readItem when there is an itemref to an ancestor or two itemrefs that refer to each others ancestors. It seems like this should actually cause an error in the parsing:
https://html.spec.whatwg.org/multipage/microdata.html#associating-names-with-items
It seems like the library does not correctly implement the parsing of itemrefs. In particular, it seems to go into an infinite recursion between readAttr and readItem when there is an itemref to an ancestor or two itemrefs that refer to each others ancestors. It seems like this should actually cause an error in the parsing:
https://html.spec.whatwg.org/multipage/microdata.html#associating-names-with-items