Parent attribute in constructor and finding the container

How would I address a container (div element id, defined in the HTMLString of a window cell or layout cell) in the parent attribute of the constructor for a new object?

I have a layout with 4 cells and 2 window cells.

The parent attribute in the constructor is according to the documentation the id or object for parent container.
So for a further carousel object or other objects I want to create I just enter the id like “carouselObj”.
I often have the issue that the objects are not placed at my desired position because the div element with this id does not belong to the main document, but to a window cell or layout cell.
The debugger in the browser says mostly “this.base is null” if it cannot find the parent.

I also do not want to do place on the whole element, but only on a part of it. That is why e.g. mywin.cell(“a”).attachCarousel() is not an option. I already use attachHTMLString to build my other stuff and at the end I have the div element with the id in the HTMLString as my desired position.

I found some examples with “document.body” as parent and that works fine for my main layout object.
So far I could not find any example for my issue.
How would I address a div element id in a window cell or layout cell?
Maybe something is possible with the getFrame function and contentWindow.document.getElementById(“someId”)? What would the correct usage be?

Please do not ask me for a demo, because I only want to understand the general theory and possibilities or maybe there is an example that I do not know yet?

Thanks.