• DOM是什么


    UI—html—DOM(tree-structured representation、 manipulate)—Virtual DOM(component)

    Real DOM强调树状结构的整体;核心是树状结构的维护;

    Virtual DOM强调的是组件,核心是组件的构建、组合和维护;

    Real DOM

    First things first, DOM stands for “Document Object Model”. The DOM in simple words represents the UI of your application. Everytime there is a change in the state of your application UI, the DOM gets updated to represent that change. 

    Just to get things straight - DOM stands for Document Object Model and is an abstraction of a structured text. For web developers, this text is an HTML code, and the DOM is simply called HTML DOM. Elements of HTML become nodes in the DOM.

    So, while HTML is a text, the DOM is an in-memory representation of this text. 

    The HTML DOM provides an interface (API) to traverse and modify the nodes. It contains methods like getElementById or removeChild. We usually use JavaScript language to work with the DOM, because… Well, nobody knows why :). 

    The Virtual DOM is an abstraction of the HTML DOM. It is lightweight and detached from the browser-specific implementation details. Since the DOM itself was already an abstraction, the virtual DOM is, in fact, an abstraction of an abstraction. 

    https://www.cnblogs.com/feng9exe/p/10906496.html

  • 相关阅读:
    2019春季第五周作业
    第四周作业
    第三周作业编程总结
    第四周编程总结
    第三周编程总结
    2019春第一周作业编程总结
    我人生中对我影响深刻的三个老师
    秋季学习总结
    自我介绍
    2019春第10周作业
  • 原文地址:https://www.cnblogs.com/feng9exe/p/11089039.html
Copyright © 2020-2023  润新知