URL Parsing with RegEx, createElement and new URL()

Опубликовано: 01 Октябрь 2024
на канале: DevTips
19,501
402

Exploring how to parse URLs first with Regular Expressions (RegExp), then with document.createElement, and finally with new URL().

Example with RegEx
https://codepen.io/devtips/pen/pVZbaw

Example with document.createElement
https://codepen.io/devtips/pen/GdXRwK

In which browsers will url.searchParams work?
https://caniuse.com/#feat=urlsearchpa...