runtime part of ceylon/ceylon-js#373