You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to attach the Ractive instance with .insert() instead, the only other suitable method, you get an error: Uncaught Error: The API has changed - you must call 'ractive.render(target[, anchor])' to render your Ractive instance. Once rendered you can use 'ractive.insert()'. The issue here is that this is not spelled out in the docs (the fact that the instance must already have been rendered before .insert()), though it isn't not said, either. (Why can't it automatically be rendered if needed, though? And why is .render() set to throw a debug error if there's no other way to defer rendering?) http://docs.ractivejs.org/latest/ractive-insert
As I noted in #107, it seems that .render() is indeed meant to be public API, and the document was just recently updated to note this. It'd be nice to also document that the .render() method:
...will return a promise.
...takes a second argument anchor.
...is useful when instanciating an Ractive instance without the el option.
Dumping this here from issue ractivejs/ractive#749 before it's closed and I forget:
.render()
say that it will throw an error if you call it. This doesn't seem to be the case. In fact... http://docs.ractivejs.org/latest/ractive-render.insert()
instead, the only other suitable method, you get an error:Uncaught Error: The API has changed - you must call 'ractive.render(target[, anchor])' to render your Ractive instance. Once rendered you can use 'ractive.insert()'.
The issue here is that this is not spelled out in the docs (the fact that the instance must already have been rendered before.insert()
), though it isn't not said, either. (Why can't it automatically be rendered if needed, though? And why is.render()
set to throw a debug error if there's no other way to defer rendering?) http://docs.ractivejs.org/latest/ractive-insert.render()
is not listed in the methods that support the Promise interface, despite implementing it. http://docs.ractivejs.org/latest/promisesThe text was updated successfully, but these errors were encountered: