Builtin callback for setter API

just want to pin this up again …

on my wishlist: a builtin callback for the setter API.

i guess implementation is not that complicated …

	hypeDocument.setElementProperty(element, 'scaleX', 0.5, 5, 'easeinout', callback(customFunction(element, 'scaleX', 0.5), 5));
	
	function callback(func, dur)
	{
	setTimeout(func, dur*1000)
	}
	
	function customFunction(element, prop, value)
	{
	console.log(element);
	console.log(prop);
	console.log(value);
	}
1 Like

Pass the setter as an argument. You will also need to have a global that it can call from within to get scope. Or modify the Object Prototype to add that a s a parameter.

thx, just wanted to put the topic up again. but it seems that nobody needs it … :wink: