Roast chiles directly over the flame of a gas-stove burner (or under the broiler), turning with tongs, until blackened all over. Transfer chiles to a large bowl and cover tightly with plastic wrap (or place in a large resealable plastic bag). Let steam until cool enough to handle, about 15 minutes, then peel chiles. Remove steams, ribs, and seeds; cut each chile lengthwise into strips and place in a nonreactive bowl.
Heat oil in a large skillet over medium heat. Add onion; cook until softened and translucent, stirring occasionally, about 7 minutes. Stir in chiles and season with salt. Cover and cook, stirring occasionally, until onion and chiles are tender, about 7 minutes.