SyndicodeSyndicode
Syndicode
Ruby on Rails, iOS, Android development agency
  • Home
  • Portfolio
  • Products
    • Marketplace
    • MVP
    • Web App
    • Website
    • Mobile App
    • Prototype
    • Enterprise App
    • Web Service
    • Backend
    • API Consumers
    • API Providers
  • Services
    • Dedicated professionals
    • Custom software development
    • Product Management
    • Project Management
  • Skills
    • Ruby on Rails
    • Android app development
    • iOS app development
    • UI/UX Design
  • Career
  • Blog
  • Video
  • Contact us
  • Language
Menu back  
FacebookLinkedinTwitterGithubBehanceTripAdvisorInstagram
 

15 HTML secret element methods

August 23, 2018blogBy Tonya Smyrnova
15 HTML secret element methods. Syndicode news

Previously we published a material where you could briefly look through the brief description what’s new in HTML 5.2. And now let’s discuss the difference between HTML and the DOM and 15 HTML secret elements methods you’ve probably never heard about. 

#1 table methods The .insertRow() method will even insert a <tbody> for you if you call it directly on a table element.

#2 scrollIntoView() You know how, when you have #something in the URL, then when the page loads, the browser will scroll the page so you can see the element with that ID

#3 hidden You can just do myElement.hidden = true.

#4 toggle() it’s a method to toggle adding/removing a class from an element, with myElement.classList.toggle('some-class').

#5 querySelector() myElement.querySelector('.my-class') will only match elements that have the class my-classand are descendants of myElement.

#6 closest() This is a method available on all elements that looks up the element tree. It’s like a reversoquerySelector().

#7 getBoundingClientRect() This returns a neat little object with some dimensional details about the element you called it on.

#8 matches() checks if a particular element has a particular class.

#9 insertAdjacentElement() It’s like appendChild() but gives a bit more control over where you’re appending that child.

#10 contains() Where modalEl is a reference to my modal, and e.target will be whichever element was clicked on.

#11 getAttribute() One of these helpful properties is href, which will give you the full URL, with all the trimmings, not the relative URL in the attribute.

#12 the dialog element trio The relatively new <dialog> element has two just-OK methods and one amazing method. show() and close() will do exactly what you expect them to do.

#13 forEach() Sometimes, when you get a reference to a list of elements, you can iterate over them with forEach().

#14 Forms A <form>, as you most likely already know, has a submit() method. It’s slightly less likely that you know forms have a reset() method and can reportValidity() if you’re using validation on your form elements.

#15 select()  the .select() method will select all of the text in whatever input you call it on.

Please check the code for every element here.

attributesbrowser supportDOMelement methodhtmlHTML methodsjavascriptjsmarkupprogrammingquerySelectortable methodstogglewebweb development
Share this post
FacebookTwitterLinkedInGoogle+
About the author

Tonya Smyrnova

Marketing manager and a tech writer at Syndicode who speaks more than four languages.

Related posts
Kinderlime received two awards from Capterra! Syndicode news
Kinderlime received two awards from Capterra!
February 18, 2019
NEXT BLOCK Blockchain Conference Sofia 2.0 welcomes you! Syndicode event
NEXT BLOCK Blockchain Conference Sofia 2.0 welcomes you!
February 18, 2019
What do you know about Ruby Struct? Syndicode news
What do you know about Ruby Struct?
February 18, 2019
Thinking like a programmer. Syndicode news
Thinking like a programmer
February 17, 2019
Google Play Store now open for PWA. Syndicode news
Google Play Store now open for PWA
February 17, 2019
Node_modules anyone?
February 16, 2019
HIRE SYNDICODE
Make your next project a smooth sailing with the help of Syndicode developers!

Submitclear

Search
Tags
Angular api backend blockchain business code css design elixir frontend functional programming github google html IT javascript js Kyiv markup Node Node.js OOP Open source programming rails react react.js RoR ruby ruby on rails software development startup syndicode tech Technology testing UI Ukraine UX UX design Vue vue.js Web App web design web development
Recent blog posts
  • Kinderlime received two awards from Capterra! Syndicode news
    Kinderlime received two awards from Capterra!
    February 18, 2019
  • NEXT BLOCK Blockchain Conference Sofia 2.0 welcomes you! Syndicode event
    NEXT BLOCK Blockchain Conference Sofia 2.0 welcomes you!
    February 18, 2019
  • What do you know about Ruby Struct? Syndicode news
    What do you know about Ruby Struct?
    February 18, 2019
  • Thinking like a programmer. Syndicode news
    Thinking like a programmer
    February 17, 2019
  • Google Play Store now open for PWA. Syndicode news
    Google Play Store now open for PWA
    February 17, 2019
Customer stories
Fuzu case. Syndicode HelloCare marketplace android mobile app main cover image Kinderlime - Web and mobile app to Empower your Childcare. Syndicode portfolio Senden24, instant delivery service, screen Ruby on rails SaaS business accounting microservices platfrom development Woobra: selling page screenshot, Syndicode Clean Agents. Ruby on rails marketplace development for cleaning services in Germany Ruby on rails, iOS and Android development of e-concierge apps for hotels Wecam mobile interface UKRAVIT: CRM for agro business company. Syndicode Ruby on rails professional social network and marketplace for conference videos GradReady SaaS platform for education
Testimonials
  • We, at SalesValue, are very pleased to work with the Syndicode team! They are skilled professionals who can get the job done right on time. They have great people that are easy to work with and quickly understands the business needs. Syndicode is working on our Software as a Service solution for Sales Enablement, which includes advanced features like integration to Microsoft Graph, Google Drive, Salesforce and Dynamics CRM, as well as machine learning and algorithms. We can highly recommend them.

    ThomasThejn, CEO at SalesValue. Syndicode testimonials
    ThomasThejn, CEO at SalesValue
  • Syndicode has been a great development partner for us at Southern Made. They have helped us build a variety of websites and apps; everything from microsites that went from design to deployment in a matter of days to large-scale applications and APIs that were developed over many months. In addition to developing new web properties, they have been able to jump in and provide maintenance support on a wide variety of our existing apps with very quick ramp-up time. Syndicode works hard to make themselves available for constant communication and is a development partner I would highly recommend to anyone building web-based applications.

    Matt Mueller, Founder, Southern Made. Syndicode testimonials
    Matt Mueller, Founder, Southern Made
  • Syndicode team is awesome. It provides a channel to hire exceptional developers that share our DNA, vision and are full part in the team and company future. Appreciate a lot how highly knowledgeable everyone is about tech & business. A great environment to work and grow!

    Hotel Cloud – e-concierge mobile apps

    Hotel Cloud - e-concierge mobile apps. Syndicode
    DAVID-BENJAMIN BRAKHA, Founder & CEO
  • We are very happy with Syndicode’s highly skilled ruby on rails developers. They helped to optimize the VYDA backend massively. I can recommend them for highload complex projects.

    VYDA – video screencasts live sharing social network

    Markus Lichtenheldt, Founder & CEO
  • Inno-W Oy became first client of newly formed Syndicode agency since we have had long lasting cooperation with Syndicode’s CTO Anton Naumenko. They have provided ruby on rails and php development services in our various projects. Syndicode performs best as technology partner because they are experts in software engineering and very business oriented.

    Henry Palonen, CEO, Inno-W Oy
  • Syndicode helped during transition from MVP to beta release of SummitHub under tight schedule. Thanks to their expertise in continuous delivery process and instruments for Ruby on rails stack, we managed to pilot first conferences without any technical problems.

    SummitHub – professional knowledge network

    Jouni Renfors, Technical Lead, SummitHub
    Jouni Renfors, Technical Lead
  • © 2014 - 2019 Syndicode
  • Non-Disclosure Agreement
  • Privacy Policy
  • Syndicode Logos
  • Bilakasa
BottomMenu
FacebookLinkedinTwitterGithubBehanceTripAdvisorInstagram

We love our clients

We will beat any genuine quote by 5%

Contact us

no thanks, I do not want this opportunity

{"cookieName":"wBounce","isAggressive":false,"isSitewide":true,"hesitation":"","openAnimation":false,"exitAnimation":false,"timer":"","sensitivity":"","cookieExpire":"","cookieDomain":"","autoFire":"","isAnalyticsEnabled":true}