mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-20 01:46:15 -04:00
[ecmascript] Swapped order of parameters for camel_to_html
The result string as the last parameter not the first one.
This commit is contained in:
parent
b5e85bc15c
commit
299a8fd5a3
@ -784,7 +784,7 @@ get_elements_by_class_name(dom_html_document *doc, dom_node *node, const char *c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
camel_to_html(struct string *result, const char *text)
|
camel_to_html(const char *text, struct string *result)
|
||||||
{
|
{
|
||||||
add_to_string(result, "data-");
|
add_to_string(result, "data-");
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ void *walk_tree_query(dom_node *node, const char *selector, int depth);
|
|||||||
void walk_tree_query_append(dom_node *node, const char *selector, int depth, LIST_OF(struct selector_node) *result_list);
|
void walk_tree_query_append(dom_node *node, const char *selector, int depth, LIST_OF(struct selector_node) *result_list);
|
||||||
void *get_elements_by_class_name(dom_html_document *doc, dom_node *node, const char *classes);
|
void *get_elements_by_class_name(dom_html_document *doc, dom_node *node, const char *classes);
|
||||||
|
|
||||||
void camel_to_html(struct string *result, const char *camel);
|
void camel_to_html(const char *camel, struct string *result);
|
||||||
void ecmascript_walk_tree(struct string *buf, void *nod, bool start, bool toSortAttrs);
|
void ecmascript_walk_tree(struct string *buf, void *nod, bool start, bool toSortAttrs);
|
||||||
|
|
||||||
void free_el_dom_collection(void *ctx);
|
void free_el_dom_collection(void *ctx);
|
||||||
|
@ -51,7 +51,7 @@ mjs_obj_dataset_has(js_State *J, void *p, const char *property)
|
|||||||
if (!el ||!init_string(&data)) {
|
if (!el ||!init_string(&data)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
dom_exception exc = dom_string_create((const uint8_t *)data.source, data.length, &attr_name);
|
dom_exception exc = dom_string_create((const uint8_t *)data.source, data.length, &attr_name);
|
||||||
done_string(&data);
|
done_string(&data);
|
||||||
@ -94,7 +94,7 @@ mjs_obj_dataset_put(js_State *J, void *p, const char *property)
|
|||||||
if (!el ||!init_string(&data)) {
|
if (!el ||!init_string(&data)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
dom_exception exc = dom_string_create((const uint8_t *)data.source, data.length, &attr_name);
|
dom_exception exc = dom_string_create((const uint8_t *)data.source, data.length, &attr_name);
|
||||||
done_string(&data);
|
done_string(&data);
|
||||||
@ -134,7 +134,7 @@ mjs_obj_dataset_del(js_State *J, void *p, const char *property)
|
|||||||
if (!el ||!init_string(&data)) {
|
if (!el ||!init_string(&data)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
dom_exception exc = dom_string_create((const uint8_t *)data.source, data.length, &attr_name);
|
dom_exception exc = dom_string_create((const uint8_t *)data.source, data.length, &attr_name);
|
||||||
done_string(&data);
|
done_string(&data);
|
||||||
|
@ -61,7 +61,7 @@ js_obj_delete_property(JSContext *ctx, JSValueConst obj, JSAtom prop)
|
|||||||
JS_FreeCString(ctx, property);
|
JS_FreeCString(ctx, property);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
JS_FreeCString(ctx, property);
|
JS_FreeCString(ctx, property);
|
||||||
|
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
@ -111,7 +111,7 @@ js_obj_get_property(JSContext *ctx, JSValueConst obj, JSAtom atom, JSValueConst
|
|||||||
JS_FreeCString(ctx, property);
|
JS_FreeCString(ctx, property);
|
||||||
return JS_UNDEFINED;
|
return JS_UNDEFINED;
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
JS_FreeCString(ctx, property);
|
JS_FreeCString(ctx, property);
|
||||||
|
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
@ -162,7 +162,7 @@ js_obj_set_property(JSContext *ctx, JSValueConst obj, JSAtom atom, JSValueConst
|
|||||||
JS_FreeCString(ctx, value);
|
JS_FreeCString(ctx, value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
JS_FreeCString(ctx, property);
|
JS_FreeCString(ctx, property);
|
||||||
|
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
|
@ -89,7 +89,7 @@ dataset_obj_getProperty(JSContext* ctx, JS::HandleObject obj, JS::HandleValue re
|
|||||||
mem_free(property);
|
mem_free(property);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
mem_free(property);
|
mem_free(property);
|
||||||
|
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
@ -150,7 +150,7 @@ dataset_obj_setProperty(JSContext* ctx, JS::HandleObject obj, JS::HandleId id, J
|
|||||||
mem_free(value);
|
mem_free(value);
|
||||||
return result.failInvalidDescriptor();
|
return result.failInvalidDescriptor();
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
mem_free(property);
|
mem_free(property);
|
||||||
|
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
@ -207,7 +207,7 @@ dataset_obj_deleteProperty(JSContext* ctx, JS::HandleObject obj, JS::HandleId id
|
|||||||
mem_free(property);
|
mem_free(property);
|
||||||
return result.failCantDelete();
|
return result.failCantDelete();
|
||||||
}
|
}
|
||||||
camel_to_html(&data, property);
|
camel_to_html(property, &data);
|
||||||
mem_free(property);
|
mem_free(property);
|
||||||
|
|
||||||
dom_string *attr_name = NULL;
|
dom_string *attr_name = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user