Ticket #253 (closed task: fixed)
Support dotted-object creation
| Reported by: | t-bone | Owned by: | t-bone |
|---|---|---|---|
| Priority: | minor | Component: | Karma Blocker |
| Version: | Severity: | Feature | |
| Keywords: | Cc: |
Description
It's becoming increasingly common for pages to use a new style of Google Analytics ( http://www.google.com/analytics/ one example of this style) that does something like this:
var pageTracker = _gat._getTracker("...");
After including a script that defines _gat. If this script is blocked, the above line generates a JS error. Karma blocker's "function inject" feature is designed to mask these errors, but does not support defining a function in an otherwise nonexistent object. This rule:
[Inject] function='_get._getTracker'
Should inject (if it does not exist) an empty _gat object, then define a _getTracker property, as a null function.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.