mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-11 20:21:03 +00:00
Update std.js
This commit is contained in:
parent
3e86686613
commit
4a2fd7943a
30
lib/std.js
30
lib/std.js
|
@ -1,15 +1,9 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// std.js
|
||||
//
|
||||
// Common routines. Defines LIB object which contains the API, as well as
|
||||
// a global DBG function.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// std.js
|
||||
// Common routines. Defines LIB object which contains the API.
|
||||
// Namhyeon Go <abuse@catswords.net>
|
||||
// https://github.com/gnh1201/welsonjs
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Polyfills
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
if (!Function.prototype.GetResource) {
|
||||
Function.prototype.GetResource = function(ResourceName) {
|
||||
if (!this.Resources) {
|
||||
|
@ -65,10 +59,7 @@ if (typeof Enumerator !== "undefined") {
|
|||
};
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Global APIs
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function GetResource(ResourceName) {
|
||||
return arguments.callee.caller.GetResource(ResourceName);
|
||||
}
|
||||
|
@ -260,14 +251,9 @@ function addslashes(s) {
|
|||
replace(/"/g, '\\"');
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Private APIs / Utility functions
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Emulate Server.CreateObject
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function CreateObject(progId, serverName, callback) {
|
||||
var progIds = [];
|
||||
var _CreateObject = function(p, s) {
|
||||
|
@ -562,12 +548,6 @@ function StdStorage() {
|
|||
};
|
||||
}
|
||||
|
||||
/*
|
||||
var a = new StdStorage();
|
||||
a.setItem("a", "1");
|
||||
console.log(a.getItem("a"));
|
||||
*/
|
||||
|
||||
global.GetResource = GetResource;
|
||||
global.sleep = sleep;
|
||||
global.repeat = repeat;
|
||||
|
@ -585,7 +565,7 @@ exports.Storage = StdStorage;
|
|||
exports.alert = alert;
|
||||
exports.confirm = confirm;
|
||||
|
||||
exports.VERSIONINFO = "Standard Library (std.js) version 0.8.4";
|
||||
exports.VERSIONINFO = "WelsonJS Standard Library (std.js) version 0.8.5";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user