Combined xrm and clientglobalcontext definitions

Pushed the clientglobalcontext.d.ts definitions into the main xrm.d.ts
(and associated version branches), to eliminate the need for manually
adjusting it to select the correct version, via its <reference> header.
This was simply a bad design choice on my part.  Care should be taken,
though, to avoid using the "GetGlobalContext" method without having
first added ClientGlobalContext.js.aspx to the script sources of the
page--as always.
This commit is contained in:
David Berry
2015-08-16 12:45:04 -06:00
parent ed6e9dd55e
commit 0bc724912c
4 changed files with 24 additions and 14 deletions
-14
View File
@@ -1,14 +0,0 @@
// Type definitions for Microsoft Dynamics xRM ClientGlobalContext.js.aspx
// Project: http://msdn.microsoft.com/en-us/library/gg328255.aspx
// Definitions by: David Berry <https://github.com/6ix4our/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="xrm.d.ts" />
/**
* Gets the xRM application context, for HTML web resources
* @returns {Xrm.Context} The application context for the user's current session.
* @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will
* cancel the onselectstart, contextmenu, and ondragstart events.
*/
declare function GetGlobalContext(): Xrm.Context;
+8
View File
@@ -2069,3 +2069,11 @@ declare module Xrm
export function openWebResource( webResourceName: string, webResourceData?: string, width?: number, height?: number ): Window;
}
}
/**
* Gets the xRM application context, for HTML web resources, included by ClientGlobalContext.js.aspx
* @returns {Xrm.Context} The application context for the user's current session.
* @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will
* cancel the onselectstart, contextmenu, and ondragstart events.
*/
declare function GetGlobalContext(): Xrm.Context;
+8
View File
@@ -2348,3 +2348,11 @@ declare module Xrm
export function openWebResource( webResourceName: string, webResourceData?: string, width?: number, height?: number ): Window;
}
}
/**
* Gets the xRM application context, for HTML web resources, included by ClientGlobalContext.js.aspx
* @returns {Xrm.Context} The application context for the user's current session.
* @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will
* cancel the onselectstart, contextmenu, and ondragstart events.
*/
declare function GetGlobalContext(): Xrm.Context;
+8
View File
@@ -2584,3 +2584,11 @@ declare module Xrm
export function openWebResource( webResourceName: string, webResourceData?: string, width?: number, height?: number ): Window;
}
}
/**
* Gets the xRM application context, for HTML web resources, included by ClientGlobalContext.js.aspx
* @returns {Xrm.Context} The application context for the user's current session.
* @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will
* cancel the onselectstart, contextmenu, and ondragstart events.
*/
declare function GetGlobalContext(): Xrm.Context;