With the new CustomEvent() directive, we can create a new, named event to use in our program. Sometimes, user interactions or page behavior don't fully handle what we need. Custom events can help with that need. Notice in the preceding code that the detail object contains data to be passed with the event, and we use document.dispatchEvent() to send it to the event stream. Creating an event listener for a custom event is the same as doing so with a built-in event: use .addEventListener(). We'll want to use the doMove() function.
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
South Africa
Thailand
Ukraine
Switzerland
Slovakia
Luxembourg
Hungary
Romania
Denmark
Ireland
Estonia
Belgium
Italy
Finland
Cyprus
Lithuania
Latvia
Malta
Netherlands
Portugal
Slovenia
Sweden
Argentina
Colombia
Ecuador
Indonesia
Mexico
New Zealand
Norway
South Korea
Taiwan
Turkey
Czechia
Austria
Greece
Isle of Man
Bulgaria
Japan
Philippines
Poland
Singapore
Egypt
Chile
Malaysia