• 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); }


  • 相关阅读:
    常见的分布
    ubuntu16.04获取root权限并用root用户登录
    神经网络与深度学习邱锡鹏学习笔记16多项式回归
    什么是公版显卡,什么是非公版显卡
    高考电子监控揭秘
    买了个2手睡袋
    HTML
    又是一天
    我也想去看珠峰
    Qt 主界面菜单栏和状态栏实现
  • 原文地址:https://www.cnblogs.com/wujiakun/p/2839548.html
Copyright © 2020-2023  润新知