Browse Source

Refs #17419 -- Removed IE8 support in json_script example.

Tim Graham 6 years ago
parent
commit
02cd16a7a0
1 changed files with 1 additions and 2 deletions
  1. 1 2
      docs/ref/templates/builtins.txt

+ 1 - 2
docs/ref/templates/builtins.txt

@@ -1814,8 +1814,7 @@ The resulting data can be accessed in JavaScript like this:
 
 .. code-block:: javascript
 
-    var el = document.getElementById('hello-data');
-    var value = JSON.parse(el.textContent || el.innerText);
+    var value = JSON.parse(document.getElementById('hello-data').textContent);
 
 XSS attacks are mitigated by escaping the characters "<", ">" and "&". For
 example if ``value`` is ``{'hello': 'world</script>&amp;'}``, the output is: