Documentation - v7.17.0
    Preparing search index...

    Function setAllowUntrustedEvents

    • Configures whether listeners registered with addEventListener receive untrusted events (events with isTrusted: false, typically dispatched by scripts).

      Until this is called, events are not filtered. Once set to false, untrusted events are ignored unless marked with __ddIsTrusted (see TrustableEvent). The most permissive value wins: once set to true, later calls cannot set it back to false.

      The setting is module-level state, so it is only shared by SDKs that use the same @datadog/js-core module instance (e.g. RUM and Logs installed from npm in the same bundle). SDKs loaded as separate CDN bundles each have their own copy.

      Parameters

      • value: boolean | undefined

        true to accept untrusted events; false or undefined to ignore them.

      Returns void