Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Preserve function name#1145

Unanswered
ramosjeremy asked this question inQ&A
Feb 2, 2023· 2 comments· 2 replies
Discussion options

I have a function named eventCapture(). I would like to keep the name of the function unchanged so that I can reference it in another segment of code. Is there a way to do that, or is there a way to know that the new symbol is for the function's name?

You must be logged in to vote

Replies: 2 comments 2 replies

Comment options

You could use whitelist to save your function(s) name. If I right understand what do you want.

You must be logged in to vote
0 replies
Comment options

Suppose I have a file with

function eventCapture(){
// Some logic that I want obfuscated here
return result
}

Then I have another file that will be calling eventCatpure. This second file cannot be obfuscated.

div.onclick = eventCapture

How can I obfuscate the body of the eventCapture function, so that I can reference it as above?

You must be logged in to vote
2 replies
@relative
Comment options

addreservedNames: ['eventCapture'] to your obfuscator configuration

@ramosjeremy
Comment options

That worked. Thank you so much.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@ramosjeremy@BlackYuzia@relative

[8]ページ先頭

©2009-2025 Movatter.jp