Bug 1952250 - Implement the Sanitizer removeUnsafe method. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D241071
This commit is contained in:
Tom Schuster
2025-03-14 08:57:34 +00:00
parent ef87ea2803
commit 04410ddaa1
5 changed files with 180 additions and 6 deletions

View File

@@ -31,6 +31,7 @@
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/BasicEvents.h"
#include "mozilla/FunctionRef.h"
#include "mozilla/SourceLocation.h"
#include "mozilla/CORSMode.h"
#include "mozilla/CallState.h"
@@ -1748,6 +1749,17 @@ class nsContentUtils {
*/
static EventMessage GetEventMessage(nsAtom* aName);
/**
* Iterate through all event attribute names (such as onclick) that
* are valid for a given element type. Types are from the EventNameType
* enumeration defined above.
*
* @param aType the type of content
* @param aFunc iterator functor
*/
static void ForEachEventAttributeName(
int32_t aType, const mozilla::FunctionRef<void(nsAtom*)> aFunc);
/**
* Return the event type atom for a given event message.
*/