fix Issue 11789 - No setAttributes to complement getAttributes

[Issue 11789](https://d.puremagic.com/issues/show_bug.cgi?id=11789)