Here is an example of a simple interactive fractal generator implemented as a single HTML file with JavaScript enclosed in script tags:
This code creates a canvas element and uses JavaScript to draw the Mandelbrot set fractal on it. The `mandelbrot` function calculates the number of iterations until the complex function diverges at a given point, and the `drawMandelbrot` function iterates through all points in the canvas to draw the fractal based on the number of iterations calculated.