const express = require('express'); const lanthan = require('lanthan'); const path = require('path'); const assert = require('assert'); const eventually = require('./eventually'); const Key = lanthan.Key; const newApp = () => { let app = express(); app.get('/', (req, res) => { res.send(` hello `); }); app.get('/follow-input', (req, res) => { res.send(` `); }); app.get('/area', (req, res) => { res.send(` `); }); /* * test case: link2 is out of the viewport * +-----------------+ * | [link1] |<--- window * | | * |=================|<--- viewport * | [link2] | * | | * +-----------------+ */ app.get('/test1', (req, res) => { res.send(`
link1
link2
`); }); /* * test case 2: link2 and link3 are out of window of the frame * +-----------------+ * | +-----------+ | * | | [link1] | | * |=================| * | | [link2] | | * | +-----------+ | * | | * +-----------------+ */ app.get('/test2', (req, res) => { res.send(`