VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/doc/yahoo.js@ 99507

最後變更 在這個檔案從99507是 98584,由 vboxsync 提交於 2 年 前

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.3 KB
 
1/*
2This file is part of the DITA Open Toolkit project hosted on
3Sourceforge.net. See the accompanying license.txt file for
4applicable licenses.
5
6Copyright (c) 2006, Yahoo! Inc. All rights reserved.
7Code licensed under the BSD License:
8http://developer.yahoo.net/yui/license.txt
9version: 0.10.0
10*/
11
12/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
13
14/**
15 * The Yahoo global namespace
16 * @constructor
17 */
18var YAHOO = window.YAHOO || {};
19
20/**
21 * Returns the namespace specified and creates it if it doesn't exist
22 *
23 * YAHOO.namespace("property.package");
24 * YAHOO.namespace("YAHOO.property.package");
25 *
26 * Either of the above would create YAHOO.property, then
27 * YAHOO.property.package
28 *
29 * @param {String} sNameSpace String representation of the desired
30 * namespace
31 * @return {Object} A reference to the namespace object
32 */
33YAHOO.namespace = function( sNameSpace ) {
34
35 if (!sNameSpace || !sNameSpace.length) {
36 return null;
37 }
38
39 var levels = sNameSpace.split(".");
40
41 var currentNS = YAHOO;
42
43 // YAHOO is implied, so it is ignored if it is included
44 for (var i=(levels[0] == "YAHOO") ? 1 : 0; i<levels.length; ++i) {
45 currentNS[levels[i]] = currentNS[levels[i]] || {};
46 currentNS = currentNS[levels[i]];
47 }
48
49 return currentNS;
50};
51
52/**
53 * Global log method.
54 */
55YAHOO.log = function(sMsg,sCategory) {
56 if(YAHOO.widget.Logger) {
57 YAHOO.widget.Logger.log(null, sMsg, sCategory);
58 } else {
59 return false;
60 }
61};
62
63YAHOO.namespace("util");
64YAHOO.namespace("widget");
65YAHOO.namespace("example");
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette