Browser APIs pertaining to the browser’s New Tab Page tiles.
Kind: global class
objectfunctionAdd an observer to be notified when the browser’s New Tab Page tiles have changed. If available, the provided callback is triggered immediately with browser’s current New Tab Page tiles.
Kind: instance method of TilesAPI
| Param | Type | Description |
|---|---|---|
| observer | TilesChangedCallback |
Callback triggered when the browser’s New Tab Page tiles have changed. |
Add a custom New Tab Page tile to the user’s profile. If successful, all registered observers will be notified.
Kind: instance method of TilesAPI
| Param | Type | Description |
|---|---|---|
| url | string |
URL of the custom tile to add. |
| title | string |
Name that should be displayed with the tile. |
Remove a custom New Tab Page tile from the user’s profile. If successful, all registered observers will be notified.
Kind: instance method of TilesAPI
| Param | Type | Description |
|---|---|---|
| url | string |
URL of the custom tile to remove. |
Edit a custom New Tab Page tile in the user’s profile. If successful, all registered observers will be notified.
Kind: instance method of TilesAPI
| Param | Type | Description |
|---|---|---|
| oldUrl | string |
URL of the custom tile to edit. |
| newUrl | string |
New URL of the custom tile. |
| newTitle | string |
New title of the custom tile. |
objectA single New Tab page tile.
Kind: static typedef of TilesAPI
Properties
| Name | Type | Description |
|---|---|---|
| url | string |
URL of the target site. |
| title | string |
Name that should be displayed with the tile. |
| favicon_url | string |
URL of the favicon for the target site. |
functionCallback triggered when browser’s New Tab Page tiles have changed.
Kind: static typedef of TilesAPI
| Param | Type | Description |
|---|---|---|
| tiles | Array.<Tile> |
The browser’s new New Tab Page tiles. |