[Pas2js] TCustomWebWidget(DefaultParentElement)
Michael Van Canneyt
michael at freepascal.org
Fri Nov 27 12:16:37 CET 2020
On Fri, 27 Nov 2020, heliosroots wrote:
> I don't want to create an area to add the dialogues I want them to be in the
> Body
>
>
> with TMyModal.create(nil) then
> try
> // DefaultParentElement =>> document.body
> ...
> await(show);
> finally
> Free
> end;
But that should work, this is the exact purpose of DefaultParentElement.
Why does it not work for you ?
>
> || From what I hear, I think you better simply set ParentID in the
> constructor
> || of your widget ?
> I can't trust the id it changes if it gives a refresh
Not if ParentID is a fixed ID in the HTML.
And as far as I know, you can give an ID to the body element. I would need to check that.
During refresh, we should maybe not regenerate the ID of an element, but reuse
the existing one if there is one. I will check this.
Michael.
More information about the Pas2js
mailing list