dmtest.pp 752 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. unit dmtest;
  2. {$mode ObjFPC}
  3. interface
  4. uses
  5. Classes, SysUtils, htmlactions, Web;
  6. type
  7. { TTestModule }
  8. TTestModule = class(TDataModule)
  9. actbtnSetTitle_2: THTMLElementAction;
  10. acthdrTitle_2: THTMLElementAction;
  11. actSetTitle: THTMLElementAction;
  12. alHTML: THTMLElementActionList;
  13. actTitle: THTMLElementAction;
  14. procedure actSetTitleExecute(Sender: TObject; Event: TJSEvent);
  15. private
  16. public
  17. Procedure DoSomething;
  18. end;
  19. var
  20. TestModule: TTestModule;
  21. implementation
  22. {$R *.lfm}
  23. { TTestModule }
  24. procedure TTestModule.actSetTitleExecute(Sender: TObject; Event: TJSEvent);
  25. begin
  26. ActTitle.Element.innerHTML:='Title is now set';
  27. end;
  28. procedure TTestModule.DoSomething;
  29. begin
  30. Writeln('DoSomething');
  31. end;
  32. end.