Changes between Version 10 and Version 14 of Ticket #7141


Ignore:
Timestamp:
01/17/2019 09:09:19 AM (8 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7141

    • Property Priority changed from Unknown to P2
    • Property Ready set
  • Ticket #7141 – Description

    v10 v14  
    11=== Background === 
    2 Implement `abort-current-inline-script` snippet that will abort a script based on a function it calls and its text content. 
     2Implement `abort-current-inline-script` snippet that will abort an inline script based on an API it accesses and the text content of the script. 
    33 
    44While this looks like issue #6983, this snippet runs on Chrome as well. 
    55 
    66=== What to change === 
    7 * Add the snippet in `lib/content/snippets.js`. 
     7Implement a snippet with the following signature: 
     8 
     9{{{ 
     10function abortCurrentInlineScript(api, search = null) 
     11}}} 
     12 
     13The value of the `api` parameter may be a string like `"window.location.href"` or `"console.log"`. If the specified API exists, it should be wrapped such that accessing the API causes the parent script to abort if it is an inline script. 
     14 
     15The `search` parameter may be a string, optionally surrounded by `/` (slashes) so it is treated as a regular expression. If it is specified, the inline script should be aborted only if it contains the given pattern. 
    816 
    917=== Note for testers ===