Results for “script”
Small, practical examples. Search by task or narrow things down below.
Allow embedded scripts without granting same-origin access
HTML: Grant only allow-scripts so the sandboxed document retains an opaque origin.
HTML✓ Tested
Attach a descriptive label to a container
Docker / Compose: Attach a descriptive label to a container using a locally available Ubuntu image.
Docker / Compose✓ Tested
Block scripts in an embedded document
HTML: An empty sandbox attribute applies the default set of restrictions, including blocking script execution.
HTML✓ Tested
Check a script’s syntax without executing its body
Bash Scripts: bash -n parses commands but does not run ordinary script statements.
Bash Scripts✓ Tested
Choose between two script branches
Bash Scripts: Choose between two script branches with a small standalone Bash program.
Bash Scripts✓ Tested
Clean up a subscription when a child unmounts
Clean up a subscription when a child unmounts with a small React component and explicit browser behavior.
React✓ Tested
Display a JavaScript value in JSX
Display a JavaScript value in JSX with a small React component and explicit browser behavior.
React✓ Tested
Give a document a descriptive browser title
HTML: The title element supplies the browser document title independently of the visible heading.
HTML✓ Tested
Load functions from a trusted local script
Bash Scripts: Source executes a file in the current shell so its function definitions remain available.
Bash Scripts✓ Tested
Make a script executable by its owner
Linux Commands: Add the owner execute bit without replacing all permission bits.
Linux Commands✓ Tested
Pair terms and descriptions
Use a description list for a small HTML glossary.
HTML✓ Tested
Provide a concise page description
HTML: A description meta element summarizes a document for clients that use that metadata.
HTML✓ Tested