| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 6530b8af691d4ea1f8439b92e73c9ef37a548c78..aae58dd8cb95fb376936800d57d8fddd5915a598 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -3737,6 +3737,18 @@ PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState&
|
| return 0;
|
| }
|
|
|
| +PassRefPtr<Event> Document::createEvent(ExceptionState& exceptionState)
|
| +{
|
| + if (!isSVGDocument()) {
|
| + exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, 0));
|
| + return 0;
|
| + }
|
| +
|
| + UseCounter::count(this, UseCounter::DocumentCreateEventOptionalArgument);
|
| + // Legacy SVGDocument behavior.
|
| + return createEvent("undefined", exceptionState);
|
| +}
|
| +
|
| void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType)
|
| {
|
| if (ContextFeatures::mutationEventsEnabled(this))
|
|
|