function newPropertyBag(aProperties)
{
  let propertyBag = Cc["@mozilla.org/hash-property-bag;1"]
                      .createInstance(Ci.nsIWritablePropertyBag);
  if (aProperties) {
    for (let [name, value] of Iterator(aProperties)) {
      propertyBag.setProperty(name, value);
    }
  }
  return propertyBag.QueryInterface(Ci.nsIPropertyBag)
                    .QueryInterface(Ci.nsIPropertyBag2)
                    .QueryInterface(Ci.nsIWritablePropertyBag2);
}
/**
 * Returns a new XPCOM property bag with the provided properties.
 *
 * @param aProperties
 *        Each property of this object is copied to the property bag.  This
 *        parameter can be omitted to return an empty property bag.
 *
 * @return A new property bag, that is an instance of nsIWritablePropertyBag,
 *         nsIWritablePropertyBag2, nsIPropertyBag, and nsIPropertyBag2.
 */
Returns a new XPCOM property bag with the provided properties.
@param aProperties
Each property of this object is copied to the property bag.  This
parameter can be omitted to return an empty property bag.

@return A new property bag, that is an instance of nsIWritablePropertyBag,
nsIWritablePropertyBag2, nsIPropertyBag, and nsIPropertyBag2.
Returns a new XPCOM property bag with the provided properties . @param aProperties Each property of this object is copied to the property bag . This parameter can be omitted to return an empty property bag . @return A new property bag that is an instance of nsIWritablePropertyBag nsIWritablePropertyBag2 nsIPropertyBag and nsIPropertyBag2 .
function newPropertyBag(aProperties)
{
  let propertyBag = Cc["@mozilla.org/hash-property-bag;1"]
                      .createInstance(Ci.nsIWritablePropertyBag);
  if (aProperties) {
    for (let [name, value] of Iterator(aProperties)) {
      propertyBag.setProperty(name, value);
    }
  }
  return propertyBag.QueryInterface(Ci.nsIPropertyBag)
                    .QueryInterface(Ci.nsIPropertyBag2)
                    .QueryInterface(Ci.nsIWritablePropertyBag2);
}
function newPropertyBag ( aProperties ) { let propertyBag = Cc [ "@mozilla.org/hash-property-bag;1" ] . createInstance ( Ci . nsIWritablePropertyBag ) ; if ( aProperties ) { for ( let [ name , value ] of Iterator ( aProperties ) ) { propertyBag . setProperty ( name , value ) ; } } return propertyBag . QueryInterface ( Ci . nsIPropertyBag ) . QueryInterface ( Ci . nsIPropertyBag2 ) . QueryInterface ( Ci . nsIWritablePropertyBag2 ) ; }
Returns a new XPCOM property bag with the provided properties.
Returns a new XPCOM property bag with the provided properties .