📄 scriptresource(3).axd
字号:
return this._events;
}
function Sys$WebForms$PageRequestManager$get_isInAsyncPostBack() {
/// <value type="Boolean" locid="P:J#Sys.WebForms.PageRequestManager.isInAsyncPostBack"></value>
if (arguments.length !== 0) throw Error.parameterCount();
return this._request !== null;
}
function Sys$WebForms$PageRequestManager$add_beginRequest(handler) {
/// <summary locid="E:J#Sys.WebForms.PageRequestManager.beginRequest" />
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().addHandler("beginRequest", handler);
}
function Sys$WebForms$PageRequestManager$remove_beginRequest(handler) {
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().removeHandler("beginRequest", handler);
}
function Sys$WebForms$PageRequestManager$add_endRequest(handler) {
/// <summary locid="E:J#Sys.WebForms.PageRequestManager.endRequest" />
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().addHandler("endRequest", handler);
}
function Sys$WebForms$PageRequestManager$remove_endRequest(handler) {
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().removeHandler("endRequest", handler);
}
function Sys$WebForms$PageRequestManager$add_initializeRequest(handler) {
/// <summary locid="E:J#Sys.WebForms.PageRequestManager.initializeRequest" />
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().addHandler("initializeRequest", handler);
}
function Sys$WebForms$PageRequestManager$remove_initializeRequest(handler) {
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().removeHandler("initializeRequest", handler);
}
function Sys$WebForms$PageRequestManager$add_pageLoaded(handler) {
/// <summary locid="E:J#Sys.WebForms.PageRequestManager.pageLoaded" />
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().addHandler("pageLoaded", handler);
}
function Sys$WebForms$PageRequestManager$remove_pageLoaded(handler) {
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().removeHandler("pageLoaded", handler);
}
function Sys$WebForms$PageRequestManager$add_pageLoading(handler) {
/// <summary locid="E:J#Sys.WebForms.PageRequestManager.pageLoading" />
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().addHandler("pageLoading", handler);
}
function Sys$WebForms$PageRequestManager$remove_pageLoading(handler) {
var e = Function._validateParams(arguments, [{name: "handler", type: Function}]);
if (e) throw e;
this._get_eventHandlerList().removeHandler("pageLoading", handler);
}
function Sys$WebForms$PageRequestManager$abortPostBack() {
if (!this._processingRequest && this._request) {
this._request.get_executor().abort();
this._request = null;
}
}
function Sys$WebForms$PageRequestManager$_cancelPendingCallbacks() {
// DevDiv Bugs 125825: To avoid EVENTVALIDATION corruption we must cancel pending callbacks when an async postback begins
// to cancel callbacks, we run logic similar to WebForm_CallbackComplete,
// except we do not run WebForm_ExecuteCallback for them. This code is exactly
// WebForm_CallbackComplete except without the call to WebForm_ExecuteCallback.
// We are basically treating each callback as completed, ignoring the response if any.
for (var i = 0, l = window.__pendingCallbacks.length; i < l; i++) {
var callback = window.__pendingCallbacks[i];
if (callback) {
if (!callback.async) {
// we just cancelled the single allowed instance of a synchronous callback
window.__synchronousCallBackIndex = -1;
}
window.__pendingCallbacks[i] = null;
var callbackFrameID = "__CALLBACKFRAME" + i;
var xmlRequestFrame = document.getElementById(callbackFrameID);
if (xmlRequestFrame) {
xmlRequestFrame.parentNode.removeChild(xmlRequestFrame);
}
}
}
}
function Sys$WebForms$PageRequestManager$_createPageRequestManagerTimeoutError() {
// Creates a PageRequestManagerTimeoutException representing a request that timed out.
var displayMessage = "Sys.WebForms.PageRequestManagerTimeoutException: " + Sys.WebForms.Res.PRM_TimeoutError;
var e = Error.create(displayMessage, {name: 'Sys.WebForms.PageRequestManagerTimeoutException'});
e.popStackFrame();
return e;
}
function Sys$WebForms$PageRequestManager$_createPageRequestManagerServerError(httpStatusCode, message) {
// Creates a PageRequestManagerServerErrorException representing an error that occurred on the server.
var displayMessage = "Sys.WebForms.PageRequestManagerServerErrorException: " +
(message || String.format(Sys.WebForms.Res.PRM_ServerError, httpStatusCode));
var e = Error.create(displayMessage, {
name: 'Sys.WebForms.PageRequestManagerServerErrorException',
httpStatusCode: httpStatusCode
});
e.popStackFrame();
return e;
}
function Sys$WebForms$PageRequestManager$_createPageRequestManagerParserError(parserErrorMessage) {
// Creates a PageRequestManagerParserErrorException representing a parser error that occurred while processing a response from the server.
var displayMessage = "Sys.WebForms.PageRequestManagerParserErrorException: " + String.format(Sys.WebForms.Res.PRM_ParserError, parserErrorMessage);
var e = Error.create(displayMessage, {name: 'Sys.WebForms.PageRequestManagerParserErrorException'});
e.popStackFrame();
return e;
}
function Sys$WebForms$PageRequestManager$_createPostBackSettings(async, panelID, sourceElement) {
return { async:async, panelID:panelID, sourceElement:sourceElement };
}
function Sys$WebForms$PageRequestManager$_convertToClientIDs(source, destinationIDs, destinationClientIDs) {
if (source) {
for (var i = 0; i < source.length; i++) {
Array.add(destinationIDs, source[i]);
Array.add(destinationClientIDs, this._uniqueIDToClientID(source[i]));
}
}
}
function Sys$WebForms$PageRequestManager$_destroyTree(element) {
// We only need to walk into children collections if this node is an element
if (element.nodeType === 1) {
// We can't just set innerHTML to "" because we have to walk through
// all children in order to dispose script that may be associated with them.
var childNodes = element.childNodes;
for (var i = childNodes.length - 1; i >= 0; i--) {
var node = childNodes[i];
if (node.nodeType === 1) {
if (node.dispose && typeof(node.dispose) === "function") {
node.dispose();
}
else if (node.control && typeof(node.control.dispose) === "function") {
node.control.dispose();
}
var behaviors = Sys.UI.Behavior.getBehaviors(node);
for (var j = behaviors.length - 1; j >= 0; j--) {
behaviors[j].dispose();
}
this._destroyTree(node);
}
}
}
}
function Sys$WebForms$PageRequestManager$dispose() {
if (this._form) {
Sys.UI.DomEvent.removeHandler(this._form, 'submit', this._onFormSubmitHandler);
Sys.UI.DomEvent.removeHandler(this._form, 'click', this._onFormElementClickHandler);
Sys.UI.DomEvent.removeHandler(window, 'unload', this._onWindowUnloadHandler);
Sys.UI.DomEvent.removeHandler(window, 'load', this._pageLoadedHandler);
}
if (this._originalDoPostBack) {
window.__doPostBack = this._originalDoPostBack;
this._originalDoPostBack = null;
}
if (this._originalDoPostBackWithOptions) {
window.WebForm_DoPostBackWithOptions = this._originalDoPostBackWithOptions;
this._originalDoPostBackWithOptions = null;
}
if (this._originalFireDefaultButton) {
window.WebForm_FireDefaultButton = this._originalFireDefaultButton;
this._originalFireDefaultButton = null;
}
if (this._originalDoCallback) {
window.WebForm_DoCallback = this._originalDoCallback;
this._originalDoCallback = null;
}
this._form = null;
this._updatePanelIDs = null;
this._oldUpdatePanelIDs = null;
this._childUpdatePanelIDs = null;
this._updatePanelClientIDs = null;
this._asyncPostBackControlIDs = null;
this._asyncPostBackControlClientIDs = null;
this._postBackControlIDs = null;
this._postBackControlClientIDs = null;
this._asyncPostBackTimeout = null;
this._scrollPosition = null;
this._dataItems = null;
}
function Sys$WebForms$PageRequestManager$_doCallback(eventTarget, eventArgument, eventCallback, context, errorCallback, useAsync) {
// DevDiv Bugs 125825: Do not allow callbacks to begin while an async postback is in progress to prevent EVENTVALIDATION corruption
if (!this.get_isInAsyncPostBack()) {
this._originalDoCallback(eventTarget, eventArgument, eventCallback, context, errorCallback, useAsync);
}
}
function Sys$WebForms$PageRequestManager$_doPostBack(eventTarget, eventArgument) {
this._additionalInput = null;
var form = this._form;
if ((eventTarget === null) || (typeof(eventTarget) === "undefined") || (this._isCrossPost)) {
// Allow the default form submit to take place. Since it's a cross-page postback.
// DevDiv 80942: we should fall to a full postback if event target is null or undefined
this._postBackSettings = this._createPostBackSettings(false, null, null);
// set to false so subsequent posts that don't go through DPWO aren't considered cross post
this._isCrossPost = false;
}
else {
// If it's not a cross-page post, see if we can find the DOM element that caused the postback
var clientID = this._uniqueIDToClientID(eventTarget);
var postBackElement = document.getElementById(clientID);
if (!postBackElement) {
// If the control has no matching DOM element we look for an exact
// match from RegisterAsyncPostBackControl or RegisterPostBackControl.
// If we can't find anything about it then we do a search based on
// naming containers to still try and find a match.
if (Array.contains(this._asyncPostBackControlIDs, eventTarget)) {
// Exact match for async postback
this._postBackSettings = this._createPostBackSettings(true, this._scriptManagerID + '|' + eventTarget, null);
}
else {
if (Array.contains(this._postBackControlIDs, eventTarget)) {
// Exact match for regular postback
this._postBackSettings = this._createPostBackSettings(false, null, null);
}
else {
// Find nearest element based on UniqueID in case the element calling
// __doPostBack doesn't have an ID. GridView does this for its Update
// button and without this we can't do async postbacks.
var nearestUniqueIDMatch = this._findNearestElement(eventTarget);
if (nearestUniqueIDMatch) {
// We found a related parent element, so walk up the DOM to find out what kind
// of postback we should do.
this._postBackSettings = this._getPostBackSettings(nearestUniqueIDMatch, eventTarget);
}
else {
// Can't find any DOM element at all related to the eventTarget,
// so we just give up and do a regular postback.
this._postBackSettings = this._createPostBackSettings(false, null, null);
}
}
}
}
else {
// The element was found, so walk up the DOM to find out what kind
// of postback we should do.
this._postBackSettings = this._getPostBackSettings(postBackElement, eventTarget);
}
}
if (!this._postBackSettings.async) {
// Temporarily restore the form's onsubmit handler expando while calling
// the original ASP.NET 2.0 __doPostBack() function.
form.onsubmit = this._onsubmit;
this._originalDoPostBack(eventTarget, eventArgument);
form.onsubmit = null;
return;
}
form.__EVENTTARGET.value = eventTarget;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -