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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style type="text/css"> | |
.button { | |
background: red; | |
height: 300px; |
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 http2 = require('http2') | |
const fs = require('fs') | |
const privatekey = fs.readFileSync('./certificate/private.pem', 'utf8') | |
const certificate = fs.readFileSync('./certificate/csr.crt', 'utf8') | |
const server = http2.createSecureServer({ | |
key: privatekey, | |
cert: certificate | |
}, function (req, res) { | |
res.stream.pushStream({ ':path': '/b.js' }, (err, pushStream, headers) => { |
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 data = {} | |
let a = 1 | |
let dep = [] | |
let Target = null | |
Object.defineProperty(data, 'a', { | |
set: function(val) { | |
a = val | |
dep.forEach(fn => fn()) |