start new:
tmux
start new with session name:
tmux new -s myname
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
// Only trigger enclosing computation if the return value of | |
// f is not EJSON.equals to the previuous return value | |
Tracker.guard = function(f) { | |
if (Meteor.isServer || !Tracker.currentComputation) { | |
return f(); | |
} | |
let dep = new Tracker.Dependency(), | |
curView = Blaze.currentView, | |
tplFunc = Template._currentTemplateInstanceFunc; |
declare module '*.svelte' { | |
type Data = { [key]: any } | |
type Changed = { [key]: boolean } | |
type Listener = { cancel: () => void } | |
export default class Component { | |
root: Component | |
options: Data | |
constructor(init: { target: Element, data: Data }) |
import { describe, it } from 'mocha'; | |
import { expect } from 'chai'; | |
import Nav from '../../src/components/Nav.html'; | |
import { getByText } from 'dom-testing-library'; | |
describe('first test', () => { | |
it('should be testable', () => { | |
let nav = new Nav({ | |
target: document.body | |
}); |
<label> | |
{#if uploading} | |
<Progress bind:percent={progress} text="Uploading..." /> | |
{:else if processing} | |
<Progress percent={100} text="Processing..." /> | |
{:else} | |
<slot name="content"> | |
</slot> | |
{/if} | |
<input |