Israel’s parliament has approved a law allowing the death penalty for Palestinians convicted of killing Israelis.