Skip to content

Commit 5fb44e9

Browse files
committed
simplify and improve the example for getLaterBaseAccess
1 parent fedf8fc commit 5fb44e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ module AccessPath {
275275
*
276276
* This allows `fromRhs` to compute an access path for e.g. the below example:
277277
* ```JavaScript
278-
* function Template(text, opts) {
279-
* opts = opts || {};
280-
* var options = {};
281-
* options.varName = taint;
282-
* this.opts = options; // this.opts.varName is now available
278+
* function foo(x) {
279+
* var obj = {
280+
* bar: x // `x` has the access path "foo.bar" starting from the root `this`.
281+
* };
282+
* this.foo = obj;
283283
* }
284284
* ```
285285
*/

0 commit comments

Comments
 (0)