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