WinJS.Utilities Namespace
Provides helper functions, for example, functions to add and remove CSS classes.
The WinJS.Utilities namespace has these types of members:
- Enumerations
- Objects
- Functions
Enumerations
Enumeration | Description |
---|---|
Defines a set of keyboard values. |
Objects
Object | Description |
---|---|
A mixin that contains event-related functions. |
|
Represents the result of a query selector, and provides various operations that perform actions over the elements of the collection. |
Functions
Function | Description |
---|---|
Adds the specified class to the specified element. |
|
Gets a collection of elements that are the direct children of the specified element. |
|
Converts a CSS positioning string for the specified element to pixels. |
|
Creates an object that has one event for each name passed to the function. |
|
Gets the data value associated with the specified element. |
|
Disposes all first-generation disposable elements that are descendents of the specified element. The specified element itself is not disposed. |
|
Removes all the child nodes from the specified element. |
|
Determines whether the specified event occurred within the specified element. |
|
Adds tags and type to a logging message. |
|
Gets the height of the content of the specified element. The content height does not include borders or padding. |
|
Gets the width of the content of the specified element. The content width does not include borders or padding. |
|
Gets the leaf-level type or namespace specified by the name parameter. |
|
Gets the position of the specified element. |
|
Gets the left coordinate of the specified element relative to the specified parent. |
|
Gets the top coordinate of the element relative to the specified parent. |
|
Gets the height of the element, including its margins. |
|
Gets the width of the element, including margins. |
|
Determines whether the specified element has the specified class. |
|
Returns a collection with zero or one elements matching the specified id. |
|
Calls insertAdjacentHTML on the specified element. |
|
Calls insertAdjacentHTML on the specified element in the context of MSApp.execUnsafeLocalFunction. |
|
Attaches the default dispose API wrapping the dispose implementation to the specified element. |
|
Marks a function as being compatible with declarative processing. Declarative processing is performed by WinJS.UI.processAll or WinJS.Binding.processAll. |
|
Returns 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. |
|
Removes the specified class from the specified 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. |
|
Sets the innerHTML property of the specified element to the specified text. |
|
Sets the innerHTML property of the specified element to the specified text. |
|
Sets the outerHTML property of the specified element to the specified text. |
|
Sets the outerHTML property of the specified element to the specified text in the context of MSApp.execUnsafeLocalFunction. |
|
Configures a logger that writes messages containing the specified tags to the JavaScript console. |
|
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. |
Requirements
Minimum WinJS version |
WinJS 1.0 |
Namespace |
WinJS.Utilities |