Pure javascript background processor