Confirmed users
1,340
edits
(→WebIDL) |
No edit summary |
||
(8 intermediate revisions by one other user not shown) | |||
Line 21: | Line 21: | ||
<pre> | <pre> | ||
[NoInterfaceObject] | [NoInterfaceObject] | ||
interface NavigatorLog { | interface NavigatorLog { | ||
Line 35: | Line 34: | ||
DOMRequest clear(LogClearOptions coptions); // To clear the log for maintenance purposes | DOMRequest clear(LogClearOptions coptions); // To clear the log for maintenance purposes | ||
// Entries are always returned ordered by timestamp (desc) | // Entries are always returned ordered by timestamp (desc) | ||
DOMRequest find(optional | DOMRequest find(optional LogFindFilter filter,optional IteratorOptions iopts); | ||
attribute Function? onentryadded; // To listen for log changes | attribute Function? onentryadded; // To listen for log changes | ||
Line 43: | Line 42: | ||
[NoInterfaceObject] | [NoInterfaceObject] | ||
interface DOMIterator { | interface DOMIterator { | ||
DOMRequest next( | DOMRequest next(); // request to refresh the window of objects with the next | ||
DOMRequest prev(); // request to refresh the window of objects with the prev | |||
DOMRequest skipTo(unsigned long chunk); | |||
readonly attribute boolean hasMore; | |||
readonly attribute unsigned long count; // total number of objects | readonly attribute unsigned long count; // total number of objects | ||
readonly attribute any[] values; // Contains the current window of objects | readonly attribute any[]? values; // Contains the current window of objects | ||
readonly attribute chunkSize; | |||
}; | }; | ||
Line 114: | Line 115: | ||
var iterator = e.target.result; | var iterator = e.target.result; | ||
for(var c = 0; c < | var logEntries = iterator.values; | ||
for(var c = 0; c < logEntries.length; c++) { | |||
window.console.log('LogEntry: ', logEntries[c].type,logEntries[c].timestamp); | window.console.log('LogEntry: ', logEntries[c].type,logEntries[c].timestamp); | ||
} | } | ||
Line 123: | Line 125: | ||
} | } | ||
</pre> | </pre> | ||
[[Category:Web APIs]] |