1/******/ (() => { // webpackBootstrap 2/* Find any element which has a 'data-onload' function and load that to simulate an onload. 3 * This allows us to put fake onload event son things like DEV's and inputs. 4 * The main use would be when you need to setup some javascript which requires the asp.net ClientID 5 * passed into it. Saves a ton of messy code behind and DOM magic storing classes in the DOM. 6 */ 7jQuery(document).ready(function () { 8 jQuery('[data-onload]').each(function () { 9 eval(jQuery(this).data('onload')); 10 }); 11}); 12 13// IE 11 polyfill for CustomEvent 14(function () { 15 if (typeof window.CustomEvent === "function") return false; 16 function CustomEvent(event, params) { 17 params = params || { 18 bubbles: false, 19 cancelable: false, 20 detail: null 21 }; 22 var evt = document.createEvent('CustomEvent'); 23 evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); 24 return evt; 25 } 26 window.CustomEvent = CustomEvent; 27})(); 28var registerDoSubmitSubscription = function registerDoSubmitSubscription(submitButtonClientName) { 29 var isCardinalDone = false; 30 var isPayCentralDone = false; 31 // We're going to use events to allow the interception of the submit button 32 // We do not directly call the submit button now, the firing of this event does the postback 33 // (after all other checks have been made: such as validation and 3DS) 34 // This is the last step after all the client side work 35 document.addEventListener("doSubmit", function () { 36 isCardinalDone = true; 37 handlePostBack(); 38 //WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(submitButtonClientId, "", true, "", "", false, true)); 39 // or 40 }); 41 document.addEventListener("doSubmitPayCentral", function () { 42 isPayCentralDone = true; 43 handlePostBack(); 44 }); 45 function handlePostBack() { 46 if (isCardinalDone && (isPayCentralDone || !window.PayCentralAdapter)) __doPostBack(submitButtonClientName, ''); 47 } 48}; 49 50// Fire an event, a hook, which happens right before we'll POST the page to submit the payment/comboOrder. 51var fireBeforeSubmitEvent = function fireBeforeSubmitEvent(submitButtonClientId) { 52 var submitButton = document.getElementById(submitButtonClientId); 53 var event = new CustomEvent("beforeSubmit", { 54 bubbles: true, 55 detail: { 56 submitButtonId: submitButtonClientId 57 } 58 }); 59 submitButton.dispatchEvent(event); 60}; 61 62//Register on for access from the global DOM (this file is our application entry point) 63window.SubmitOrderButtonLinkDisplay = { 64 registerDoSubmitSubscription: registerDoSubmitSubscription, 65 fireBeforeSubmitEvent: fireBeforeSubmitEvent 66}; 67/******/ })() 68; 69//# sourceMappingURL=SubmitOrderButtonLinkDisplay.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.