I’m developing a Chrome extension (it isn’t publised yet) wich will interact with Google Docs, it should find some words in text and highlight it without changing document styles. As now Google switched from DOM rendering to canvas I’ve faced some problems with searching text position in document. Google API has some endpoints to get the structure of the document, but in doesn’t contain information about text position, moreover this operation will be very long with huge documents if i call this API after every change in document to recalculate position. I’ve found this question (Switching Google Docs from Canvas to DOM mode – programmatically?). I’ve filled in the form to get access to DOM rendering and I’ve got this access, after a week I’ve noticed “mode=html” param in URL and DOM tags in browser developer tools. BUT, i suppose I’ve got access to DOM rendering only on my Google account and not on my extension, also I’ve found that after Goolge whitelisted my extension they should send me some documentation according on comments in this question (Annotated canvas rendering in Google Docs).
So, my question is, how get access to DOM rendering to my extension, not the user, and how should I interact with DOM in code without “mode=html” param?