[HtmlUnit] [htmlunit:bugs] #1968 Function.prototype.toString shall return actual source code

RBRi via HtmlUnit-develop <[email protected]> Fri, 10 Aug 2018 06:18:10 -0000
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID </p/htmlunit/bugs/1968/654db5bd3098579c6a4d175b39b7ae03adaa0b9a.bugs@htmlunit.p.sourceforge.net>
- **status**: pending --> accepted
- **Comment**:

ok, now i got your point - will have a look if i can fix this



---

** [bugs:#1968] Function.prototype.toString shall return actual source code**

**Status:** accepted
**Group:** 2.31
**Created:** Sun Jun 17, 2018 11:49 AM UTC by Alex
**Last Updated:** Sun Jul 22, 2018 05:38 PM UTC
**Owner:** RBRi


Some scripts make use of Function.prototype.toString  and rely on it beeing the original source code especially newlines. This is due to some pattern matching done later via regexp. This breaks with the unparsing/decompiling that HTMLUNIT does.

I therefore propose to store the original JS source and directly return it.

This is the same as browsers do. Example: https://bugzilla.mozilla.org/show_bug.cgi?id=761723


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
HtmlUnit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop