In the photo-sharing example, such
checks would raise errors for the assignments
to innerHTML and location.
href in figures 1a–1c and
would advise the developer to use a
corresponding inherently safe API instead.
For assignments to innerHTML,
this typically means replacing ad hoc
concatenation of HTML markup with
a strict template, rendered directly into
the DOM element by the template system’s
runtime, as shown in Figure 2a.