- How the browser renders the document
- Receives the data (bytes) from the server.
- Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
- Turns tokens into nodes.
- Turns nodes into the
DOMtree.
- Builds
CSSOMtree from thecss rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const POSTS = [ | |
| { id:1, | |
| name: 'post dog', | |
| date: { | |
| time: [6, 3, 2018], | |
| } | |
| }, | |
| { id:12, | |
| name: 'post dog', | |
| date: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| const withStorage = (WrappedComponent) => { | |
| class HOC extends React.Component { | |
| state = { | |
| localStorageAvailable: false, | |
| }; | |
| componentDidMount() { | |
| this.checkLocalStorageExists(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {CanDeactivate, Router} from '@angular/router'; | |
| import {Injectable} from '@angular/core'; | |
| import {Observable} from 'rxjs/Observable'; | |
| import {Observer} from 'rxjs/Observer'; | |
| import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material'; | |
| export interface CanComponentDeactivate { | |
| canDeactivate: () => Observable<boolean> | Promise<boolean> | boolean; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "webpack-sass", | |
| "version": "1.0.0", | |
| "scripts": { | |
| "start": "webpack-dev-server --open --mode development", | |
| "build": "webpack -p" | |
| }, | |
| "devDependencies": { | |
| "babel-core": "^6.26.0", | |
| "babel-loader": "^7.1.4", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List() | |
| var list = Immutable.List([1,2,3]) | |
| // [1, 2, 3] | |
| List.isList() | |
| Immutable.List.isList(list) | |
| // true | |
| List.of() | |
| var list = Immutable.List.of(1,2,3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #stop all containers: | |
| docker kill $(docker ps -q) | |
| #remove all containers | |
| docker rm $(docker ps -a -q) | |
| #remove all docker images | |
| docker rmi $(docker images -q) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| from http.server import HTTPServer | |
| from http.server import BaseHTTPRequestHandler | |
| from http import HTTPStatus | |
| class MyHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var supportsES6 = function() { | |
| try { | |
| new Function("(a = 0) => a"); | |
| return true; | |
| } | |
| catch (err) { | |
| return false; | |
| } | |
| }(); |
NewerOlder
