Commit 724e54d5 authored by Yuxuan Shui's avatar Yuxuan Shui Committed by Alexandre Julliard

mshtml: Add stubs for MutationObserver methods.

parent 02994bdd
......@@ -21,6 +21,7 @@
#include <mshtmdid.h>
import "ocidl.idl";
import "mshtml.idl";
[
version(1.0),
......@@ -85,6 +86,12 @@ interface IWineMSHTMLConsole : IDispatch
]
interface IWineMSHTMLMutationObserver : IDispatch
{
[id(1)]
HRESULT disconnect();
[id(2)]
HRESULT observe([in] IHTMLDOMNode *target, [in] IDispatch *options);
[id(3)]
HRESULT takeRecords([retval, out] IDispatch **records);
}
[
......
......@@ -1172,6 +1172,34 @@ static HRESULT WINAPI MutationObserver_Invoke(IWineMSHTMLMutationObserver *iface
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI MutationObserver_disconnect(IWineMSHTMLMutationObserver *iface)
{
struct mutation_observer *This = impl_from_IWineMSHTMLMutationObserver(iface);
FIXME("(%p), stub\n", This);
return S_OK;
}
static HRESULT WINAPI MutationObserver_observe(IWineMSHTMLMutationObserver *iface, IHTMLDOMNode *target,
IDispatch *options)
{
struct mutation_observer *This = impl_from_IWineMSHTMLMutationObserver(iface);
FIXME("(%p)->(%p %p), stub\n", This, target, options);
return S_OK;
}
static HRESULT WINAPI MutationObserver_takeRecords(IWineMSHTMLMutationObserver *iface, IDispatch **ret)
{
struct mutation_observer *This = impl_from_IWineMSHTMLMutationObserver(iface);
FIXME("(%p)->(%p), stub\n", This, ret);
return E_NOTIMPL;
}
static const IWineMSHTMLMutationObserverVtbl WineMSHTMLMutationObserverVtbl = {
MutationObserver_QueryInterface,
MutationObserver_AddRef,
......@@ -1180,6 +1208,9 @@ static const IWineMSHTMLMutationObserverVtbl WineMSHTMLMutationObserverVtbl = {
MutationObserver_GetTypeInfo,
MutationObserver_GetIDsOfNames,
MutationObserver_Invoke,
MutationObserver_disconnect,
MutationObserver_observe,
MutationObserver_takeRecords
};
static const tid_t mutation_observer_iface_tids[] = {
......
......@@ -2909,7 +2909,15 @@ sync_test("MutationObserver", function() {
} catch(e) {
ok(false, "MutationObserver with extra args threw exception " + e.number);
}
})
var mutation_observer = new MutationObserver(function() {});
function test_exposed(prop) {
ok(prop in mutation_observer, prop + " not found in MutationObserver.");
}
test_exposed("observe");
test_exposed("disconnect");
test_exposed("takeRecords");
});
async_test("postMessage", function() {
var v = document.documentMode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment