1
0
Fork 0

Fixed visibility issues in IE6

- Wasn't properly falling back
closure/master
Mike Gerwitz 2011-03-13 21:47:40 -04:00
parent 9acedf6e91
commit d05652f880
2 changed files with 15 additions and 3 deletions

View File

@ -46,12 +46,17 @@ var util = require( './util' ),
*/ */
exports.setup = function( dest, properties, methods ) exports.setup = function( dest, properties, methods )
{ {
var obj = dest;
// this constructor is an extra layer atop of the destination object, which // this constructor is an extra layer atop of the destination object, which
// will contain the private methods // will contain the private methods
var obj_ctor = function() {}; if ( defprop )
obj_ctor.prototype = dest; {
var obj_ctor = function() {};
obj_ctor.prototype = dest;
var obj = new obj_ctor(); obj = new obj_ctor();
}
// initialize each of the properties for this instance to // initialize each of the properties for this instance to
// ensure we're not sharing references to prototype values // ensure we're not sharing references to prototype values

View File

@ -479,6 +479,13 @@ var common = require( './common' ),
*/ */
( function testParentsShouldNotHaveAccessToPrivateMembersOfSubtypes() ( function testParentsShouldNotHaveAccessToPrivateMembersOfSubtypes()
{ {
// browsers that do not support the property proxy will not support
// encapsulating properties
if ( !( propobj.supportsPropProxy() ) )
{
return;
}
// property // property
assert.equal( assert.equal(
sub_foo.nonOverrideGetProp( '_pfoo' ), sub_foo.nonOverrideGetProp( '_pfoo' ),