简体   繁体   English

What's the difference between dart:html vs package:html in dart?

[英]What's the difference between dart:html vs package:html in dart?

I'm attempting to create an epub document creator in flutter, and thus need to have something that programmatically builds xhtml files.我正在尝试在 flutter 中创建一个 epub 文档创建器,因此需要以编程方式构建 xhtml 文件的东西。 I'm not sure which library to start with, here, nor what their different purposes are.我不确定从哪个库开始,在这里,也不知道它们的不同目的是什么。

From the dart:html documentation :来自dart:html文档

HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). HTML 元素和其他资源,用于需要与浏览器和 DOM 交互的基于 Web 的应用程序(文档 Object 模型)。

From the package:html package description:来自package:html package 描述:

APIs for parsing and manipulating HTML content outside the browser.用于在浏览器外解析和操作 HTML 内容的 API。

In other words, dart:html is used for Dart for the web to interact with a web browser. In other words, dart:html is used for Dart for the web to interact with a web browser. package:html is an HTML parser without a web browser. package:html是没有 Z2567A5EC9705EB7AC2C984033E06 浏览器的 HTML 解析器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM