Open Bug 785972 Opened 12 years ago Updated 2 years ago

[DeviceStorage]: change the change event reason field for created and modified

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: djf, Unassigned)

Details

(Whiteboard: [DeviceStorageInvestigate])

The current device storage impl sends a change event with reason "created" when a file is first opened and bytes are being written into it. The file is not yet in a useful state, so this is probably not a good time to send a notification.  

It also sends a change event with reason "modified" when the file is done being written.  And it does this after any write, whether or not the file already existed.  That is we get "modified" for new files and for modifications to existing files.

Please change the API to send an onchange only after the write is complete. Use the reason "created" if the file did not previously exist, and use the reason "modified" if the file did exist previously.

Note, however, that this will be a breaking change for mediadb.js, so I'll have to change that file when your patch lands or the gallery app will break.
unassigning things that I am not working on.
Assignee: doug.turner → nobody
Whiteboard: [DeviceStorageInvestigate]
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.