Auto height for popup form based on its content

Hi
In a bootstrap template based app, I have a popup form opened.
Popup form's element style is set by web core in order to show it as modal popup.
The thing I want to avoid is setting of the form's height to fixed pixels (650px).
I want form's height to be variable based on the contained div's height.
When I manualy unset the height in the console it works fine.

My question is how can I do this in the code?

Thanks,

Should be possible to remove this in code with:
Form.ElementHandle.removeProperty('height');

This gives compilation error:

This version compiles:

Form.ElementHandle.style.removeProperty('height');

But give null pointer exception during runtime.

When do you call this? It is likely you call this when the form's HTML container element was not yet created.

I call like this:

  frmTranscriptionJob := TfrmTranscriptionJob.Create(Self);
  try
    frmTranscriptionJob.Popup := True;
    frmTranscriptionJob.PopupOpacity := 0.5;
    Await(TfrmTranscriptionJob, frmTranscriptionJob.Load());
    frmTranscriptionJob.ElementHandle.style.removeProperty('height');

Thanks Bruno,
I solved it like this for the time being. It is better than setting forms height during design time. Since the total height of the internal items may change due to theme ect.

procedure TfrmTranscriptionJob.WebFormCreate(Sender: TObject);
begin
  Height := divContainer.Height;
  Top := Floor((Application.MainForm.ClientHeight - Height) / 2);
end;