You can also write a custom binding code instead of adding a new IDL keyword for this specific use case.
- R. Niwa On Wed, Apr 10, 2013 at 3:02 PM, Victor Costan <[email protected]> wrote: > Dear WebKit devs, > > > I would like to make console.log and related functions work without > requiring that "this" is set to the console object. This would make > debugging from Web Inspector easier, because console.log could be > passed directly to functions that require a callback, instead of > having to pass function(arg) { console.log(arg); } > > In order to make this happen, I need a static method that shows up on > the console object (or its prototype). The closest thing I could find > in WebIDL is the [LenientThis] attribute. In WebIDL it's only intended > for attributes, but I think it would be very useful for methods. > > If it makes a difference, Firefox supports using console.log without > "this" being the console object, and this feature has been requested > on the Chromium bug tracker, so it is useful to people other than > myself. > > > Before I embark on a quest to learn Perl so I can change the code > generator, I would like to check if this is worthwhile. Would a patch > along these lines be considered for WebKit? Is there another > established pattern for achieving my goal? (e.g. some form of const > attribute that returns a function?) > > Thank you very much for your help, > Victor > _______________________________________________ > webkit-dev mailing list > [email protected] > https://lists.webkit.org/mailman/listinfo/webkit-dev >
_______________________________________________ webkit-dev mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-dev

