mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-13 12:09:21 +02:00
* Patch from heliosroots. Closes merge request cd pas2js/
This commit is contained in:
parent
184cdf3835
commit
2799118b26
packages/webwidget
@ -696,7 +696,7 @@ Type
|
||||
Public
|
||||
Constructor Create(aTable : TCustomTableWidget;aTableID : String); virtual;
|
||||
Property Table : TCustomTableWidget Read FTable;
|
||||
Property Column : TCustomTableColumn Read FColumn;
|
||||
Property Column : TCustomTableColumn Read FColumn Write FColumn;
|
||||
Property Row : Integer Read FRow;
|
||||
Property Col : Integer Read FCol;
|
||||
Property Kind : TRowKind Read FKind;
|
||||
@ -3184,3 +3184,5 @@ end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
||||
|
@ -377,6 +377,7 @@ Type
|
||||
Class Function FindElement(aID : String) : TJSHTMLElement;
|
||||
// Create element in DOM tree, set ID if it is nonzero
|
||||
Class function CreateElement (aTag : String; aID : String) : TJSHTMLElement;
|
||||
Class function CreateElement (aParent:TJSElement; aTag : String; aID : String) : TJSHTMLElement;
|
||||
// references are relative to this element. By default, this is the element of the widget.
|
||||
// override if you want for instance to indicate the parent element.
|
||||
function GetReferenceElement: TJSHTMLELement; virtual;
|
||||
@ -2737,6 +2738,14 @@ begin
|
||||
Result.id:=aID;
|
||||
end;
|
||||
|
||||
class function TCustomWebWidget.CreateElement(aParent: TJSElement;
|
||||
aTag: String; aID: String): TJSHTMLElement;
|
||||
begin
|
||||
Result := CreateElement(aTag, aID);
|
||||
if aParent <> nil then
|
||||
aParent.appendChild(Result);
|
||||
end;
|
||||
|
||||
function TCustomWebWidget.GetReferenceElement: TJSHTMLELement;
|
||||
begin
|
||||
Result:=Element;
|
||||
|
Loading…
Reference in New Issue
Block a user