I’m parsing a fetched html string into DOM object for cross-platform React Native app.
I’ve tried storing global’s DOMParser into a variable to force reference pointing. But this attempt gives me another error: TypeError: undefined is not a constructor. This made me think that expo does not support DOMParser.
I cannot seem to find the same error that I am experiencing even after long hours of googling.
I tried importing @expo/browser-polyfill and I was no longer getting DOMParser undefined error. However, as the documentation for the polyfill mentions that it has a low browser support, I had faced other issues where I could not select and manipulate the dom as on Chrome webbrowser. Since this produced new issues, if anyone have other approaches please do reply!