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:
parent
9597051fcc
commit
cc52e5a168
@ -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",
|
||||
|
@ -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
|
||||
|
@ -597,6 +597,7 @@ get_output_header(const char *header_name, struct Xhr *x)
|
||||
}
|
||||
|
||||
const char *good[] = { "background",
|
||||
"background-clip",
|
||||
"background-color",
|
||||
"color",
|
||||
"display",
|
||||
|
@ -81,6 +81,7 @@ took = [
|
||||
'navigator.appCodeName.html',
|
||||
'node.nodeType.html',
|
||||
'nodelist.forEach.html',
|
||||
'style.backgroundClip.html',
|
||||
'window.setTimeout.html',
|
||||
'URL.html',
|
||||
'URLSearchParams.html'
|
||||
|
19
test/js/assert/style.backgroundClip.html
Normal file
19
test/js/assert/style.backgroundClip.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user