Skip to content

Conversation

benjackwhite
Copy link
Collaborator

@benjackwhite benjackwhite commented Apr 17, 2023

Changes

Allows better control of masking an input by having access to the element in question. (brings this PR into support via our SDK.

Updates to rrweb alpha 8

e.g.

posthog.init("key", {
  session_recording: {
    maskAllInputs: true,
    maskInputFn: (text: string, element: HTMLElement) => {
        // If the element has the attribute "data-unmask-example", we don't mask it
        if (element.hasAttribute('data-unmask-example')) {
            return text;
        }

        return '*'.repeat(text.length);
    }
})
// will NOT mask <input type="text" data-unmask-example />

Checklist

@benjackwhite benjackwhite added the bump patch Bump patch version when this PR gets merged label Apr 17, 2023
@benjackwhite benjackwhite requested a review from pauldambra April 17, 2023 14:00
@github-actions
Copy link

Size Change: +1.01 kB (0%)

Total Size: 2.29 MB

Filename Size Change
dist/recorder-v2.js 93.6 kB +1.01 kB (+1%)
ℹ️ View Unchanged
Filename Size
dist/array.full.js 154 kB
dist/array.js 96 kB
dist/es.js 95.8 kB
dist/module.js 96 kB
dist/recorder.js 58.3 kB
lib/rrweb/dist/plugins/console-record.js 26.6 kB
lib/rrweb/dist/plugins/console-record.min.js 10.8 kB
lib/rrweb/dist/plugins/console-replay.js 12.7 kB
lib/rrweb/dist/plugins/console-replay.min.js 5.72 kB
lib/rrweb/dist/plugins/sequential-id-record.js 910 B
lib/rrweb/dist/plugins/sequential-id-record.min.js 417 B
lib/rrweb/dist/plugins/sequential-id-replay.js 1.24 kB
lib/rrweb/dist/plugins/sequential-id-replay.min.js 578 B
lib/rrweb/dist/record/rrweb-record-pack.js 31.4 kB
lib/rrweb/dist/record/rrweb-record-pack.min.js 10.7 kB
lib/rrweb/dist/record/rrweb-record.js 140 kB
lib/rrweb/dist/record/rrweb-record.min.js 51.7 kB
lib/rrweb/dist/replay/rrweb-replay-unpack.js 188 kB
lib/rrweb/dist/replay/rrweb-replay-unpack.min.js 71.1 kB
lib/rrweb/dist/replay/rrweb-replay.js 172 kB
lib/rrweb/dist/replay/rrweb-replay.min.js 66.4 kB
lib/rrweb/dist/rrweb-all.js 356 kB
lib/rrweb/dist/rrweb-all.min.js 133 kB
lib/rrweb/dist/rrweb.js 302 kB
lib/rrweb/dist/rrweb.min.js 116 kB
lib/rrweb/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js 1.94 kB
lib/rrweb/es/rrweb/ext/mitt/dist/mitt.es.js 1.99 kB

compressed-size-action

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@pauldambra pauldambra merged commit 3dedb5f into master Apr 18, 2023
@pauldambra pauldambra deleted the feat/rrweb-alpha-8 branch April 18, 2023 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants