I am using the TWebBrowser (VCL) and am passing it considerable javasceipt. I started with the JS as a constant but as it grew, I moved it to an HTM page module and call the JS from the header section.
Though I do appreciate the line numbers on the script errors, I benefit little from moving the code here, except that I can make some changes without recompiling.
My hope was to gain some editing help but I am not sure if I am using the page correctly.
Right now, my text turns red in the middle of a JS loop and all the subsequent text stays Red!
My JS checks out in Fiddle and Jet Brains so with so many externals, they are no longer viable editors.
What I am asking is some basic guidelines on this type of project that has over 800 lines of JS (Google Maps API) with desktop JS calls external calls.
This is my first project of this sort and I am approaching an hard to manage code base. Am I making the best use of Delphi for this?
procedure TfrmMain.FormCreate(Sender: TObject);
if Assigned(WebBrowser1.Document) then
(WebBrowser1.Document as IPersistStreamInit) .Load(TStreamAdapter.Create(aStream));
HTMLWindow2 := (WebBrowser1.Document as IHTMLDocument2).parentWindow;
fContainer := TExternalContainer.Create(WebBrowser1);