Loader Class

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

Script:  http://www.wlmessenger.net/api/3.7/loader.js
Namespace:  Microsoft.Live.Core
 
Dd570572.alert_note(en-us,MSDN.10).gifNote

The Windows Live Messenger Web Toolkit is built using the ASP.NET Ajax Library. ASP.NET 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, visit Creating Custom Client Script by Using the ASP.NET 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, String[]) method and then load them with the Load(String, Callback) method.

Object
  Microsoft.Live.Core.Loader

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.5, Firefox 3.0, Firefox 2.0, Firefox 1.5, Chrome 3.0, Chrome 2.0, Chrome 1.0, Safari 4.0, Safari 3.0

Show: