SearchBox.searchHistoryContext property

Applies to Windows only

Gets or sets the search history context. This context is used a secondary key (the app ID is the primary key) for storing search history.

Syntax


<div 
    data-win-control="WinJS.UI.SearchBox" 
    data-win-options="{ searchHistoryContext : value}" >
</div>


var searchHistoryContext = searchBox.searchHistoryContext;
searchBox.searchHistoryContext = searchHistoryContext;

Property value

Type: String

The search history context.

Remarks

An app can use the search history context string to store different search histories based on the context of the application. If you don't set this property, the system assumes that all searches in your app occur in the same context. If you update this property while the search pane is open with suggestions showing, the changes won't take effect until the user enters the next character.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

WinJS.UI

Library

Ui.js

See also

SearchBox

 

 

Show:
© 2014 Microsoft