[Pas2js] web.pas

silvioprog silvioprog at gmail.com
Thu Jan 31 14:07:58 CET 2019


Hi Peter,

On Thu, Jan 31, 2019 at 3:49 AM <pas2js at gauns.org> wrote:

>
> Hi guys,
>
> i have changed the web.pas slightly
>
> TJSNode
>    property value : String Read FValue Write FValue;
>

The "value" is not part of Node interface
<https://developer.mozilla.org/en-US/docs/Web/API/Node>.


> for writing and
>
> TJSKeyboardEvent
>         FKeyCode: Integer; external name 'keyCode';
>         property KeyCode : Integer read FKeyCode;
>

The "keyCode" is no longer recommended because it is marked as deprecated
<https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode>,
so it should not declared in Pas2JS RTL.


> and one question for the TJSHTMLSelectElement
> why is selectedIndex defined as "selectedIndex : NativeInt;"
> and not in the normal way
>
>    private
>      FSelectedIndex: NativeInt; external name 'selectedIndex';
>    public
>      property selectedIndex : NativeInt Read FSelectedIndex;
>
> but it works without this external name declaration
>

In Pas2JS from trunk the "selectedIndex" is declared following the
specification
<https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedIndex>
.

best,

-- 
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20190131/a6a2e8ae/attachment.html>


More information about the Pas2js mailing list