Skip to content

Commit

Permalink
Editorial: modernize getters and setters
Browse files Browse the repository at this point in the history
Fixes #64.

Co-authored-by: Anne van Kesteren <[email protected]>
  • Loading branch information
a-sully and annevk authored Oct 30, 2022
1 parent 114593e commit 38b0517
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,11 @@ Their [=deserialization steps=], given |serialized| and |value| are:
:: Returns the [=entry/name=] of the entry represented by |handle|.
</div>

The <dfn attribute for=FileSystemHandle>kind</dfn> attribute must
return {{FileSystemHandleKind/"file"}} if the associated [=FileSystemHandle/entry=] is a [=file entry=],
and return {{FileSystemHandleKind/"directory"}} otherwise.
The <dfn attribute for=FileSystemHandle>kind</dfn> getter steps are to return
{{FileSystemHandleKind/"file"}} if [=this=] is a [=file entry=]; otherwise
{{FileSystemHandleKind/"directory"}}.

The <dfn attribute for=FileSystemHandle>name</dfn> attribute must return the [=entry/name=] of the
associated [=FileSystemHandle/entry=].
The <dfn attribute for=FileSystemHandle>name</dfn> getter steps are to return [=this=]'s [=entry/name=].

### The {{FileSystemHandle/isSameEntry()}} method ### {#api-filesystemhandle-issameentry}

Expand Down Expand Up @@ -299,9 +298,9 @@ The <dfn method for=FileSystemFileHandle>getFile()</dfn> method steps are:
1. Let |f| be a new {{File}}.
1. Set |f|'s <a spec=FileAPI>snapshot state</a> to the current state of |entry|.
1. Set |f|'s underlying byte sequence to a copy of |entry|'s [=binary data=].
1. Initialize the value of |f|'s {{File/name}} attribute to |entry|'s [=entry/name=].
1. Initialize the value of |f|'s {{File/lastModified}} attribute to |entry|'s [=file entry/modification timestamp=].
1. Initialize the value of |f|'s {{Blob/type}} attribute to an [=implementation-defined=] value, based on for example |entry|'s [=entry/name=] or its file extension.
1. Set |f|.{{File/name}} to |entry|'s [=entry/name=].
1. Set |f|.{{File/lastModified}} to |entry|'s [=file entry/modification timestamp=].
1. Set |f|.{{Blob/type}} to an [=implementation-defined=] value, based on for example |entry|'s [=entry/name=] or its file extension.

Issue: The reading and snapshotting behavior needs to be better specified in the [[FILE-API]] spec,
for now this is kind of hand-wavy.
Expand Down

0 comments on commit 38b0517

Please sign in to comment.