diff --git a/dom/base/nsIScriptGlobalObject.h b/dom/base/nsIScriptGlobalObject.h index ec7a241df2d6..2a4e19428c71 100644 --- a/dom/base/nsIScriptGlobalObject.h +++ b/dom/base/nsIScriptGlobalObject.h @@ -15,12 +15,6 @@ class nsIScriptContext; class nsIScriptGlobalObject; -namespace mozilla { -namespace dom { -class ErrorEventInit; -} // namespace dom -} // namespace mozilla - // A helper function for nsIScriptGlobalObject implementations to use // when handling a script error. Generally called by the global when a context // notifies it of an error via nsIScriptGlobalObject::HandleScriptError. @@ -28,13 +22,13 @@ class ErrorEventInit; // aStatus will be filled in with the status. bool NS_HandleScriptError(nsIScriptGlobalObject *aScriptGlobal, - const mozilla::dom::ErrorEventInit &aErrorEvent, + mozilla::InternalScriptErrorEvent *aErrorEvent, nsEventStatus *aStatus); #define NS_ISCRIPTGLOBALOBJECT_IID \ -{ 0x6995e1ff, 0x9fc5, 0x44a7, \ - { 0xbd, 0x7c, 0xe7, 0xcd, 0x44, 0x47, 0x22, 0x87 } } +{ 0x30c64680, 0x909a, 0x4435, \ + { 0x90, 0x3b, 0x29, 0x3e, 0xb5, 0x5d, 0xc7, 0xa0 } } /** * The global object which keeps a script context for each supported script @@ -80,9 +74,9 @@ public: * Handle a script error. Generally called by a script context. */ virtual nsresult HandleScriptError( - const mozilla::dom::ErrorEventInit &aErrorEventInit, + mozilla::InternalScriptErrorEvent *aErrorEvent, nsEventStatus *aEventStatus) { - NS_ENSURE_STATE(NS_HandleScriptError(this, aErrorEventInit, aEventStatus)); + NS_ENSURE_STATE(NS_HandleScriptError(this, aErrorEvent, aEventStatus)); return NS_OK; } diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index cbd78e7a5e01..ade9559644c3 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -52,8 +52,6 @@ #include "nsGlobalWindow.h" #include "nsScriptNameSpaceManager.h" #include "StructuredCloneTags.h" -#include "mozilla/AutoRestore.h" -#include "mozilla/dom/ErrorEvent.h" #include "mozilla/dom/ImageData.h" #include "mozilla/dom/ImageDataBinding.h" #include "nsAXPCNativeCallContext.h" @@ -314,7 +312,7 @@ private: // XXXmarkh - This function is mis-placed! bool NS_HandleScriptError(nsIScriptGlobalObject *aScriptGlobal, - const ErrorEventInit &aErrorEventInit, + InternalScriptErrorEvent *aErrorEvent, nsEventStatus *aStatus) { bool called = false; @@ -327,17 +325,11 @@ NS_HandleScriptError(nsIScriptGlobalObject *aScriptGlobal, static int32_t errorDepth; // Recursion prevention ++errorDepth; - if (errorDepth < 2) { + if (presContext && errorDepth < 2) { // Dispatch() must be synchronous for the recursion block // (errorDepth) to work. - nsRefPtr event = - ErrorEvent::Constructor(static_cast(win.get()), - NS_LITERAL_STRING("error"), - aErrorEventInit); - event->SetTrusted(true); - - nsEventDispatcher::DispatchDOMEvent(win, nullptr, event, presContext, - aStatus); + nsEventDispatcher::Dispatch(win, presContext, aErrorEvent, nullptr, + aStatus); called = true; } --errorDepth; @@ -452,47 +444,44 @@ public: if (docShell && !JSREPORT_IS_WARNING(mFlags) && !sHandlingScriptError) { - AutoRestore recursionGuard(sHandlingScriptError); - sHandlingScriptError = true; + sHandlingScriptError = true; // Recursion prevention nsRefPtr presContext; docShell->GetPresContext(getter_AddRefs(presContext)); - ErrorEventInit init; - init.mCancelable = true; - init.mFilename = mFileName; - init.mBubbles = true; + if (presContext) { + InternalScriptErrorEvent errorevent(true, NS_LOAD_ERROR); - nsCOMPtr sop(do_QueryInterface(win)); - NS_ENSURE_STATE(sop); - nsIPrincipal* p = sop->GetPrincipal(); - NS_ENSURE_STATE(p); + errorevent.fileName = mFileName.get(); - bool sameOrigin = !mOriginPrincipal; + nsCOMPtr sop(do_QueryInterface(win)); + NS_ENSURE_STATE(sop); + nsIPrincipal* p = sop->GetPrincipal(); + NS_ENSURE_STATE(p); - if (p && !sameOrigin) { - if (NS_FAILED(p->Subsumes(mOriginPrincipal, &sameOrigin))) { - sameOrigin = false; + bool sameOrigin = !mOriginPrincipal; + + if (p && !sameOrigin) { + if (NS_FAILED(p->Subsumes(mOriginPrincipal, &sameOrigin))) { + sameOrigin = false; + } } + + NS_NAMED_LITERAL_STRING(xoriginMsg, "Script error."); + if (sameOrigin) { + errorevent.errorMsg = mErrorMsg.get(); + errorevent.lineNr = mLineNumber; + } else { + NS_WARNING("Not same origin error!"); + errorevent.errorMsg = xoriginMsg.get(); + errorevent.lineNr = 0; + } + + nsEventDispatcher::Dispatch(win, presContext, &errorevent, nullptr, + &status); } - NS_NAMED_LITERAL_STRING(xoriginMsg, "Script error."); - if (sameOrigin) { - init.mMessage = mErrorMsg; - init.mLineno = mLineNumber; - } else { - NS_WARNING("Not same origin error!"); - init.mMessage = xoriginMsg; - init.mLineno = 0; - } - - nsRefPtr event = - ErrorEvent::Constructor(static_cast(win.get()), - NS_LITERAL_STRING("error"), init); - event->SetTrusted(true); - - nsEventDispatcher::DispatchDOMEvent(win, nullptr, event, presContext, - &status); + sHandlingScriptError = false; } } diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini index e236d73ac369..81a81fd6d9a4 100644 --- a/dom/base/test/mochitest.ini +++ b/dom/base/test/mochitest.ini @@ -9,7 +9,6 @@ support-files = [test_Image_constructor.html] [test_appname_override.html] [test_bug913761.html] -[test_clearTimeoutIntervalNoArg.html] [test_constructor-assignment.html] [test_constructor.html] [test_document.all_unqualified.html] diff --git a/dom/base/test/test_clearTimeoutIntervalNoArg.html b/dom/base/test/test_clearTimeoutIntervalNoArg.html deleted file mode 100644 index e1d60022fb27..000000000000 --- a/dom/base/test/test_clearTimeoutIntervalNoArg.html +++ /dev/null @@ -1,14 +0,0 @@ - - -Test for clearTimeout/clearInterval with no arguments not throwing - - -
- diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 0f116cfde065..897afd446b4f 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -11992,17 +11992,9 @@ class CGEventClass(CGBindingImplClass): "parentType": self.parentType }) - className = descriptor.nativeType.split('::')[-1] - asConcreteTypeMethod = ClassMethod("As%s" % className, - "%s*" % className, - [], - virtual=True, - body="return this;", - breakAfterReturnDecl=" ") - - CGClass.__init__(self, className, + CGClass.__init__(self, descriptor.nativeType.split('::')[-1], bases=[ClassBase(self.parentType)], - methods=[asConcreteTypeMethod]+self.methodDecls, + methods=self.methodDecls, members=members, extradeclarations=baseDeclarations) diff --git a/dom/events/nsDOMEvent.cpp b/dom/events/nsDOMEvent.cpp index 659a289579d1..f638c0740e13 100644 --- a/dom/events/nsDOMEvent.cpp +++ b/dom/events/nsDOMEvent.cpp @@ -764,6 +764,15 @@ nsDOMEvent::GetEventPopupControlState(WidgetEvent* aEvent) } } break; + case NS_SCRIPT_ERROR_EVENT : + switch(aEvent->message) { + case NS_LOAD_ERROR : + // Any error event will allow popups, if enabled in the pref. + if (::PopupAllowedForEvent("error")) + abuse = openControlled; + break; + } + break; case NS_FORM_EVENT : // For these following events only allow popups if they're // triggered while handling user input. See diff --git a/dom/events/nsDOMEvent.h b/dom/events/nsDOMEvent.h index c08fb65a6e28..5f4993b21cbc 100644 --- a/dom/events/nsDOMEvent.h +++ b/dom/events/nsDOMEvent.h @@ -27,7 +27,6 @@ class nsPresContext; namespace mozilla { namespace dom { class EventTarget; -class ErrorEvent; } } @@ -91,11 +90,6 @@ public: return mozilla::dom::EventBinding::Wrap(aCx, aScope, this); } - virtual mozilla::dom::ErrorEvent* AsErrorEvent() - { - return nullptr; - } - // nsIDOMEvent Interface NS_DECL_NSIDOMEVENT diff --git a/dom/events/nsJSEventListener.cpp b/dom/events/nsJSEventListener.cpp index 0ca3ce277dad..62fceedbdb38 100644 --- a/dom/events/nsJSEventListener.cpp +++ b/dom/events/nsJSEventListener.cpp @@ -19,7 +19,6 @@ #include "nsDOMJSUtils.h" #include "mozilla/ContentEvents.h" #include "mozilla/Likely.h" -#include "mozilla/dom/ErrorEvent.h" #include "mozilla/dom/UnionTypes.h" #include "nsDOMEvent.h" @@ -168,16 +167,19 @@ nsJSEventListener::HandleEvent(nsIDOMEvent* aEvent) Optional columnNumber; NS_ENSURE_TRUE(aEvent, NS_ERROR_UNEXPECTED); - ErrorEvent* scriptEvent = aEvent->InternalDOMEvent()->AsErrorEvent(); - if (scriptEvent) { - scriptEvent->GetMessage(errorMsg); + InternalScriptErrorEvent* scriptEvent = + aEvent->GetInternalNSEvent()->AsScriptErrorEvent(); + if (scriptEvent && + (scriptEvent->message == NS_LOAD_ERROR || + scriptEvent->typeString.EqualsLiteral("error"))) { + errorMsg = scriptEvent->errorMsg; msgOrEvent.SetAsString().SetData(errorMsg.Data(), errorMsg.Length()); - scriptEvent->GetFilename(file); + file = scriptEvent->fileName; fileName = &file; lineNumber.Construct(); - lineNumber.Value() = scriptEvent->Lineno(); + lineNumber.Value() = scriptEvent->lineNr; } else { msgOrEvent.SetAsEvent() = aEvent->InternalDOMEvent(); } diff --git a/dom/events/test/error_event_worker.js b/dom/events/test/error_event_worker.js deleted file mode 100644 index 9f6e0e4bd266..000000000000 --- a/dom/events/test/error_event_worker.js +++ /dev/null @@ -1,15 +0,0 @@ - addEventListener("error", function(e) { - var obj = {}; - for (var prop of ["message", "filename", "lineno"]) { - obj[prop] = e[prop] - } - obj.type = "event"; - postMessage(obj); -}); -onerror = function(message, filename, lineno) { - var obj = { message: message, filename: filename, lineno: lineno, - type: "callback" } - postMessage(obj); - return false; -} -throw new Error("workerhello"); diff --git a/dom/events/test/mochitest.ini b/dom/events/test/mochitest.ini index ee460d9126ff..f5facec8a960 100644 --- a/dom/events/test/mochitest.ini +++ b/dom/events/test/mochitest.ini @@ -6,7 +6,6 @@ support-files = bug426082.html bug457672.html bug656379-1.html - error_event_worker.js empty.js window_bug493251.html window_bug659071.html @@ -131,7 +130,6 @@ skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_draggableprop.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_dragstart.html] -[test_error_events.html] skip-if = toolkit == 'android' #TIMED_OUT [test_eventctors.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM diff --git a/dom/events/test/test_error_events.html b/dom/events/test/test_error_events.html deleted file mode 100644 index 7591debd62cd..000000000000 --- a/dom/events/test/test_error_events.html +++ /dev/null @@ -1,62 +0,0 @@ - - -Test for error events being ErrorEvent - - -
- - - diff --git a/dom/indexedDB/IDBRequest.cpp b/dom/indexedDB/IDBRequest.cpp index 81dd71aa64f8..e57957573358 100644 --- a/dom/indexedDB/IDBRequest.cpp +++ b/dom/indexedDB/IDBRequest.cpp @@ -9,7 +9,6 @@ #include "nsIScriptContext.h" #include "mozilla/ContentEvents.h" -#include "mozilla/dom/ErrorEventBinding.h" #include "mozilla/dom/IDBOpenDBRequestBinding.h" #include "mozilla/dom/UnionTypes.h" #include "nsComponentManagerUtils.h" @@ -301,10 +300,10 @@ IDBRequest::CaptureCaller() } void -IDBRequest::FillScriptErrorEvent(ErrorEventInit& aEventInit) const +IDBRequest::FillScriptErrorEvent(InternalScriptErrorEvent* aEvent) const { - aEventInit.mLineno = mLineNo; - aEventInit.mFilename = mFilename; + aEvent->lineNr = mLineNo; + aEvent->fileName = mFilename.get(); } mozilla::dom::IDBRequestReadyState diff --git a/dom/indexedDB/IDBRequest.h b/dom/indexedDB/IDBRequest.h index e9dc923c3cb1..1f3486d88a4b 100644 --- a/dom/indexedDB/IDBRequest.h +++ b/dom/indexedDB/IDBRequest.h @@ -25,7 +25,6 @@ class nsPIDOMWindow; namespace mozilla { namespace dom { class OwningIDBObjectStoreOrIDBIndexOrIDBCursor; -class ErrorEventInit; } } @@ -102,7 +101,7 @@ public: void CaptureCaller(); - void FillScriptErrorEvent(ErrorEventInit& aEventInit) const; + void FillScriptErrorEvent(mozilla::InternalScriptErrorEvent* aEvent) const; bool IsPending() const diff --git a/dom/indexedDB/IndexedDatabaseManager.cpp b/dom/indexedDB/IndexedDatabaseManager.cpp index 3fea95707039..b8f9336fd3fc 100644 --- a/dom/indexedDB/IndexedDatabaseManager.cpp +++ b/dom/indexedDB/IndexedDatabaseManager.cpp @@ -17,7 +17,6 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/CondVar.h" #include "mozilla/ContentEvents.h" -#include "mozilla/dom/ErrorEventBinding.h" #include "mozilla/dom/quota/OriginOrPatternString.h" #include "mozilla/dom/quota/QuotaManager.h" #include "mozilla/dom/quota/Utilities.h" @@ -341,18 +340,19 @@ IndexedDatabaseManager::FireWindowOnError(nsPIDOMWindow* aOwner, error->GetName(errorName); } - ErrorEventInit init; - request->FillScriptErrorEvent(init); + mozilla::InternalScriptErrorEvent event(true, NS_LOAD_ERROR); + request->FillScriptErrorEvent(&event); + NS_ABORT_IF_FALSE(event.fileName, + "FillScriptErrorEvent should give us a non-null string " + "for our error's fileName"); - init.mMessage = errorName; - init.mCancelable = true; - init.mBubbles = true; + event.errorMsg = errorName.get(); nsCOMPtr sgo(do_QueryInterface(aOwner)); NS_ASSERTION(sgo, "How can this happen?!"); nsEventStatus status = nsEventStatus_eIgnore; - if (NS_FAILED(sgo->HandleScriptError(init, &status))) { + if (NS_FAILED(sgo->HandleScriptError(&event, &status))) { NS_WARNING("Failed to dispatch script error event"); status = nsEventStatus_eIgnore; } @@ -368,8 +368,8 @@ IndexedDatabaseManager::FireWindowOnError(nsPIDOMWindow* aOwner, NS_ENSURE_SUCCESS(rv, rv); if (NS_FAILED(scriptError->InitWithWindowID(errorName, - init.mFilename, - EmptyString(), init.mLineno, + nsDependentString(event.fileName), + EmptyString(), event.lineNr, 0, 0, "IndexedDB", aOwner->WindowID()))) { diff --git a/dom/webidl/Window.webidl b/dom/webidl/Window.webidl index c6d60bcc2ec7..bfd04893c98b 100644 --- a/dom/webidl/Window.webidl +++ b/dom/webidl/Window.webidl @@ -88,10 +88,10 @@ Window implements WindowEventHandlers; interface WindowTimers { [Throws] long setTimeout(Function handler, optional long timeout = 0, any... arguments); [Throws] long setTimeout(DOMString handler, optional long timeout = 0, any... unused); - [Throws] void clearTimeout(optional long handle = 0); + [Throws] void clearTimeout(long handle); [Throws] long setInterval(Function handler, optional long timeout, any... arguments); [Throws] long setInterval(DOMString handler, optional long timeout, any... unused); - [Throws] void clearInterval(optional long handle = 0); + [Throws] void clearInterval(long handle); }; Window implements WindowTimers; diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 3237073ca069..03cf32eb6efb 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -1186,16 +1186,16 @@ public: // they show up in the error console. if (!JSREPORT_IS_WARNING(aFlags)) { // First fire an ErrorEvent at the worker. - ErrorEventInit init; - init.mMessage = aMessage; - init.mFilename = aFilename; - init.mLineno = aLineNumber; - init.mCancelable = true; - init.mBubbles = true; - if (aTarget) { + ErrorEventInit init; + init.mMessage = aMessage; + init.mFilename = aFilename; + init.mLineno = aLineNumber; + init.mCancelable = true; + nsRefPtr event = ErrorEvent::Constructor(aTarget, NS_LITERAL_STRING("error"), init); + event->SetTrusted(true); nsEventStatus status = nsEventStatus_eIgnore; @@ -1219,22 +1219,30 @@ public: WorkerGlobalScope* globalTarget = aWorkerPrivate->GlobalScope(); MOZ_ASSERT(target == globalTarget->GetWrapperPreserveColor()); - nsRefPtr event = - ErrorEvent::Constructor(aTarget, NS_LITERAL_STRING("error"), init); - event->SetTrusted(true); + // Icky, we have to fire an InternalScriptErrorEvent... + MOZ_ASSERT(!NS_IsMainThread()); + InternalScriptErrorEvent event(true, NS_USER_DEFINED_EVENT); + event.lineNr = aLineNumber; + event.errorMsg = aMessage.get(); + event.fileName = aFilename.get(); + event.typeString = NS_LITERAL_STRING("error"); nsIDOMEventTarget* target = static_cast(globalTarget); - if (NS_FAILED(nsEventDispatcher::DispatchDOMEvent(target, nullptr, - event, nullptr, - &status))) { + if (NS_FAILED(nsEventDispatcher::Dispatch(target, nullptr, &event, + nullptr, &status))) { NS_WARNING("Failed to dispatch worker thread error event!"); status = nsEventStatus_eIgnore; } } else if ((sgo = nsJSUtils::GetStaticScriptGlobal(target))) { + // Icky, we have to fire an InternalScriptErrorEvent... MOZ_ASSERT(NS_IsMainThread()); + InternalScriptErrorEvent event(true, NS_LOAD_ERROR); + event.lineNr = aLineNumber; + event.errorMsg = aMessage.get(); + event.fileName = aFilename.get(); - if (NS_FAILED(sgo->HandleScriptError(init, &status))) { + if (NS_FAILED(sgo->HandleScriptError(&event, &status))) { NS_WARNING("Failed to dispatch main thread error event!"); status = nsEventStatus_eIgnore; } @@ -3185,15 +3193,13 @@ WorkerPrivateParent::BroadcastErrorToSharedWorkers( MOZ_ASSERT(sgo); MOZ_ASSERT(NS_IsMainThread()); - ErrorEventInit init; - init.mLineno = aLineNumber; - init.mFilename = aFilename; - init.mMessage = aMessage; - init.mCancelable = true; - init.mBubbles = true; + InternalScriptErrorEvent event(true, NS_LOAD_ERROR); + event.lineNr = aLineNumber; + event.errorMsg = aMessage.BeginReading(); + event.fileName = aFilename.BeginReading(); nsEventStatus status = nsEventStatus_eIgnore; - rv = sgo->HandleScriptError(init, &status); + rv = sgo->HandleScriptError(&event, &status); if (NS_FAILED(rv)) { Throw(cx, rv); JS_ReportPendingException(cx); diff --git a/widget/BasicEvents.h b/widget/BasicEvents.h index 064b491134bb..8af75df20fec 100644 --- a/widget/BasicEvents.h +++ b/widget/BasicEvents.h @@ -49,6 +49,7 @@ enum nsEventStructType NS_TOUCH_EVENT, // WidgetTouchEvent // ContentEvents.h + NS_SCRIPT_ERROR_EVENT, // InternalScriptErrorEvent NS_SCROLLPORT_EVENT, // InternalScrollPortEvent NS_SCROLLAREA_EVENT, // InternalScrollAreaEvent NS_FORM_EVENT, // InternalFormEvent diff --git a/widget/ContentEvents.h b/widget/ContentEvents.h index d5b844f488f4..7763927534e9 100644 --- a/widget/ContentEvents.h +++ b/widget/ContentEvents.h @@ -19,6 +19,55 @@ class nsIContent; namespace mozilla { +/****************************************************************************** + * mozilla::InternalScriptErrorEvent + ******************************************************************************/ + +class InternalScriptErrorEvent : public WidgetEvent +{ +public: + virtual InternalScriptErrorEvent* AsScriptErrorEvent() MOZ_OVERRIDE + { + return this; + } + + InternalScriptErrorEvent(bool aIsTrusted, uint32_t aMessage) : + WidgetEvent(aIsTrusted, aMessage, NS_SCRIPT_ERROR_EVENT), + lineNr(0), errorMsg(nullptr), fileName(nullptr) + { + } + + virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE + { + MOZ_ASSERT(eventStructType == NS_SCRIPT_ERROR_EVENT, + "Duplicate() must be overridden by sub class"); + InternalScriptErrorEvent* result = + new InternalScriptErrorEvent(false, message); + result->AssignScriptErrorEventData(*this, true); + result->mFlags = mFlags; + return result; + } + + + int32_t lineNr; + const char16_t* errorMsg; + const char16_t* fileName; + + // XXX Not tested by test_assign_event_data.html + void AssignScriptErrorEventData(const InternalScriptErrorEvent& aEvent, + bool aCopyTargets) + { + AssignEventData(aEvent, aCopyTargets); + + lineNr = aEvent.lineNr; + + // We don't copy errorMsg and fileName. If it's necessary, perhaps, this + // should duplicate the characters and free them at destructing. + errorMsg = nullptr; + fileName = nullptr; + } +}; + /****************************************************************************** * mozilla::InternalScrollPortEvent ******************************************************************************/ diff --git a/widget/EventClassList.h b/widget/EventClassList.h index 6a7f5f144666..27e3afcdd083 100644 --- a/widget/EventClassList.h +++ b/widget/EventClassList.h @@ -41,6 +41,7 @@ NS_EVENT_CLASS(Widget, SimpleGestureEvent) NS_EVENT_CLASS(Widget, TouchEvent) // ContentEvents.h +NS_EVENT_CLASS(Internal, ScriptErrorEvent) NS_EVENT_CLASS(Internal, ScrollPortEvent) NS_EVENT_CLASS(Internal, ScrollAreaEvent) NS_EVENT_CLASS(Internal, FormEvent) diff --git a/widget/tests/test_assign_event_data.html b/widget/tests/test_assign_event_data.html index 0c7eec2cf4ca..7aee46b476a3 100644 --- a/widget/tests/test_assign_event_data.html +++ b/widget/tests/test_assign_event_data.html @@ -74,6 +74,17 @@ function onEvent(aEvent) } const kTests = [ + { description: "InternalScriptErrorEvent", + targetID: "input-text", eventType: "error", + dispatchEvent: function () { + return; + }, + canRun: function () { + todo(false, "InternalScriptErrorEvent isn't tested"); + return false; + }, + todoMismatch: [], + }, { description: "InternalScrollPortEvent (overflow, vertical)", targetID: "scrollable-div", eventType: "overflow", dispatchEvent: function () {