-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XHR/Fetch enhancement for office - add additional telemetry from wind…
…ow.performance #1194
- Loading branch information
Nev Wylie
committed
Feb 26, 2020
1 parent
2019361
commit 404eda5
Showing
39 changed files
with
2,840 additions
and
1,171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
function ModuleLoader(config) { | ||
|
||
if (config) { | ||
require.config(config); | ||
} | ||
|
||
var requiredModules = []; | ||
|
||
function processModules() { | ||
if (requiredModules.length > 0) { | ||
var module = requiredModules.shift(); | ||
if (module.prepare) { | ||
module.prepare(); | ||
} | ||
|
||
if (module.config) { | ||
require.config(config); | ||
} | ||
|
||
require([module.path], function (theModule) { | ||
if (module.run) { | ||
module.run(theModule); | ||
} else { | ||
console && console.log("Loaded module - " + module.name + " from " + module.path); | ||
define(module.name, function() { | ||
if (module.asDefault) { | ||
console && console.log("Returning default module - " + module.name); | ||
return { | ||
"default": theModule | ||
} | ||
} | ||
console && console.log("Returning module - " + module.name); | ||
return theModule | ||
}); | ||
} | ||
|
||
processModules(); | ||
}, | ||
function (err) { | ||
console && console.log("Failed to load [" + module.name + "] from [" + module.path + "]\n - Require ERROR: " + err.toString()); | ||
if (module.path.toLowercase() !== module.path) { | ||
console && console.log(" ** Validate the path it may need to be all lowercase -- " + module.path); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
function addModule(name, path, asDefault) { | ||
var moduleDef = { | ||
name: name, | ||
path: !path ? name : path, | ||
asDefault: asDefault | ||
} | ||
|
||
requiredModules.push(moduleDef); | ||
|
||
return moduleDef; | ||
} | ||
|
||
return { | ||
add: addModule, | ||
run: processModules | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.