Cut apples and onions into quarters. Remove seeds from apples and set aside. Rinse duck with cold water and pat dry. Discard giblets and organ meats. Trim all loose fat from the inner cavity. Stuff cavity with apples and onions. Sprinkle duck liberally with salt and pierce skin in several places with a fork.
Place the duck, breast side up, in a roast holder (which is placed in a drip pan for gas grill) in the center of the cooking grate. Cook 1 1/2 to 2 hours, piercing the underside of the duck every 30 minutes to remove excess fat. When the duck juices run clear, and the internal temperature is 170 to 180 degrees F, remove from grill and let rest for 15 minutes. Remove apples and onions from duck cavity and place on cooking grate to crisp. Serve duck with the grilled apples and onions while still warm.