I want to append text to an object that was created by Algolia search in the browser. This is the chunk that was created by Algolia:
<div id="editing-view-port">
<div></div>
</div>
I want to insert a string into the inner div. This is what I tried:
$(document).find('#editing-view-port > div').append(e.results[0][0].transcript);
Where e.results[0][0].transcript is my string. I can append this to an object that was NOT created by Algolia search. I suspect this has something to do with delegation, or event binding, but I'm unsure how to accomplish this?
UPDATE FOR CLARITY:
This is how I tested an object created by Algolia vs. an object created by me...
My JS:
$(document).find('#editing-view-port > div').append(e.results[0][0].transcript); // this is an Algolia object
$(document).find('#my-object > div').append(e.results[0][0].transcript); // this is an object created by me
The string is "test"
The resultant HTML:
<div id="editing-view-port">
<div></div>
</div>
<div id="my-object">
<div>test</div>
</div>
It may be worth noting that when I inspect the dynamically generated section in Chrome, this wraps the section:
#shadow-root (user-agent) == $0