Giter Club home page Giter Club logo

Comments (3)

xuld avatar xuld commented on September 27, 2024

曾经是分开的,现在合并了,Dom的base就相当于jquery的功能,分开的麻烦点:
内部各个模块有很多互相依赖的地方,分开后会增加很多代码量

from tealui.

AKIo0O avatar AKIo0O commented on September 27, 2024

但是便于维护扩展啊。
我觉得拆开好。当然现在 已经在这基础上 开发很多组件了。。。
所以现在拆代价很大啊

from tealui.

xuld avatar xuld commented on September 27, 2024

Dom的Base内部其实是有分开的层次的:
// Core - 核心部分
// Parse - 节点解析部分
// Traversing - 节点转移部分
// Manipulation - 节点处理部分
// Style - CSS部分
// Attribute - 属性部分
// Event - 事件部分
// DomReady - 加载部分
// Dimension - 尺寸部分
// Offset - 定位部分

但是一般使用的时候是肯定会全部引用的,就像jquery源码也是分开的,但是往往都是直接引一个jquery.js。

所以还不如不分开,这样可以节约大概 2k的代码量,也增加执行效率

from tealui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.