Thanks for the reply.
Actually, there is an object with sold and available materials. There is an outline for double click on material (I added in verge3d) but I want add outline to group of materials (for example, group of available) when check box is is checked. My new function for adding outline is outside of the PL.init function. So, v3d.apps[0].postprocessing.outlinePass.visibleEdgeColor = new v3d.Vector4(0,0,1,1) cannot be used out of scope.