Never tried it, but I would expect that in order to get long enough exposure for the fireworks that there would be no detail left in the moon. Keep in mind that the moon is quite bright since it is reflected sunlight. Perhaps the best approach would be multiple exposures...one for the moon with a shorter exposure then blend in longer exposures for the fireworks. Often people blend fireworks exposures anyway to get multiple complimentary bursts in one frame. Could make for an interesting shot anyway and worth a try.

Stephen