This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251643 - Local variable not visible in prototype's function body
Summary: Local variable not visible in prototype's function body
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-04 12:28 UTC by Vladimir Riha
Modified: 2015-04-17 17:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2015-04-04 12:28:35 UTC
Please try:


=== file start ===
"use strict";

var sanitizer = require("sanitizer");

String.prototype.sa = function(){
    
// cc here

};

/**
 * Removes unsafe tags and attributes from html
 * @param {String} inputData
 * @returns {String} stripped String
 */
exports.sanitize = function(inputData){
  return sanitizer.sanitize(inputData);
};
=== file end ====


And invoke cc inside the body of String.prototype.sa function => sanitizer is not offered by code completion


Thank you


Product Version: NetBeans IDE Dev (Build 201504040001)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.13.0-45-generic running on amd64; UTF-8; en_US (nb)
Comment 1 Petr Pisl 2015-04-07 14:15:21 UTC
Basically no variables from the module is offered.
Comment 2 Petr Pisl 2015-04-08 13:24:42 UTC
Fixed in web-main
Comment 3 Vladimir Riha 2015-04-17 17:04:54 UTC
Verified, thank you

Product Version: NetBeans IDE Dev (Build 201504170001)
Java: 1.8.0_40; Java HotSpot(TM) Client VM 25.40-b25
Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b25
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)