dom and canvas methods