cell

编程之家收集整理的这个编程导航主要介绍了cell编程之家,现在分享给大家,也给大家做个参考。

cell

cell 介绍

cell一个由自驱动、自构建的Web应用程序框架。  Cell只有一个设计目标:简单,易于学习和使用。

cell的使用

<html>

<script src="https://www.celljs.org/cell.js"></script>

<script>

var el = {

$cell: true,

style: "font-family: Helvetica; font-size: 14px;",

$components: [

{

$type: "input",

type: "text",

placeholder: "Type something and press enter",

style: "width: 100%; outline:none; padding: 5px;",

$init: function(e) { this.focus() },

onkeyup: function(e) {

if (e.keyCode === 13) {

document.querySelector("#list")._add(this.value);

this.value = "";

}

}

},

{

$type: "ol",

id: "list",

_items: [],

$components: [],

_add: function(val) { this._items.push(val) },

$update: function() {

this.$components = this._items.map(function(item) {

return { $type: "li",$text: item }

})

}

}

]

}

</script>

</html>

代码中需要注意的几件事:

没有要继承和扩展的框架类。

没有API方法调用

没有html正文标记

我们所拥有的只是一个类似jsON的变量。

DOM只是在没有运行任何功能的情况下构建自己。

网站地址:https://www.celljs.org

GitHub:https://github.com/intercellular/cell

网站描述:一个自驱动的Web应用程序框架

cell官方网站

官方网站:https://www.celljs.org

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

相关文章

johnny-five,Bocoup 的 JavaScript 机器和物联网编程框架
WePY,一款让小程序支持组件化开发的框架
Deep playground,神经网络的交互式可视化,使用d3.js和TypeS...
ShareDB,用于并发编辑系统的前端数据库
RxJS,RxJS 是使用 Observables 的响应式编程的库
egg-react-ssr,最小而美的Egg + React + SSR 服务端渲染应用...