Represents the result of a query selector, and provides various operations that perform actions over the elements of the collection.
T in Array<T>
Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
Adds the specified class to all the elements in the collection.
The name of the class to add.
This QueryCollection object.
Creates a QueryCollection that contains the children of the specified parent element.
The parent element.
The QueryCollection that contains the children of the element.
Clears the specified style property for all the elements in the collection.
The name of the style property to be cleared.
This QueryCollection object.
Combines two or more arrays.
Additional items to add to the end of array1.
Array<T>
Combines two or more arrays.
Additional items to add to the end of array1.
Array<T>
Creates controls that are attached to the elements in this QueryCollection, if the ctor parameter is a function, or configures the controls that are attached to the elements in this QueryCollection, if the ctor parameter is an object.
If this parameter is a function, it is a constructor function that is used to create controls to attach to the elements. If it is an object, it is the set of options passed to the controls.
The options passed to the newly-created controls.
This QueryCollection object.
Determines whether all the members of an array satisfy the specified test.
A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
boolean
Returns the elements of an array that meet the condition specified in a callback function.
A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Array<T>
Performs an action on each item in the QueryCollection.
The action to perform on each item.
The argument to bind to callbackFn.
The QueryCollection.
Gets an item from the QueryCollection.
The index of the item to return.
T in WinJS.Utilities.QueryCollection<T>
A single item from the collection.
Gets an attribute value from the first element in the collection.
The name of the attribute.
any
The value of the attribute.
Determines whether the specified class exists on the first element of the collection.
The name of the class.
boolean
true if the element has the specified class; otherwise, false.
Looks up an element by ID and wraps the result in a QueryCollection.
The ID of the element.
A QueryCollection that contains the element, if it is found.
Adds a set of items to this QueryCollection.
The items to add to the QueryCollection. This may be an array-like object, a document fragment, or a single item.
Adds a set of items to this QueryCollection.
The items to add to the QueryCollection. This may be an array-like object, a document fragment, or a single item.
Returns the index of the first occurrence of a value in an array.
The value to locate in the array.
The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
number
Adds all the elements of an array separated by the specified separator string.
A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
string
Returns the index of the last occurrence of a specified value in an array.
The value to locate in the array.
The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
number
Registers the listener for the specified event on all the elements in the collection.
The name of the event.
The event handler function to be called when the event occurs.
true if capture == true is to be passed to addEventListener; otherwise, false.
Calls a defined callback function on each element of an array, and returns an array that contains the results.
A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Array<U>
Removes the last element from an array and returns it.
T in Array<T>
Appends new elements to an array, and returns the new length of the array.
New elements of the Array.
number
Executes a query selector on all the elements in the collection and aggregates the result into a QueryCollection.
The query selector string.
A QueryCollection object containing the aggregate results of executing the query on all the elements in the collection.
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
T in Array<T>
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
U
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
T in Array<T>
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
U
Removes the specified class from all the elements in the collection.
The name of the class to be removed.
his QueryCollection object.
Unregisters the listener for the specified event on all the elements in the collection.
The name of the event.
The event handler function.
true if capture == true; otherwise, false.
This QueryCollection object.
Reverses the elements in an Array.
Array<T>
Sets an attribute value on all the items in the collection.
The name of the attribute to be set.
The value of the attribute to be set.
This QueryCollection object.
Sets the specified style property for all the elements in the collection.
The name of the style property.
The value for the property.
This QueryCollection object.
Removes the first element from an array and returns it.
T in Array<T>
Returns a section of an array.
The beginning of the specified portion of the array.
The end of the specified portion of the array.
Array<T>
Determines whether the specified callback function returns true for any element of an array.
A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
boolean
Sorts an array.
The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
Array<T>
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
The zero-based location in the array from which to start removing elements.
Array<T>
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
The zero-based location in the array from which to start removing elements.
The number of elements to remove.
Elements to insert into the array in place of the deleted elements.
Array<T>
Renders a template that is bound to the given data and parented to the elements included in the QueryCollection. If the QueryCollection contains multiple elements, the template is rendered multiple times, once at each element in the QueryCollection per item of data passed.
The DOM element to which the template control is attached.
The data to render. If the data is an array (or any other object that has a forEach method) then the template is rendered multiple times, once for each item in the collection.
If supplied, this function is called each time the template gets rendered, and is passed a promise that is fulfilled when the template rendering is complete.
The QueryCollection.
string
Returns a string representation of an array.
string
Toggles (adds or removes) the specified class on all the elements in the collection. If the class is present, it is removed; if it is absent, it is added.
The name of the class to be toggled.
This QueryCollection object.
Inserts new elements at the start of an array.
Elements to insert at the start of the Array.
number
A mixin that contains event-related functions.
Adds an event listener to the control.
Raises an event of the specified type and with the specified additional properties.
boolean
true if preventDefault was called on the event.
Removes an event listener from the control.
Gets whether the current script context has access to WinRT APIs.
Indicates whether the app is running on Windows Phone.
Adds the specified class to the specified element.
The element to which to add the class.
The name of the class to add.
T
The element.
Gets a collection of elements that are the direct children of the specified element.
The parent element.
The collection of children of the element.
Converts a CSS positioning string for the specified element to pixels.
The element.
The CSS positioning string.
number
The number of pixels.
Creates an object that has one event for each name passed to the function.
A variable list of property names.
any
The object with the specified properties. The names of the properties are prefixed with 'on'.
Gets the data value associated with the specified element.
The element.
any
The value associated with the element.
Disposes all first-generation disposable elements that are descendents of the specified element. The specified element itself is not disposed.
The root element whose sub-tree is to be disposed.
Removes all the child nodes from the specified element.
The element.
T
The element.
Determines whether the specified event occurred within the specified element.
The element.
The event.
boolean
true if the event occurred within the element; otherwise, false.
Adds tags and type to a logging message.
The message to be formatted.
The tag(s) to be applied to the message. Multiple tags should be separated by spaces.
The type of the message.
string
The formatted message.
Gets the height of the content of the specified element. The content height does not include borders or padding.
The element.
number
The content height of the element.
Gets the width of the content of the specified element. The content width does not include borders or padding.
The element.
number
The content width of the element.
Gets the leaf-level type or namespace specified by the name parameter.
The name of the member.
The root to start in. Defaults to the global object.
any
The leaf-level type or namespace in the specified parent namespace.
Gets the position of the specified element.
The element.
An object that contains the left, top, width and height properties of the element.
Gets the left coordinate of the specified element relative to the specified parent.
The element.
The parent element.
number
The relative left coordinate.
Gets the top coordinate of the element relative to the specified parent.
The element.
The parent element.
number
The relative top coordinate.
Gets the height of the element, including its margins.
The element.
number
The height of the element including margins.
Gets the width of the element, including margins.
The element.
number
The width of the element including margins.
Determines whether the specified element has the specified class.
The element.
The name of the class.
boolean
true if the element has the class, otherwise false.
Returns a collection with zero or one elements matching the specified id.
The ID of the element (or elements).
A collection of elements whose id matches the id parameter.
Calls insertAdjacentHTML on the specified element.
The element on which insertAdjacentHTML is to be called.
The position relative to the element at which to insert the HTML. Possible values are: beforebegin, afterbegin, beforeend, afterend.
The text to insert.
Calls insertAdjacentHTML on the specified element in the context of MSApp.execUnsafeLocalFunction.
The element on which insertAdjacentHTML is to be called.
The position relative to the element at which to insert the HTML. Possible values are: beforebegin, afterbegin, beforeend, afterend.
Value to be provided to insertAdjacentHTML.
Attaches the default dispose API wrapping the dispose implementation to the specified element.
The element to mark as disposable.
The function containing the element-specific dispose logic, called by the dispose function that markDisposable attaches.
Marks a function as being compatible with declarative processing. Declarative processing is performed by WinJS.UI.processAll or WinJS.Binding.processAll.
The function to be marked as compatible with declarative processing.
U
The input function, marked as compatible with declarative processing.
Returns a QueryCollection with zero or one elements matching the specified selector query.
The CSS selector to use. See Selectors for more information.
Optional. The root element at which to start the query. If this parameter is omitted, the scope of the query is the entire document.
A QueryCollection with zero or one elements matching the specified selector query.
Ensures that the specified function executes only after the DOMContentLoaded event has fired for the current page. The DOMContentLoaded event occurs after the page has been parsed but before all the resources are loaded.
A function that executes after the DOMContentLoaded event has occurred.
If true, the callback should be executed asynchronously.
A promise that completes after the DOMContentLoaded event has occurred.
Removes the specified class from the specified element.
The element from which to remove the class.
The name of the class to remove.
T
The element.
Asserts that the value is compatible with declarative processing. Declarative processing is performed by WinJS.UI.processAll or WinJS.Binding.processAll. If the value is not compatible, and strictProcessing is on, an exception is thrown. All functions that have been declared using WinJS.Class.define, WinJS.Class.derive, WinJS.UI.Pages.define, or WinJS.Binding.converter are automatically marked as supported for declarative processing. Any other function that you use from a declarative context (that is, a context in which an HTML element has a data-win-control or data-win-options attribute) must be marked manually by calling this function. When you mark a function as supported for declarative processing, you are guaranteeing that the code in the function is secure from injection of third-party content.
The value to be tested for compatibility with declarative processing. If the value is a function it must be marked with a property supportedForProcessing with a value of true when strictProcessing is on. For more information, see WinJS.Utilities.markSupportedForProcessing.
T
The input value.
Sets the innerHTML property of the specified element to the specified text.
The element on which the innerHTML property is to be set.
The value to be set to the innerHTML property.
Sets the innerHTML property of the specified element to the specified text.
The element on which the innerHTML property is to be set.
The value to be set to the innerHTML property.
Sets the outerHTML property of the specified element to the specified text.
The element on which the outerHTML property is to be set.
The value to be set to the outerHTML property.
Sets the outerHTML property of the specified element to the specified text in the context of MSApp.execUnsafeLocalFunction.
The element on which the outerHTML property is to be set.
The value to be set to the outerHTML property.
Configures a logger that writes messages containing the specified tags to the JavaScript console.
The tags for messages to log. Multiple tags should be separated by spaces. May contain type, tags, excludeTags and action properties.
Removes the WinJS logger that had previously been set up.
Toggles (adds or removes) the specified class on the specified element. If the class is present, it is removed; if it is absent, it is added.
The element on which to toggle the class.
The name of the class to toggle.
T
The element.