Add more functions to element-factory.js.