Skip to content

Commit

Permalink
revert changes for setting attributes as Properties, see #870
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Nov 14, 2018
1 parent da36ca1 commit f30fe1f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions js/accessibility/AccessiblePeer.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,18 +524,7 @@ define( function( require ) {
element.setAttributeNS( options.namespace, attribute, attributeValue );
}
else if ( options.asProperty ) {
assert && assert( typeof attributeValue === 'boolean', 'value for attribute as property must be boolean' );
if ( attributeValue ) {

// treat it like a property, set in a way that works for elements with a custom namespace (like MathML),
// see https://github.com/phetsims/scenery/issues/870
element.setAttribute( attribute, '' );
}
else {

// support false so that setting property attribute false will remove attribute
element.removeAttribute( attribute );
}
element[ attribute ] = attributeValue;
}
else {
element.setAttribute( attribute, attributeValue );
Expand Down

0 comments on commit f30fe1f

Please sign in to comment.