Table of Contents

Class ContentIndex

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The ContentIndex interface of the Content Index API allows developers to register their offline enabled content with the browser.
[Value("ContentIndex")]
public class ContentIndex
Inheritance
ContentIndex
Inherited Members

Remarks

Constructors

ContentIndex()

public ContentIndex()

Methods

Add(ContentDescription)

NOTE
Experimental
The add() method of the
ContentIndex interface registers an item with the content index.
[Value("add")]
public Task<GlobalObject.Undefined> Add(ContentDescription description)

Parameters

description ContentDescription

Returns

Task<GlobalObject.Undefined>

Returns a Promise that resolves with undefined.

Remarks

Delete(string)

NOTE
Experimental
The delete() method of the
ContentIndex interface unregisters an item from the currently indexed
content.
[Value("delete")]
public Task<GlobalObject.Undefined> Delete(string id)

Parameters

id string

Returns

Task<GlobalObject.Undefined>

Returns a Promise that resolves with undefined.

Remarks

NOTE

Calling delete() only affects the index. It does not delete anything
from the 'Cache'.

-An introductory article on the Content Index API
-Service Worker API, along with information about Cache and CacheStorage

See also on MDN

GetAll()

NOTE
Experimental
The getAll() method of the
ContentIndex interface returns a {{jsxref('Promise')}} that resolves with
an iterable list of content index entries.
[Value("getAll")]
public Task<List<ContentDescription>> GetAll()

Returns

Task<List<ContentDescription>>

Returns a Promise that resolves with an 'Array' of
contentDescription items.

Remarks