Maximizing backward compatibility with JavaScript