common js & browser support