View Issue Details

IDProjectCategoryView StatusLast Update
0034846pas2jsrtlpublic2019-01-14 15:43
ReportersilvioprogAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionProduct Build 
Target Version1.4.0Fixed in Versiontrunk 
Summary0034846: [PATCH] Added HTMLImageElement element
DescriptionHello,

patch in attachment.

best,
TagsNo tags attached.
Fixed in Revision256
Attached Files
  • web.pas.diff (2,285 bytes)
    Index: packages/rtl/web.pas
    ===================================================================
    --- packages/rtl/web.pas	(revision 254)
    +++ packages/rtl/web.pas	(working copy)
    @@ -1,6 +1,7 @@
     {
         This file is part of the Pas2JS run time library.
    -    Copyright (c) 2017 by Mattias Gaertner
    +    Copyright (c) 2017-2019 by Mattias Gaertner, Silvio Clecio (silvioprog),
    +    members of the Pas2JS development team.
     
         See the file COPYING.FPC, included in this distribution,
         for details about the copyright.
    @@ -649,7 +650,7 @@
         property Items[aIndex : NativeInt] : TJSDataTransferItem Read getitem; default;
       end;
     
    -  { TDataTransfer }
    +  { TJSDataTransfer }
     
       TJSDataTransfer = class external name 'DataTransfer'
       private
    @@ -731,7 +732,7 @@
         Property error : TJSObject read FError;
       end;
     
    -  TJsPageTransitionEvent = class(TJSEvent)
    +  TJSPageTransitionEvent = class(TJSEvent)
       end;
     
       TJSHashChangeEvent = class external name 'HashChangeEvent' (TJSEvent)
    @@ -2075,6 +2076,37 @@
         property validity : TJSValidityState read FValidity;
       end;
     
    +  { TJSHTMLImageElement }
    +
    +  TJSHTMLImageElement = class external name 'HTMLImageElement' (TJSHTMLElement)
    +  Private
    +    FComplete: boolean; external name 'complete';
    +    FCurrentSrc: String; external name 'currentSrc';
    +    FNaturalHeight: NativeUInt; external name 'naturalHeight';
    +    FNaturalWidth: NativeUInt; external name 'naturalWidth';
    +    FX: NativeInt; external name 'x';
    +    FY: NativeInt; external name 'y';
    +  Public
    +    alt: String;
    +    crossOrigin: String;
    +    decoding: String;
    +    height: NativeUInt;
    +    isMap: boolean;
    +    referrerPolicy: String;
    +    src: String;
    +    sizes: String;
    +    srcset: String;
    +    useMap: String;
    +    width: NativeUInt;
    +    function decode : TJSPromise;
    +    property complete: boolean read FComplete;
    +    property currentSrc: String read FCurrentSrc;
    +    property naturalHeight: NativeUInt read FNaturalHeight;
    +    property naturalWidth: NativeUInt read FNaturalWidth;
    +    property x: NativeInt read FX;
    +    property y: NativeInt read FY;
    +  end;
    +
       { TJSHTMLMenuElement }
     
       TJSHTMLMenuElement = class external name 'HTMLMenuElement' (TJSHTMLElement) //  uhm... should it be declared? it is experimental at Mozilla docs...
    
    web.pas.diff (2,285 bytes)

Activities

silvioprog

2019-01-10 16:24

reporter  

web.pas.diff (2,285 bytes)
Index: packages/rtl/web.pas
===================================================================
--- packages/rtl/web.pas	(revision 254)
+++ packages/rtl/web.pas	(working copy)
@@ -1,6 +1,7 @@
 {
     This file is part of the Pas2JS run time library.
-    Copyright (c) 2017 by Mattias Gaertner
+    Copyright (c) 2017-2019 by Mattias Gaertner, Silvio Clecio (silvioprog),
+    members of the Pas2JS development team.
 
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
@@ -649,7 +650,7 @@
     property Items[aIndex : NativeInt] : TJSDataTransferItem Read getitem; default;
   end;
 
-  { TDataTransfer }
+  { TJSDataTransfer }
 
   TJSDataTransfer = class external name 'DataTransfer'
   private
@@ -731,7 +732,7 @@
     Property error : TJSObject read FError;
   end;
 
-  TJsPageTransitionEvent = class(TJSEvent)
+  TJSPageTransitionEvent = class(TJSEvent)
   end;
 
   TJSHashChangeEvent = class external name 'HashChangeEvent' (TJSEvent)
@@ -2075,6 +2076,37 @@
     property validity : TJSValidityState read FValidity;
   end;
 
+  { TJSHTMLImageElement }
+
+  TJSHTMLImageElement = class external name 'HTMLImageElement' (TJSHTMLElement)
+  Private
+    FComplete: boolean; external name 'complete';
+    FCurrentSrc: String; external name 'currentSrc';
+    FNaturalHeight: NativeUInt; external name 'naturalHeight';
+    FNaturalWidth: NativeUInt; external name 'naturalWidth';
+    FX: NativeInt; external name 'x';
+    FY: NativeInt; external name 'y';
+  Public
+    alt: String;
+    crossOrigin: String;
+    decoding: String;
+    height: NativeUInt;
+    isMap: boolean;
+    referrerPolicy: String;
+    src: String;
+    sizes: String;
+    srcset: String;
+    useMap: String;
+    width: NativeUInt;
+    function decode : TJSPromise;
+    property complete: boolean read FComplete;
+    property currentSrc: String read FCurrentSrc;
+    property naturalHeight: NativeUInt read FNaturalHeight;
+    property naturalWidth: NativeUInt read FNaturalWidth;
+    property x: NativeInt read FX;
+    property y: NativeInt read FY;
+  end;
+
   { TJSHTMLMenuElement }
 
   TJSHTMLMenuElement = class external name 'HTMLMenuElement' (TJSHTMLElement) //  uhm... should it be declared? it is experimental at Mozilla docs...
web.pas.diff (2,285 bytes)

Michael Van Canneyt

2019-01-13 18:52

administrator   ~0113384

Applied, thanks !

silvioprog

2019-01-14 15:43

reporter   ~0113404

Thank you very much! :-)

Issue History

Date Modified Username Field Change
2019-01-10 16:24 silvioprog New Issue
2019-01-10 16:24 silvioprog File Added: web.pas.diff
2019-01-10 17:19 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-01-10 17:19 Michael Van Canneyt Status new => assigned
2019-01-13 18:52 Michael Van Canneyt Fixed in Revision => 256
2019-01-13 18:52 Michael Van Canneyt Note Added: 0113384
2019-01-13 18:52 Michael Van Canneyt Status assigned => resolved
2019-01-13 18:52 Michael Van Canneyt Fixed in Version => trunk
2019-01-13 18:52 Michael Van Canneyt Resolution open => fixed
2019-01-13 18:52 Michael Van Canneyt Target Version => 1.4.0
2019-01-14 15:43 silvioprog Note Added: 0113404
2019-01-14 15:43 silvioprog Status resolved => closed