Over the last 3 months I've started using Pas2JS for a "Pas2JS GUI Web Browser Application". I found some elements that make it unfriendly in some situations. Here is a list of the changes that I think are necessary for correct behavior
// ***** js.pas *****
class TJSDataView
function getBigInt64(aByteOffset : NativeInt; aLittleEndian : Boolean) : String; // added
// ***** sysutils.pas *****
Changes in functions
function UpperCase(const s: String): String; assembler;
function LowerCase(const s: String): String; assembler;
Added a check on the string variable
// ***** controls.pas *****
class TControl
function GetHeight: NativeInt; virtual; // added
procedure Changed; virtual; // modified to clear font style and background color
procedure SetVisible(AValue: boolean); virtual; // Changed from private to protected and set as virtual
// ***** stdcontrls.pas *****
class TCustomComboBox
function GetHeight: NativeInt; override; // added
function GetWidth: NativeInt; override; // added
function RealGetText: string; override; // modified
property ItemIndex: nativeint read GetItemIndex write SetItemIndex; // modified read property
function GetItemIndex: nativeint; // added
class TCustomEdit
function GetHeight: NativeInt; override; // modified
function GetWidth: NativeInt; override; // modified
function RealGetText: string; override; // modified
procedure RealSetText(const AValue: string); override; // modified
procedure SetFocus; override; // modified
class TCustomCheckbox
function GetHeight: NativeInt; override; // modified
function GetWidth: NativeInt; override; // modified
class TCustomLabel
function GetHeight: NativeInt; override; // modified
function GetWidth: NativeInt; override; // modified
class TCustomButton
procedure Changed; override; // modified for CSS: font style removed if HandleClass or HandleId is not set
Preventing automatic export of background color in TControl changes the structure of dialog boxes. I solved this problem by adding a class to specify when you use MessageDlg and adding this class in a css file
.MsgDlg {
color: #000 !important;
background-color: #fff;
}
but I'm not sure it is a good solution.