Replace property with getter in TextPrompt.js
Replace property with getter in TextPrompt.js

Accessing `this._element` in TextPrompt assumes that an element was
already attached. This CL makes this more explicit by checking for
the presence of an element and throwing an error otherwise.

R=dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org

Bug: chromium:1011811
Change-Id: I70c8651ab223304d5ec2c830439da15f931cbdad
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2545818
Reviewed-by: Tim van der Lippe <dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org>
Commit-Queue: Simon Zünd <38944668e9e2ca98ccd0275b53370f90fa55c113@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend