The ornamental design for a cap for an electronicdevice, as shown and described.
FIG. 1 is a front perspective view of a first embodiment of a cap for an electronic device such as a heart rate monitor, showing our new design;
FIG. 2 is a front view thereof;
FIG. 3 is a rear view thereof;
FIG. 4 is a left-side view thereof;
FIG. 5 is a right-side view thereof;
FIG. 6 is a top view thereof; and,
FIG. 7 is a bottom view thereof.
The broken lines depict portions of the cap for an electronic device and/or environment of the cap for an electronic device which form no part of the claimed design.