mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-23 00:39:22 +02:00
IHTMLClient interface
This commit is contained in:
parent
ee912ee368
commit
465f2395b8
@ -29,7 +29,7 @@ Type
|
|||||||
TForeachHTMLElementDataEx = {$ifdef pas2js}reference to {$endif} procedure (aElement : TJSHTMLElement; aData : TObject);
|
TForeachHTMLElementDataEx = {$ifdef pas2js}reference to {$endif} procedure (aElement : TJSHTMLElement; aData : TObject);
|
||||||
TForeachHTMLElementData = {$ifdef pas2js}reference to {$endif} procedure (aElement : TJSHTMLElement);
|
TForeachHTMLElementData = {$ifdef pas2js}reference to {$endif} procedure (aElement : TJSHTMLElement);
|
||||||
|
|
||||||
THTMLCustomElementAction = class(TComponent)
|
THTMLCustomElementAction = class(TComponent,IHTMLClient)
|
||||||
private
|
private
|
||||||
FActionList: THTMLCustomElementActionList;
|
FActionList: THTMLCustomElementActionList;
|
||||||
FCSSSelector: String;
|
FCSSSelector: String;
|
||||||
@ -58,9 +58,12 @@ Type
|
|||||||
Procedure DoBind;
|
Procedure DoBind;
|
||||||
Procedure DoBeforeBind; virtual;
|
Procedure DoBeforeBind; virtual;
|
||||||
Procedure DoAfterBind; virtual;
|
Procedure DoAfterBind; virtual;
|
||||||
|
|
||||||
Public
|
Public
|
||||||
Destructor Destroy; override;
|
Destructor Destroy; override;
|
||||||
Class Function GetElementValue(aElement : TJSHTMLElement) : String; virtual;
|
Class Function GetElementValue(aElement : TJSHTMLElement) : String; virtual;
|
||||||
|
procedure HTMLLoaded;
|
||||||
|
procedure HTMLRendered;
|
||||||
Class Procedure SetElementValue(aElement : TJSHTMLElement; const aValue : String; asHTML : Boolean = false); virtual;
|
Class Procedure SetElementValue(aElement : TJSHTMLElement; const aValue : String; asHTML : Boolean = false); virtual;
|
||||||
function GetParentComponent: TComponent; override;
|
function GetParentComponent: TComponent; override;
|
||||||
function HasParent: Boolean; override;
|
function HasParent: Boolean; override;
|
||||||
@ -406,6 +409,16 @@ begin
|
|||||||
Result:=aElement.InputValue;
|
Result:=aElement.InputValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure THTMLCustomElementAction.HTMLLoaded;
|
||||||
|
begin
|
||||||
|
// Do nothing
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure THTMLCustomElementAction.HTMLRendered;
|
||||||
|
begin
|
||||||
|
Bind;
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure THTMLCustomElementAction.SetElementValue(
|
class procedure THTMLCustomElementAction.SetElementValue(
|
||||||
aElement: TJSHTMLElement; const aValue: String; asHTML: Boolean);
|
aElement: TJSHTMLElement; const aValue: String; asHTML: Boolean);
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user