/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
components/script/dom/characterdata/cdatasection.rs
36 строк
972 B
Tim van der Lippe
script: Move characterdata interfaces into characterdata/ (#45854)
21 июн 2026, 11:22
Не верифицирован
21 июн 2026, 11:22
cc6dc4b
Код
Авторство
О чём код?
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; use crate::dom::document::Document; use crate::dom::node::Node; use crate::dom::text::Text; #[dom_struct] pub(crate) struct CDATASection { text: Text, } impl CDATASection { fn new_inherited(text: DOMString, document: &Document) -> CDATASection { CDATASection { text: Text::new_inherited(text, document), } } pub(crate) fn new( cx: &mut js::context::JSContext, text: DOMString, document: &Document, ) -> DomRoot<CDATASection> { Node::reflect_node( cx, Box::new(CDATASection::new_inherited(text, document)), document, ) } }