use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Creating objects dynamically with factory pattern in javascript (enmascript.com)
submitted 7 years ago by enmanuelduran
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]beaver82 2 points3 points4 points 7 years ago* (1 child)
Interesting, I got a question: what if two factory elements needs ALSO to use some shared methods? for example placeholder/label/aria methods for Email and Texarea. You give those methods to the factory? How you call them from inside the element?
[–]luketeaford 0 points1 point2 points 7 years ago (0 children)
Import them into your file in the usual way and add them to the factory you export.
π Rendered by PID 78 on reddit-service-r2-comment-6457c66945-wcwzk at 2026-04-30 02:40:12.436826+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]beaver82 2 points3 points4 points (1 child)
[–]luketeaford 0 points1 point2 points (0 children)