zoukankan      html  css  js  c++  java
  • WinJS.Namespace Angkor:

    defineWithParent: function defineWithParent(parentNamespace, name, members) { /// /// /// Defines a new namespace with the specified name under the specified parent namespace. /// ////// The parent namespace. /// ////// The name of the new namespace. /// ////// The members of the new namespace. /// /// /// The newly-defined namespace. /// /// var currentNamespace = parentNamespace, namespaceFragments = name.split("."); for (var i = 0, len = namespaceFragments.length; i < len; i++) { var namespaceName = namespaceFragments[i]; if (!currentNamespace[namespaceName]) { Object.defineProperty(currentNamespace, namespaceName, { value: {}, writable: false, enumerable: true, configurable: true } ); } currentNamespace = currentNamespace[namespaceName]; } if (members) { initializeProperties(currentNamespace, members); } return currentNamespace; }


    define: function define(name, members) { /// /// /// Defines a new namespace with the specified name. /// /// /// The name of the namespace. This could be a dot-separated name for nested namespaces. /// /// /// The members of the new namespace. /// /// /// The newly-defined namespace. /// /// return defineWithParent(global, name, members); }


  • 相关阅读:
    面试题准备
    ImageList控件
    修改Visual Studio 2010 帮助文件库的位置
    委托与事件(续)
    PictureBox
    我的廣播情緣12/26
    回首我的2007 12/25
    水晶報表:列印支票金額12/12
    聖誕節快樂
    新年快樂
  • 原文地址:https://www.cnblogs.com/wujiakun/p/2839548.html
Copyright © 2011-2022 走看看