[Pas2js] function returning: short implementations
warleyalex
warleyalex at yahoo.com.br
Thu Dec 13 14:33:50 CET 2018
Delphi/Lazarus side:
-----------------------
function TCustomImage.CreateHandleElement: TJSHTMLElement;
begin
Result := TJSHTMLElement(Document.CreateElement('IMG'));
end;
pas2js output:
----------------
this.CreateHandleElement = function () {
var Result = null;
Result = document.createElement("IMG");
return Result;
};
I propose that this be made possible using for direct JS implementation
without the intermediary Result variable.
this.CreateHandleElement = function () {
return document.createElement("IMG");
};
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list