diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index efdff177cec..4777f1809e0 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -201,8 +201,10 @@ static HRESULT do_attribute_tag_format(DispatchEx *dispex, LCID lcid, WORD flags static HRESULT String_anchor(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + static const WCHAR fontW[] = {'A',0}; + static const WCHAR colorW[] = {'N','A','M','E',0}; + + return do_attribute_tag_format(dispex, lcid, flags, dp, retv, ei, sp, fontW, colorW); } static HRESULT String_big(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index fe2093981a0..66d12808d61 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -269,6 +269,19 @@ ok(tmp === "TEST", "''.toUpperCase() = " + tmp); tmp = "tEsT".toUpperCase(3); ok(tmp === "TEST", "''.toUpperCase(3) = " + tmp); +tmp = "".anchor(); +ok(tmp === "", "''.anchor() = " + tmp); +tmp = "".anchor(3); +ok(tmp === "", "''.anchor(3) = " + tmp); +tmp = "".anchor("red"); +ok(tmp === "", "''.anchor('red') = " + tmp); +tmp = "test".anchor(); +ok(tmp === "test", "'test'.anchor() = " + tmp); +tmp = "test".anchor(3); +ok(tmp === "test", "'test'.anchor(3) = " + tmp); +tmp = "test".anchor("green"); +ok(tmp === "test", "'test'.anchor('green') = " + tmp); + tmp = "".big(); ok(tmp === "", "''.big() = " + tmp); tmp = "".big(3);