Added encoding as JavaScript of new elements.