Certain messenger molecules fight damage to the lungs from noxious air by telling the muscle cells encircling the lungs' airways to contract  This partially seals off the lungs
An asthma attack occurs when the messenger molecules are activated unnecessarily, in response to harmless things like pollen or household dust
Such a medication would be a preventative only and would be unable to alleviate an asthma attack once it had started.