-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes global handling of "function foo() {}"
JavaScript acts a bit odd in this case in that the body of 'foo' is passed to JS_Class.add_property but not JS_Class.set_property. For now I added an add_prop method that special cases when the passed in value is a function and delegates to set_prop. While I was at it, I went ahead and added support for deleting global properties as well. If your global handler has __delitem__ defined, it will now get called for the JavaScript statement "delete foo;" Thanks to Riccardo Pelizzi for the bug report.
- Loading branch information
Showing
4 changed files
with
102 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters