Interview practice question
A third-party script breaks your app by modifying built-ins
Frontend Engineering · JavaScript Core · Experienced
Your app behaves strangely only on pages that include a certain third-party script, which turns out to modify built-in prototypes. How do you handle it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Identify modifications (compare prototypes).
- Isolate script (iframe, load later).
- Report to vendor; remove/replace.
- Defensive code avoids relying on extended built-ins.
- Content Security Policy for script control.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.