I'm pretty sure it is safe to eat, as I'm not dead yet, but I don't know what it is exactly. I tried looking in The Joy of Cooking and Harold McGee's On Food and Cooking, but no mention either place of this mysterious scallion sap. A user on Metafilter suggests it is a "monocotyledon ooze" (Scallion gel?), but that's not really an answer either.
Internet searches led me to discover that there many synonyms for such goo. Gel? Slime? Ooze? Sap? "Jelly" shows up in too many recipes, and "-okra" definitely helped cut down on the recipes as well. I'm fairly certain that it's just a mucilage, but what do I know? It always baffles me anymore that an answer to any trivial question isn't at my fingertips.
You've seen this gel inside of green onion tops, right?