Skip to content

Instantly share code, notes, and snippets.

View samlecuyer's full-sized avatar

Sam L'ecuyer samlecuyer

  • Yahoo
  • Los Angeles
View GitHub Profile
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@JamieMason
JamieMason / get-new-execution-context.md
Last active May 9, 2019 15:19
Create a new JavaScript execution context, to safely extend hosts/natives for example.

Create a new JavaScript execution context

Source

const getNewExecutionContext = markup =>
  new Promise(resolve => {
    const iframe = document.createElement('iframe');
    iframe.style.display = 'none';
 iframe.setAttribute('src', 'about:blank');