[Pas2js] The definition of 'Attr' interface

Michael Van Canneyt michael at freepascal.org
Tue Aug 20 09:08:33 CEST 2019


This class alread exists in the web unit.
It just misses the specified property, which is useless anyway.

Michael.

On Mon, 19 Aug 2019, warleyalex via Pas2js wrote:

> Ref: https://dom.spec.whatwg.org/#interface-attr
>
> (*
> [Exposed=Window]
> interface Attr : Node {
>  readonly attribute DOMString? namespaceURI;
>  readonly attribute DOMString? prefix;
>  readonly attribute DOMString localName;
>  readonly attribute DOMString name;
>  [CEReactions] attribute DOMString value;
>
>  readonly attribute Element? ownerElement;
>
>  readonly attribute boolean specified; // useless; always returns true
> };
>
>
>
> *)
> TJSDOMString = String;
>
> //  TJSAttr = class external name 'Attr' (TJSObject)
>  TJSAttr = class external name 'Attr' (TJSNode)
>  private
>    fNameSpaceURI: TJSDOMString external name 'namespaceURI';
>    fPrefix: TJSDOMString; external name 'prefix';
>    fLocalName: TJSDOMString; external name 'localName';
>    fName: TJSDOMString; external name 'name';
>    fvalue: TJSDOMString; external name 'value';
>    fspecified: Boolean; external name 'specified';
>  public
>    property namespaceURI: TJSDOMString read fNameSpaceURI;
>    property prefix: TJSDOMString read fPrefix;
>    property localName: TJSDOMString read fLocalName;
>    property name: TJSDOMString read fName;
>    property value: TJSDOMString read fvalue;
>    property specified: Boolean read fspecified;
>  end; 
>
>
>
> --
> Sent from: http://pas2js.38893.n8.nabble.com/
> _______________________________________________
> Pas2js maillist  -  Pas2js at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js


More information about the Pas2js mailing list