mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibWeb: Port Comment interface from DeprecatedString to String
This commit is contained in:
parent
4da1f4e836
commit
cc1e4c5cb3
6 changed files with 14 additions and 14 deletions
|
@ -11,13 +11,13 @@
|
|||
|
||||
namespace Web::DOM {
|
||||
|
||||
Comment::Comment(Document& document, DeprecatedString const& data)
|
||||
: CharacterData(document, NodeType::COMMENT_NODE, data)
|
||||
Comment::Comment(Document& document, String const& data)
|
||||
: CharacterData(document, NodeType::COMMENT_NODE, data.to_deprecated_string())
|
||||
{
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-comment-comment
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Comment>> Comment::construct_impl(JS::Realm& realm, DeprecatedString const& data)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Comment>> Comment::construct_impl(JS::Realm& realm, String const& data)
|
||||
{
|
||||
auto& window = verify_cast<HTML::Window>(realm.global_object());
|
||||
return realm.heap().allocate<Comment>(realm, window.associated_document(), data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue