rename _renderHooks to _oncreate, since thats all its used for

pull/694/head
Rich Harris 8 years ago
parent 9977762dd0
commit d89d70e7a3

@ -200,7 +200,7 @@ export default function dom(
options.css !== false &&
`if ( !document.getElementById( '${generator.cssId}-style' ) ) @add_css();`}
${(generator.hasComponents || generator.hasIntroTransitions) &&
`this._renderHooks = [];`}
`this._oncreate = [];`}
${generator.hasComplexBindings && `this._bindings = [];`}
this._fragment = @create_main_fragment( this._state, this );
@ -227,7 +227,7 @@ export default function dom(
${templateProperties.oncreate &&
deindent`
if ( options._root ) {
options._root._renderHooks.push( @template.oncreate.bind( this ) );
options._root._oncreate.push( @template.oncreate.bind( this ) );
} else {
@template.oncreate.call( this );
}

@ -23,7 +23,7 @@ export default function addTransitions(
const fn = `@template.transitions.${intro.name}`;
block.builders.intro.addBlock(deindent`
#component._renderHooks.push( function () {
#component._oncreate.push( function () {
if ( !${name} ) ${name} = @wrapTransition( ${state.name}, ${fn}, ${snippet}, true, null );
${name}.run( true, function () {
#component.fire( 'intro.end', { node: ${state.name} });
@ -58,7 +58,7 @@ export default function addTransitions(
}
block.builders.intro.addBlock(deindent`
#component._renderHooks.push( function () {
#component._oncreate.push( function () {
${introName} = @wrapTransition( ${state.name}, ${fn}, ${snippet}, true, null );
${introName}.run( true, function () {
#component.fire( 'intro.end', { node: ${state.name} });

@ -110,10 +110,10 @@ export function set(newState) {
}
export function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}

@ -119,10 +119,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}

@ -95,10 +95,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}

@ -128,10 +128,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}

@ -113,10 +113,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}

@ -119,10 +119,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}

@ -119,10 +119,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}

@ -107,10 +107,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}
@ -183,7 +183,7 @@ function SvelteComponent ( options ) {
this._yield = options._yield;
this._torndown = false;
this._renderHooks = [];
this._oncreate = [];
this._fragment = create_main_fragment( this._state, this );

@ -62,7 +62,7 @@ function SvelteComponent ( options ) {
this._yield = options._yield;
this._torndown = false;
this._renderHooks = [];
this._oncreate = [];
this._fragment = create_main_fragment( this._state, this );

@ -95,10 +95,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}
@ -156,7 +156,7 @@ function SvelteComponent ( options ) {
}
if ( options._root ) {
options._root._renderHooks.push( template.oncreate.bind( this ) );
options._root._oncreate.push( template.oncreate.bind( this ) );
} else {
template.oncreate.call( this );
}

@ -45,7 +45,7 @@ function SvelteComponent ( options ) {
}
if ( options._root ) {
options._root._renderHooks.push( template.oncreate.bind( this ) );
options._root._oncreate.push( template.oncreate.bind( this ) );
} else {
template.oncreate.call( this );
}

@ -119,10 +119,10 @@ function set(newState) {
}
function _flush() {
if (!this._renderHooks) return;
if (!this._oncreate) return;
while (this._renderHooks.length) {
this._renderHooks.pop()();
while (this._oncreate.length) {
this._oncreate.pop()();
}
}

Loading…
Cancel
Save