question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

target node change class name

See original GitHub issue

Class Name should change when calling static methods

Expected Behavior

  1. As the documentation says

Currently the output of browser and node is identical.

But there is a difference between them.

  1. When a class name change it should change the class name in static method calls

Current Behavior

  1. difference between the target node and browser
  2. when calling static methods class name should also change

Steps to Reproduce

Code exmple:

class A { 
	static async one(){
    	
    }
  
  	static async two(){
    	await A.one()
    }

}

When using target=Brwoser:

class A {
    static async ['one']() {
    }
    static async ['two']() {
        await A['one']();
    }
}

When using target=node:

class _0xd91f5a {
    static async ['one']() {
    }
    static async ['two']() {
        await A['one']();
    }
}

When running with a target node you get error because A is not defined

Your Environment

  • Obfuscator version used: 0.24.0
  • Node version used: 12.4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Jan 27, 2020

Will try to fix soon

0reactions
sanex3339commented, Jan 27, 2020

Nice!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change Class Name To An Element In JavaScript
When you use the className property or setAttribute() method, they will replace any existing one or more class names with the new class...
Read more >
How to Change element Class Name using JavaScript
You can use the += operator to add (or change) multiple class names of an element. For example,. if (e.target.className == 'defaultImage') {...
Read more >
How to change class name of ANOTHER element (not the ...
Open up the arrow function's body: const observer = new IntersectionObserver( ([e]) => { e.target.classList.toggle("is-pinned", e.
Read more >
Element.className - Web APIs | MDN
The className property of the Element interface gets and sets the value of the class attribute of the specified element.
Read more >
Cannot change className of parent node. (Example)
Cannot change className of parent node. · html> · head> · title>JavaScript and the DOM</title> · head> · link rel="stylesheet" href="style.css" /> ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found