Com document
:
document.addEventListener("visibilitychange", function() {
console.log( document.visibilityState );
[package] | |
name = "hello_world_storage" | |
version = "0.1.0" | |
edition = "2021" | |
[lib] | |
crate-type = ["cdylib"] | |
[dependencies] | |
wasm-bindgen = "0.2.81" |
Com document
:
document.addEventListener("visibilitychange", function() {
console.log( document.visibilityState );
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> body { background: silver; } </style> | |
</head> | |
<body> | |
<main> | |
<h1 id="counter"></h1> |
import $ from 'jquery'; | |
/** | |
* {Element} Elemento que o browser tentará encontrar dentro da seleção | |
* | |
* @return bool | |
*/ | |
let containsNode = node => { | |
const selection = document.getSelection(); |
Exemplo:
const city = 'Carapicuíba';
const text = `Eu moro em ${city}`;
Exemplo: https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/template_strings
const gulp = require('gulp'); | |
const { spawnSync } = require('child_process'); | |
/** | |
* Get files from commit | |
* {String} Hash commit | |
* {Regex} Regex filter extensions | |
*/ | |
const getGitCommit = (hash, regex) => { | |
const spawn = spawnSync('git', ['diff-tree', '--no-commit-id', '--name-only', '-r', hash]); |
{ | |
"files.exclude": { | |
"**/.git": true, | |
"**/.svn": true, | |
"**/.hg": true, | |
"**/.DS_Store": true, | |
"**/node_modules": true | |
}, | |
"editor.fontFamily": "'Ubuntu Mono', 'Droid Sans Mono', 'Courier New', 'Droid Sans Fallback'", | |
"editor.fontSize": 18, |
{ | |
"name": "public_app", | |
"version": "2.0.0", | |
"description": "", | |
"author": "Eduardo Paixão (@duduindo)", | |
"license": "MIT", | |
"watch": { | |
"js": { | |
"patterns": [ | |
"./assets/js/" |
/** | |
* Multiples extends Javascript ES6 | |
* @About: Clone method's class | |
**/ | |
class SuperExtends { | |
constructor(ar) { | |
ar.forEach((item) => { | |
const news = new item; |
document.body.textContent = "" | |
var json = { | |
"tabela": { | |
"thead": [{ | |
"tr":[ | |
{"td": "TD head 1"}, | |
{"td": "TD head 2"}, | |
{"td": "TD head 3"} | |
] |