Share via


Ewa.EwaControl.remove_applicationReady(function)

Applies to: apps for SharePoint | SharePoint Server 2010

Unsubscribes the specified event handler from the [applicationReady] event.

Ewa.EwaControl.remove_applicationReady(function);

Parameters

function

The event handler to unsubscribe to the event.

Return Value

None.

Example

The following code example shows how to unsubscribe the specified event handler from the [applicationReady] event.

<script type="text/javascript">

var ewa = null;

// Add event handler for onload event.
if (window.attachEvent) 
{ 
    window.attachEvent("onload", ewaOmPageLoad);    
} 
else 
{ 
    window.addEventListener("DOMContentLoaded", ewaOmPageLoad, false); 
}

// Add event handler for applicationReady event.
function ewaOnPageLoad()
{
    if (typeof (Ewa) != "undefined")
    {
        Ewa.EwaControl.add_applicationReady(ewaApplicationReady);
    }
    else
    {
        alert("Error - the EWA JS is not loaded.");
    }
    // ...
}

function myFunction ()
{
    // Remove event handler from applicationReady.
    ewa.remove_applicationReady(ewaApplicationReady);

    // ...
}
</script>

See Also

Reference

Ewa.EwaControl.add_applicationReady(function)

Concepts

Ewa.EwaControl Methods

Ewa Namespace