Joined: Jan 2009
Posts: 44,163
Likes: 6,382
From: New York, NY, and High Falls, NY, USA
Bikes: 1962 Rudge Sports, 1971 Raleigh Super Course, 1971 Raleigh Pro Track, 1974 Raleigh International, 1975 Viscount Fixie, 1982 McLean, 1996 Lemond (Ti), 2002 Burley Zydeco tandem
My B&M Ixon Core headlight can run while charging, but a lot of lights won't do this. I suspect it's hard to design such a thing, or maybe it costs more to make it that way.
I suspect you won't damage anything if you can get your project to work. You may want to test the voltage while it's charging. I don't know what Li-Ion batteries do when the input charging voltage is too low, but I suspect they'll just ignore it, so to speak.