[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: force display of <noscript> content
From: |
bill-auger |
Subject: |
Re: force display of <noscript> content |
Date: |
Thu, 13 Oct 2022 10:53:25 -0400 |
this is an exemplary case for unit tests - rather than adapting
to arbitrary examples found "in the wild", to contrive a set of
minimal examples which have the properties that need to be
accounted for, then to write tests that assert the program's
desired behavior on the known examples
<!DOCTYPE html>
<html><body>
<script>console.log("trivial script")</script>
<script>eval('console.log("non-trivial script")')</script>
<noscript>
inside a noscript
<script>console.log("is this logged?")</script>
<script>eval('console.log("non-trivial noscript")')</script>
</noscript>
</body></html>
to answer the previous mystery, yes that <noscript><script>
runs with librejs enabled - both 'eval()' are blocked as ecpected
rendered:
inside a noscript
logged:
trivial script
is this logged?