Loader Class

Ff748560.note(en-us,MSDN.10).gifNote:
Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

Represents a feature loader for the Windows Live Messenger Web Toolkit.

Script:  http://js.live.net/4.1/loader.js
Namespace:  Microsoft.Live.Core
 
Ff748560.alert_note(en-us,MSDN.10).gifNote

The JavaScript Library for Windows Live Messenger Connect is built by using the Microsoft Ajax Library. Microsoft Ajax exposes a type system that enables you to add object-oriented capabilities to your JavaScript code. To learn more about creating, instantiating, and deriving from classes, see Creating Custom Client Script by Using the Microsoft Ajax Library.

Microsoft.Live.Core.Loader = function();

Type.registerClass(
    'Microsoft.Live.Core.Loader');

The Loader is responsible for loading features within the Windows Live Messenger Web Toolkit. The Loader can be used to load features within the Messenger Web Toolkit as well as features within an application. By asynchronously downloading and loading features, the Loader improves the load time and perceived performance of applications.

Upon referencing the loader.js file, the Loader is initially the only type that is available for use. To initialize various settings within the Loader, use the initialize(LoaderSettings) method immediately after referencing the file.

To load specific features, use the load(String, Callback) method. With this method, an application can provide a callback that is invoked when all of the requested features have loaded. As an alternative to providing a callback to the load(String, Callback) method, an application can also pass functions to the onReady(Callback) method. These functions are invoked once the requested features have loaded.

A feature consists of a name for identification, a URL referencing a file and a list of features that the feature depends on. The Messenger Web Toolkit currently supports the following built-in features:

  • Messenger.Core: The core Messenger library. If an application has its own user interface, it will only need this feature.
  • Messenger.UI: The user interface tags. An application should use this feature if it takes advantage of UI tags.
  • Messenger.UI.Styles.Core: The core cascading style sheets for the user interface tags. An application should use this feature if it uses the UI tags and wishes to use default styling for them.
  • Microsoft.Ajax.Core: The core ASP.NET Ajax library. Both Messenger.Core and Messenger.UI depend on this feature. If an application is built using ASP.NET Ajax, it can depend on this feature.
  • Microsoft.Ajax.Globalization: The globalization ASP.NET Ajax library. Messenger.UI depends on this feature to handle locale-specific formatting. If an application is built using ASP.NET Ajax, it can depend on this feature.
  • ScriptSharp (deprecated): The Script# library. Prior versions of the Messenger Web Toolkit depended on this feature. It is supported here to enable backwards compatibility. If an application is built using Script#, it can depend on this feature.

The Loader is also capable of loading custom scripts defined by an application. To utilize this functionality, add scripts with the addScript(String, String, array<String>[]()[]) method and then load them with the load(String, Callback) method.

Object
  Microsoft.Live.Core..::.Loader

Windows Live Messenger Connect

Supported in: 4.1

Windows Live Messenger Web Toolkit

Supported in: 3.7, 3.5, 3.1, 3.0

Internet Explorer 8.0, Internet Explorer 7.0, Internet Explorer 6.0, Firefox 3.6, Firefox 3.5, Firefox 3.0, Firefox 2.0, Firefox 1.5, Chrome 4.0, Chrome 3.0, Chrome 2.0, Chrome 1.0, Safari 4.0, Safari 3.0, Opera 10.5

Show: