4 ms·
Ace editor does this too - possibly because large documents might not all actually be in the DOM.
by mappu 7y ago
Ace editor does this too - possibly because large documents might not all actually be in the DOM.
- nickjj 7y agoIn Stripe's case, the docs are all rendered server side and are viewable without Javascript. I'm not sure if you can hook into the native CTRL + F search tool and see what a user typed (my gut says no way there's an API for that), so I guess Stripe just wanted to track as much information as possible on what people are searching for, even if it makes the user experience a lot worse.
- rattray 7y ago(I am an engineer who worked on this feature) The docs are indeed viewable without JS[0] (in a limited way) but the default experience relies on JS to render text. We don't render all content on the page at once for performance reasons, which is (as a sibling speculated) the driving reason for overriding cmd+f/ctrl+f by default. I hope to write an engineering blog post soon about how we build the Stripe api docs, with some focus on the performance and UX tradeoffs at play here. [0] https://stripe.com/docs/api?javascript=false https://stripe.com/docs/api?javascript=false