I'm @asutherland on github.  Zac already filed a bug about our use of id's in 2 places for dialogs.  https://bugzilla.mozilla.org/show_bug.cgi?id=848727

We never actually use getElementById in the code; we always key off classes that are unique inside a card, so doing the same should be just as stable, or even more stable because we probably remove the id's at some point.  However, in that case, you wouldn't want to involve 'body' in your selector, you'd want to involve the card class name, which will always be "card-CARDFAMILY-CARDNAME".  So "card-settings-account-credentials".