Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Autonomous Design

Diagrams and answers related to the task

Demo

Here is a link to the working project: Live Demo

Custom function for implementation of getElementById

function getElementById(id) {
          
            var rootElement = document.documentElement;

         
            function findElement(currentElement) {
                if (currentElement.id === id) {
                    return currentElement; 
                }

                for (var i = 0; i < currentElement.children.length; i++) {
                    var childElement = currentElement.children[i];
                    var result = findElement(childElement); 
                    if (result) {
                        return result; 
                    }
                }

                return null; 
            }

            return findElement(rootElement); 
        }

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages