mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibJS: Remove the default length & attributes from define_native_*
These are usually incorrect, and people sometimes forget to add the correct values as a result of them being optional, so they should just be specified explicitly.
This commit is contained in:
parent
a6b8291a9b
commit
53f70e5208
10 changed files with 48 additions and 43 deletions
|
@ -139,12 +139,13 @@ bool SheetGlobalObject::internal_set(const JS::PropertyName& property_name, JS::
|
|||
void SheetGlobalObject::initialize_global_object()
|
||||
{
|
||||
Base::initialize_global_object();
|
||||
define_native_function("get_real_cell_contents", get_real_cell_contents, 1);
|
||||
define_native_function("set_real_cell_contents", set_real_cell_contents, 2);
|
||||
define_native_function("parse_cell_name", parse_cell_name, 1);
|
||||
define_native_function("current_cell_position", current_cell_position, 0);
|
||||
define_native_function("column_arithmetic", column_arithmetic, 2);
|
||||
define_native_function("column_index", column_index, 1);
|
||||
u8 attr = JS::Attribute::Configurable | JS::Attribute::Writable | JS::Attribute::Enumerable;
|
||||
define_native_function("get_real_cell_contents", get_real_cell_contents, 1, attr);
|
||||
define_native_function("set_real_cell_contents", set_real_cell_contents, 2, attr);
|
||||
define_native_function("parse_cell_name", parse_cell_name, 1, attr);
|
||||
define_native_function("current_cell_position", current_cell_position, 0, attr);
|
||||
define_native_function("column_arithmetic", column_arithmetic, 2, attr);
|
||||
define_native_function("column_index", column_index, 1, attr);
|
||||
}
|
||||
|
||||
void SheetGlobalObject::visit_edges(Visitor& visitor)
|
||||
|
@ -389,7 +390,7 @@ WorkbookObject::~WorkbookObject()
|
|||
void WorkbookObject::initialize(JS::GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
define_native_function("sheet", sheet, 1);
|
||||
define_native_function("sheet", sheet, 1, JS::default_attributes);
|
||||
}
|
||||
|
||||
void WorkbookObject::visit_edges(Visitor& visitor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue