chords are added as staff text, not as chord symbol
I replaced the 2 places where you wrote:
var text = newElement(Element.STAFF_TEXT);
var text = newElement(Element.HARMONY);
This leads to real chords in the score.
Also you might replace the greek omega with a simple 0. This is mapped to a stroke circle by MuseScore.
Overall: works very fine for me!