/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
3p/nameframe.max.html
25 строк
664 B
Raghu Simha
🐛 Suppress expected LGTM alerts that can't be fixed (#22596)
31 май 2019, 00:46
Не верифицирован
31 май 2019, 00:46
c534184
Код
Авторство
О чём код?
<!doctype html> <html> <head> <meta charset="utf-8"> <script> try { var name_data = JSON.parse(window.name); if (!name_data || !name_data.creative) { throw new Error('Missing or incorrectly formatted JSON ' + 'input to nameframe'); } document.open(); document.write(name_data.creative); // lgtm [js/eval-like-call] lgtm [js/xss] document.close(); delete name_data.creative; window.name = JSON.stringify(name_data); } catch (err) { window.parent.postMessage({type: 'no-content', error: err.message}, '*'); window.name = ''; } </script> </head> <body> </body> </html>