1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[js] Added background-clip to mujs and quickjs

To be consistent with spidermonkey
This commit is contained in:
Witold Filipczyk 2024-09-30 19:31:47 +02:00
parent 9597051fcc
commit cc52e5a168
5 changed files with 25 additions and 3 deletions

View File

@ -339,6 +339,7 @@ get_output_header(const char *header_name, struct mjs_xhr *x)
}
const char *good[] = { "background",
"background-clip",
"background-color",
"color",
"display",

View File

@ -134,9 +134,9 @@ js_CSSStyleDeclaration_set_items(JSContext *ctx, JSValue this_val, void *node)
#endif
REF_JS(this_val);
JS_DefinePropertyValueStr(ctx, this_val, "marginTop", JS_NewString(ctx, "0"), 0);
JS_DefinePropertyValueStr(ctx, this_val, "marginLeft", JS_NewString(ctx, "0"), 0);
JS_DefinePropertyValueStr(ctx, this_val, "marginRight", JS_NewString(ctx, "0"), 0);
JS_DefinePropertyValueStr(ctx, this_val, "marginTop", JS_NewString(ctx, "0"), JS_PROP_ENUMERABLE);
JS_DefinePropertyValueStr(ctx, this_val, "marginLeft", JS_NewString(ctx, "0"), JS_PROP_ENUMERABLE);
JS_DefinePropertyValueStr(ctx, this_val, "marginRight", JS_NewString(ctx, "0"), JS_PROP_ENUMERABLE);
}
static JSValue

View File

@ -597,6 +597,7 @@ get_output_header(const char *header_name, struct Xhr *x)
}
const char *good[] = { "background",
"background-clip",
"background-color",
"color",
"display",

View File

@ -81,6 +81,7 @@ took = [
'navigator.appCodeName.html',
'node.nodeType.html',
'nodelist.forEach.html',
'style.backgroundClip.html',
'window.setTimeout.html',
'URL.html',
'URLSearchParams.html'

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<body>
<p><strong>Note:</strong><br>First create an LI node,<br> then create a Text node,<br> then append the Text node to the LI node.<br>Finally append the LI node to the list.</p>
<script>
function myFunction() {
var div = document.createElement("div");
div.style.backgroundClip = "content-box";
console.assert(div.style.backgroundClip === 'content-box', div.style.backgroundClip);
}
console.error('style.backgroundClip.html');
myFunction();
console.exit();
</script>
</body>
</html>