// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // https://html.spec.whatwg.org/C/webappapis.html#event-handler-attributes // This definition is different from standard in order to handle special types // (OnErrorEventHandler, OnBeforeUnloadEventHandler) in the same type with // regular EventHandler. [LegacyTreatNonObjectAsNull] callback EventHandlerNonNull = any (any... args); typedef EventHandlerNonNull? EventHandler; // https://html.spec.whatwg.org/C/#onerroreventhandler [LegacyTreatNonObjectAsNull] callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long colno, optional any error); typedef OnErrorEventHandlerNonNull? OnErrorEventHandler; // https://html.spec.whatwg.org/C/#onbeforeunloadeventhandler [LegacyTreatNonObjectAsNull] callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event); typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;