Module UI

Index

Variables

Enumerations

Classes

Variables

DomElement: DomElement

Defines static methods and properties that provide helper APIs for manipulating and inspecting DOM elements.

see

{@link http://msdn.microsoft.com/en-us/library/bb383788(v=vs.100).aspx}

public addCssClass(element: DomElement, className: string)

Adds a CSS class to a DOM element if the class is not already part of the DOM element. This member is static and can be invoked without creating an instance of the class. If the element does not support a CSS class, no change is made to the element.

Parameters

  • element: DomElement
            The Sys.UI.DomElement object to add the CSS class to.
    
  • className: string
            The name of the CSS class to add.
    

public constructor()

Initializes a new instance of the Sys.UI.DomElement class.

public containsCssClass(element: DomElement, className: string): boolean

Gets a value that indicates whether the DOM element contains the specified CSS class. This member is static and can be invoked without creating an instance of the class.

Parameters

  • element: DomElement
         The Sys.UI.DomElement object to test for the CSS class.
    
  • className: string
         The name of the CSS class to test for.
    

Returns

boolean

     true if the element contains the specified CSS class; otherwise, false.

public getBounds(element: DomElement): Object

Gets a set of integer coordinates that represent the position, width, and height of a DOM element. This member is static and can be invoked without creating an instance of the class.

Parameters

  • element: DomElement
         The Sys.UI.DomElement instance to get the coordinates of.
    

Returns

Object

 An object of the JavaScript type Object that contains the x-coordinate and y-coordinate of the upper-left corner, the width, and the height of the element in pixels.

public getElementById(id: string): DomElement

Parameters

  • id: string
     The ID of the element to find.
    

Returns

DomElement

public getElementById(id: string, element?: DomElement): DomElement

Parameters

Returns

DomElement

public getElementById(id: string, element?: HTMLElement): HTMLElement

Parameters

  • id: string
  • element?: HTMLElement optional

Returns

HTMLElement

public getElementById(id: string, element: any): any

Parameters

  • id: string
  • element: any

Returns

any

public getLocation(element: DomElement): Point

Gets the absolute position of a DOM element relative to the upper-left corner of the owner frame or window. This member is static and can be invoked without creating an instance of the class. *

Parameters

Returns

Point

 An object of the JavaScript type Object that contains the x-coordinate and y-coordinate of the element in pixels.

public getLocation(element: any): Object

Parameters

  • element: any

Returns

Object

public getVisibilityMode(element: DomElement): VisibilityMode

Parameters

Returns

VisibilityMode

public getVisibilityMode(element: any): VisibilityMode

Parameters

  • element: any

Returns

VisibilityMode

public getVisible(element: any): boolean

Gets a value that indicates whether a DOM element is currently visible on the Web page. This member is static and can be invoked without creating an instance of the class.

Parameters

  • element: any
     The target DOM element.
    

Returns

boolean

 true if element is visible on the Web page; otherwise, false

public isDomElement(obj: any): boolean

Determines whether the specified object is a DOM element.

Parameters

  • obj: any
     An object
    

Returns

boolean

 true if the object is a DOM element; otherwise, false.

public raiseBubbleEvent(source: DomElement, args: EventArgs)

Raises a bubble event. A bubble event causes an event to be raised and then propagated up the control hierarchy until it is handled.

Parameters

  • source: DomElement
     The DOM element that triggers the event.
    
  • args: EventArgs
     The event arguments
    

public raiseBubbleEvent(source: any, args: any)

Parameters

  • source: any
  • args: any

public removeCssClass(element: DomElement, className: string)

Removes a CSS class from a DOM element. This member is static and can be invoked without creating an instance of the class. If the element does not include a CSS class, no change is made to the element.

Parameters

  • element: DomElement
         The Sys.UI.DomElement object to remove the CSS class from.
    
  • className: string
         The name of the CSS class to remove.
    

public removeCssClass(element: HTMLElement, className: string)

Parameters

  • element: HTMLElement
  • className: string

public removeCssClass(element: any, className: string)

Parameters

  • element: any
  • className: string

public resolveElement(elementOrElementId: DomElement, containerElement?: DomElement): DomElement

Returns the element that has either the specified ID in the specified container, or is the specified element itself. The resolveElement method is used to verify that an ID or an object can be resolved as an element. *

Parameters

  • elementOrElementId: DomElement
         The element to resolve, or the ID of the element to resolve. This parameter can be null.
    
  • containerElement?: DomElement optional
         (Optional) The specified container.
    

Returns

DomElement

 A DOM element.

public resolveElement(elementOrElementId: HTMLElement, containerElement?: HTMLElement): HTMLElement

Parameters

  • elementOrElementId: HTMLElement
  • containerElement?: HTMLElement optional

Returns

HTMLElement

public resolveElement(elementOrElementId: string): any

Parameters

  • elementOrElementId: string

Returns

any

public setLocation(element: DomElement, x: number, y: number)

Sets the position of a DOM element. This member is static and can be invoked without creating an instance of the class. he left and top style attributes (upper-left corner) of an element specify the relative position of an element. The actual position will depend on the offsetParent property of the target element and the positioning mode of the element. *

Parameters

  • element: DomElement

    The target element.

  • x: number

    The x-coordinate in pixels.

  • y: number

    The y-coordinate in pixels.

public setLocation(element: HTMLElement, x: number, y: number)

Parameters

  • element: HTMLElement
  • x: number
  • y: number

public setLocation(element: any, x: number, y: number)

Parameters

  • element: any
  • x: number
  • y: number

public setVisibilityMode(element: DomElement, value: VisibilityMode)

Sets the layout characteristics of a DOM element when it is hidden by invoking the Sys.UI.DomElement.setVisible method. This member is static and can be invoked without creating an instance of the class.

Use the setVisibilityMode method to set the layout characteristics of a DOM element when it is hidden by invoking the Sys.UI.DomElement.setVisible method. For example, if value is set to Sys.UI.VisibilityMode.collapse, the element uses no space on the page when the setVisible method is called to hide the element.

Parameters

public setVisible(element: DomElement, value: boolean)

Sets a DOM element to be visible or hidden. This member is static and can be invoked without creating an instance of the class.

Use the setVisible method to set a DOM element as visible or hidden on the Web page. If you invoke this method with value set to false for an element whose visibility mode is set to "hide," the element will not be visible. However, it will occupy space on the page. If the element's visibility mode is set to "collapse," the element will occupy no space in the page. For more information about how to set the layout characteristics of hidden DOM elements, see Sys.UI.DomElement setVisibilityMode Method.

Parameters

  • element: DomElement
     The target DOM element.
    
  • value: boolean
     true to make element visible on the Web page; false to hide element.
    

public setVisible(element: HTMLElement, value: boolean)

Parameters

  • element: HTMLElement
  • value: boolean

public setVisible(element: any, value: boolean)

Parameters

  • element: any
  • value: boolean

public toggleCssClass(element: DomElement, className: string)

Toggles a CSS class in a DOM element. This member is static and can be invoked without creating an instance of the class. Use the toggleCssClass method to hide a CSS class of an element if it is shown, or to show a CSS class of an element if it is hidden.

Parameters

  • element: DomElement
         The Sys.UI.DomElement object to toggle.
    
  • className: string
         The name of the CSS class to toggle.
    

public toggleCssClass(element: HTMLElement, className: string)

Parameters

  • element: HTMLElement
  • className: string

public toggleCssClass(element: any, className: string)

Parameters

  • element: any
  • className: string