Springer R8396

No Rank
Points: 0
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.
I tried adding the JS to the a JavaScript module and having the HTML Page load it, but my external calls quite working - so I reverted back to everything on the HTM page.
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);
var
aStream: TFileStream;
begin
WebBrowser1.Navigate('about:blank');
if Assigned(WebBrowser1.Document) then
begin
aStream := TFileStream.Create('myJavaScript.htm', fmOpenReadWrite or fmShareDenyNone);
try
(WebBrowser1.Document as IPersistStreamInit) .Load(TStreamAdapter.Create(aStream));
finally
freeandnil(aStream);
end;
HTMLWindow2 := (WebBrowser1.Document as IHTMLDocument2).parentWindow;
end;
fContainer := TExternalContainer.Create(WebBrowser1);
end;
Read More...
Basic Information
-
Gender
Male -
Birth Date
1953-07-06 -
About me
Owner/Founder of XSI
Contact Information
-
Mobile phone
6789232105 -
Address
1264 Hidden Circle Drive -
State
ga -
City / Town
Sugar Hill -
Country
United States
Education
-
College / University
Nova Southeastern -
Graduation Year
1998