⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 2.01 - describing interfaces with comments.js

📁 JS设计模式源代码
💻 JS
字号:
/*interface Composite {    function add(child);    function remove(child);    function getChild(index);}interface FormItem {    function save();}*/var CompositeForm = function(id, method, action) { // implements Composite, FormItem    ...};// Implement the Composite interface.CompositeForm.prototype.add = function(child) {    ...};CompositeForm.prototype.remove = function(child) {    ...};CompositeForm.prototype.getChild = function(index) {    ...};// Implement the FormItem interface.CompositeForm.prototype.save = function() {    ...};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -