Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

remove 'host'

  • Loading branch information...
commit 41fdf70641a828119b6b673de008f4efa49dcebf 1 parent 3381716
Dexter.Yy authored December 02, 2012
3  README.md
Source Rendered
@@ -44,7 +44,7 @@ title: Mo
44 44
 
45 45
 ## Get the code
46 46
 
47  
-* [View/download on Github](https://github.com/dexteryy/moui/blob/master/)
  47
+* [View/download on Github](https://github.com/dexteryy/mo/blob/master/)
48 48
 * Add/update to your project as new dependency:
49 49
     * via [istatic](https://github.com/mockee/istatic.git)
50 50
     * via [volo](https://github.com/volojs/volo)
@@ -71,7 +71,6 @@ var _ = require('mo/lang');
71 71
 * `_.unique(list)` -- 
72 72
 * `_.ns(string, value)` -- 
73 73
 * `_.FnQueue()` -- 
74  
-* `_.semver(version1, version2)` -- 
75 74
 
76 75
 ```javascript 
77 76
 // Add ES5 methods in browsers that don't natively support them:
4  domready.js
@@ -8,9 +8,9 @@
8 8
  * Copyright (C) 2010-2012, Dexter.Yy, MIT License
9 9
  * vim: et:ts=4:sw=4:sts=4
10 10
  */
11  
-define("mo/domready", ["host", "finish"], function(host, finish){
  11
+define("mo/domready", ["finish"], function(finish){
12 12
     var loaded, 
13  
-        w = host.window, 
  13
+        w = this, 
14 14
         doc = w.document, 
15 15
         ADD = "addEventListener",
16 16
         IEADD = "attachEvent",
6  lang.js
@@ -7,9 +7,9 @@
7 7
  * Copyright (C) 2010-2012, Dexter.Yy, MIT License
8 8
  * vim: et:ts=4:sw=4:sts=4
9 9
  */
10  
-define("mo/lang", ["host"], function(host, require, exports){
  10
+define("mo/lang", [], function(require, exports){
11 11
 
12  
-    var oz = this,
  12
+    var host = this,
13 13
         Array = host.Array,
14 14
         String = host.String,
15 15
         Object = host.Object,
@@ -183,8 +183,6 @@ define("mo/lang", ["host"], function(host, require, exports){
183 183
         return true;
184 184
 	};
185 185
     
186  
-    exports.semver = oz._semver;
187  
-
188 186
     function mix(origin) {
189 187
         var objs = arguments, ol = objs.length, 
190 188
             VALTYPE = { 'number': 1, 'boolean': 2, 'string': 3 },
3  network.js
@@ -12,8 +12,7 @@ define("mo/network", [
12 12
     "mo/browsers"
13 13
 ], function(_, browsers, require, exports){
14 14
 
15  
-    var oz = this,
16  
-        ns = _.ns,
  15
+    var ns = _.ns,
17 16
         uuid4jsonp = 1;
18 17
 
19 18
     var httpParam = function(a) {
2  package.json
@@ -20,7 +20,7 @@
20 20
         "oz",
21 21
         "ozjs"
22 22
     ],
23  
-    "version": "1.0.0",
  23
+    "version": "1.0.1",
24 24
     "volo": {
25 25
         "dependencies": {
26 26
         }
68  stylesheet.js
... ...
@@ -1,68 +0,0 @@
1  
-/**
2  
- * using AMD (Asynchronous Module Definition) API with OzJS
3  
- * see http://dexteryy.github.com/OzJS/ for details
4  
- *
5  
- * Copyright (C) 2010-2012, Dexter.Yy, MIT License
6  
- * vim: et:ts=4:sw=4:sts=4
7  
- */
8  
-define("mo/stylesheet", ["mo/lang", "host"], function(_, host){
9  
-
10  
-    return {
11  
-        /**
12  
-         * @public 获取一个可以编辑的style标签
13  
-         * @param {string} sid是style标签的id
14  
-         * @return {DOM} 返回style标签的对象
15  
-         */
16  
-        open: function(sid) {
17  
-            var styleElm = document.getElementById("oz_" + sid); //使用页面里现有的style,方便统一删除
18  
-            if(!styleElm){
19  
-                styleElm = document.createElement("style"); //用TUI.addElm插入的时候在ie里无效
20  
-                styleElm.id = "oz_" + sid;
21  
-                document.getElementsByTagName("head")[0].appendChild(styleElm); //必须嵌入head,否则webkit里不生效
22  
-            }
23  
-            return styleElm;
24  
-        },
25  
-        
26  
-        /**
27  
-         * @public 在页面里新建样式表,写入指定的样式
28  
-         * @param {string} selector是选择器
29  
-         * @param {string} styles是样式属性和值
30  
-         * @param {int} * n用来指定在样式表第几行写入,默认在末尾
31  
-         */
32  
-        insert: function(selector, styles, n){
33  
-            var styleElm = this.open("insertSheet");
34  
-            var sheet = styleElm.styleSheet || styleElm.sheet;
35  
-            if (!n) 
36  
-                n = ( sheet.cssRules || sheet.rules ).length;
37  
-            if (sheet.insertRule) {  // for W3C API
38  
-                sheet.insertRule("html " + selector + "{" + styles + "}", n);
39  
-            } else if (sheet.addRule) { // for IE
40  
-                selector = selector.split(","); //IE的addRule方法不支持直接写多行的选择器
41  
-                for(var i = 0, l = selector.length; i < l; i++)
42  
-                    sheet.addRule("html "+ selector[i], styles, n++);			
43  
-            }
44  
-        },
45  
-        
46  
-        /**
47  
-         * @private 批量应用样式
48  
-         */
49  
-        insertText: function(css, noreplace) {
50  
-            var msheet = this.open("manualSheet");
51  
-            css = css || " "; //防止ie崩溃
52  
-            try{
53  
-                if( msheet.styleSheet ) { //for IE
54  
-                    msheet.styleSheet.cssText = css;
55  
-                } else {
56  
-                    var cssText = document.createTextNode(css);
57  
-                    var old = msheet.childNodes[0];
58  
-                    if(!noreplace && old)
59  
-                        msheet.replaceChild(cssText, msheet.childNodes[0]);
60  
-                    else
61  
-                        msheet.appendChild(cssText);
62  
-                }
63  
-            }catch(e){}
64  
-        }
65  
-
66  
-    };
67  
-
68  
-});
4  template.js
@@ -7,9 +7,9 @@
7 7
  * Copyright (C) 2010-2012, Dexter.Yy, MIT License
8 8
  * vim: et:ts=4:sw=4:sts=4
9 9
  */
10  
-define("mo/template", ["mo/lang", "host"], function(_, host, require, exports){
  10
+define("mo/template", ["mo/lang"], function(_, require, exports){
11 11
 
12  
-    var document = host.document;
  12
+    var document = this.document;
13 13
 
14 14
     function escapeHTML(str){
15 15
         str = str || '';

0 notes on commit 41fdf70

Please sign in to comment.
Something went wrong with that request. Please try again.