diff --git a/dlls/jscript/set.c b/dlls/jscript/set.c index 6038a647e76..5a2865155ae 100644 --- a/dlls/jscript/set.c +++ b/dlls/jscript/set.c @@ -236,8 +236,17 @@ static HRESULT Map_clear(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigne static HRESULT Map_delete(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { - FIXME("%p\n", jsthis); - return E_NOTIMPL; + jsval_t key = argc >= 1 ? argv[0] : jsval_undefined(); + struct jsval_map_entry *entry; + MapInstance *map; + + if(!(map = get_map_this(jsthis))) return JS_E_MAP_EXPECTED; + + TRACE("%p (%s)\n", map, debugstr_jsval(key)); + + if((entry = get_map_entry(map, key))) delete_map_entry(map, entry); + if(r) *r = jsval_bool(!!entry); + return S_OK; } static HRESULT Map_forEach(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv,