Comments (4)
there is a constructor that takes in a JS engine. so you can add any scripts you want before a render
https://github.com/SimonCropp/Chevron/blob/master/Chevron.IE/Handlebars.cs#L16
Also all member are virtual so you should be able to change the behaviour of any of them.
So i am not sure what you "cant do".
Perhaps you could show me in a pull request?
from chevron.
What I would like to achive is to run scripts after handlebars is loaded, but before anything is rendered.
To enable this Handlerbars.cs needs a public property Engine
or a method ExecuteScript(string script)
from chevron.
The handlebars is loaded in the constructor. So why cant you do this
var msieJsEngine = new MsieJsEngine(JsEngineMode.Auto);
using (var handleBars = new Handlebars(msieJsEngine))
{
msieJsEngine.Execute("my Js to run before rendering");
handleBars.RegisterTemplate("Index", source);
Approvals.Verify(handleBars.Transform("Index", null));
}
from chevron.
Ohh, yeah, of course!
from chevron.
Related Issues (20)
- Support running "other" js, or exposing engine HOT 8
- Nancy.ViewEngines.Handlebars.V8.Sample not working HOT 2
- Handlebars 2 HOT 3
- Handlebars cannot use json.net objects as template data HOT 15
- Non-Windows platforms HOT 4
- Chevron.IE.Merged appends "\r\n"
- Q: life cycle of Handlebars and concurrency HOT 2
- Why not disposing the MsieJsEngine? HOT 2
- RegisterTemplate fails if name contains integers HOT 1
- update to v3.0.3 of HandlebarsJS
- Partials drop trailing newline
- different route with the same templateName bug HOT 1
- [Q] What is Approvals? HOT 7
- update to MsieJavaScriptEngine 2.2.4.0
- Update to Jint 2.11.58
- Update to Nancy 1.4.4
- Update to handlebars v4.0.11
- New min framework is 4.5.2
- Update to ClearScript.V8 5.5.0.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chevron.