Nit: Might be cleaner to have this logic in its own function. Don't want to end up with monolithic `createdCallback` bodies :)