From de54805f6c65f26822a52dcfb9c16cde5c3b85ec Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 4 Jun 2024 14:28:49 +0200 Subject: [PATCH] [mujs] style.backgroundClip --- src/ecmascript/mujs/style.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/ecmascript/mujs/style.c b/src/ecmascript/mujs/style.c index 924f8c4d..7144f392 100644 --- a/src/ecmascript/mujs/style.c +++ b/src/ecmascript/mujs/style.c @@ -188,6 +188,15 @@ mjs_style_get_property_background(js_State *J) mjs_style(J, "background"); } +static void +mjs_style_get_property_backgroundClip(js_State *J) +{ +#ifdef ECMASCRIPT_DEBUG + fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__); +#endif + mjs_style(J, "background-clip"); +} + static void mjs_style_get_property_backgroundColor(js_State *J) { @@ -313,6 +322,15 @@ mjs_style_set_property_background(js_State *J) mjs_set_style(J, "background"); } +static void +mjs_style_set_property_backgroundClip(js_State *J) +{ +#ifdef ECMASCRIPT_DEBUG + fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__); +#endif + mjs_set_style(J, "background-clip"); +} + static void mjs_style_set_property_backgroundColor(js_State *J) { @@ -451,6 +469,7 @@ mjs_push_style(js_State *J, void *node) js_newuserdata(J, "style", node, mjs_style_finalizer); addmethod(J, "toString", mjs_style_toString, 0); addproperty(J, "background", mjs_style_get_property_background, mjs_style_set_property_background); + addproperty(J, "backgroundClip", mjs_style_get_property_backgroundClip, mjs_style_set_property_backgroundClip); addproperty(J, "backgroundColor", mjs_style_get_property_backgroundColor, mjs_style_set_property_backgroundColor); addproperty(J, "color", mjs_style_get_property_color, mjs_style_set_property_color); addproperty(J, "cssText", mjs_style_get_property_cssText, mjs_style_set_property_cssText);