mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
LibWeb: Convert StringBuilder::appendf() => AK::Format
This commit is contained in:
parent
eb05931ab5
commit
c7e9b6d00f
2 changed files with 2 additions and 6 deletions
|
@ -74,11 +74,7 @@ JS_DEFINE_NATIVE_GETTER(LocationObject::host_getter)
|
||||||
{
|
{
|
||||||
auto& window = static_cast<WindowObject&>(global_object);
|
auto& window = static_cast<WindowObject&>(global_object);
|
||||||
auto url = window.impl().document().url();
|
auto url = window.impl().document().url();
|
||||||
StringBuilder builder;
|
return JS::js_string(vm, String::formatted("{}:{}", url.host(), url.port()));
|
||||||
builder.append(url.host());
|
|
||||||
builder.append(':');
|
|
||||||
builder.appendf("%u", url.port());
|
|
||||||
return JS::js_string(vm, builder.to_string());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_DEFINE_NATIVE_GETTER(LocationObject::hash_getter)
|
JS_DEFINE_NATIVE_GETTER(LocationObject::hash_getter)
|
||||||
|
|
|
@ -243,7 +243,7 @@ void dump_tree(StringBuilder& builder, const Layout::Node& layout_node, bool sho
|
||||||
for (auto& property : properties) {
|
for (auto& property : properties) {
|
||||||
for (size_t i = 0; i < indent; ++i)
|
for (size_t i = 0; i < indent; ++i)
|
||||||
builder.append(" ");
|
builder.append(" ");
|
||||||
builder.appendf(" (%s: %s)\n", property.name.characters(), property.value.characters());
|
builder.appendff(" ({}: {})\n", property.name, property.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue