- Save the
index.html
file - Use live-server to open it (http protocol)
- Open file manager and open the file with Chrome or any browser (file protocol)
Why the two renderings http and file are so different?
find ~ -name "<pattern>" -delete |
# Append this to .zshrc, .profile or .bashrc | |
# Add Brew bin to PATH | |
BREW_BIN=$(brew --prefix)/bin/ | |
if [ -d BREW_BIN ] ; then | |
PATH="$PATH:$BREW_BIN" | |
fi |
const NONTEXT_TAGS = [ 'SCRIPT', 'STYLE', 'IMAGE', 'VIDEO', 'AUDIO' ] | |
function isTextNode (node) { | |
return NONTEXT_TAGS.indexOf(node.tagName) === -1 | |
} | |
// Inner Text Less Code, But Slower | |
function innerText (node) { | |
if (node.constructor.name === 'Text') { | |
return node.textContent |
import $ from "jquery"; | |
import uuid from "uuid/v4"; | |
import { sendAmplitude, sendApiMutate } from "lib/messages"; | |
import { MutationCreateMessageArgs } from "lib/types/graphql"; | |
import { store } from "content/store"; | |
import createMessageGql from "./create-message.gql"; | |
import { renderHighlights } from "./Shadow"; |
/* | |
* CSS Properties | |
* http://ref.openweb.io/CSS/ | |
**/ | |
.properties { | |
align-content: value; | |
align-items: value; | |
align-self: value; |
{ | |
"data": [ | |
{ | |
"id": "1120951317", | |
"title": "Aahista Aahista", | |
"artist": "Udit Narayan & Sadhana Sargam", | |
"album": "Swades (Original Motion Picture Soundtrack)", | |
"albumLink": "https://geo.music.apple.com/in/album/aahista-aahista/1120951279?app=music&at=11lt62&ct=tracklink", | |
"isrc": "INS180461167", | |
"duration": "408", |
function makeChange(x, coinSet) { | |
const mem = [] | |
const getChangeCoins = (value) => { | |
if (!value) { | |
return [] | |
} | |
if (mem[value]) { | |
return mem[value] |
index.html
fileWhy the two renderings http and file are so different?
const assert = (v, err) => { | |
if (!v) { | |
throw err; | |
} | |
}; | |
let counter = 0; | |
class Promise { | |
constructor(executor) { |