pas2js/demo/datamodule/dmtest.pp
Michaël Van Canneyt b0b52a9edf * Data module demo
2022-03-29 16:37:32 +02:00

49 lines
752 B
ObjectPascal

unit dmtest;
{$mode ObjFPC}
interface
uses
Classes, SysUtils, htmlactions, Web;
type
{ TTestModule }
TTestModule = class(TDataModule)
actbtnSetTitle_2: THTMLElementAction;
acthdrTitle_2: THTMLElementAction;
actSetTitle: THTMLElementAction;
alHTML: THTMLElementActionList;
actTitle: THTMLElementAction;
procedure actSetTitleExecute(Sender: TObject; Event: TJSEvent);
private
public
Procedure DoSomething;
end;
var
TestModule: TTestModule;
implementation
{$R *.lfm}
{ TTestModule }
procedure TTestModule.actSetTitleExecute(Sender: TObject; Event: TJSEvent);
begin
ActTitle.Element.innerHTML:='Title is now set';
end;
procedure TTestModule.DoSomething;
begin
Writeln('DoSomething');
end;
end.