Questions tagged [hyperscript]

This tag is used for questions relating to hyperscript (https://hyperscript.org/).

hyperscript

"An easy & approachable language for modern web front-ends"

Links:

23 questions
0
votes
1 answer

Add new line/blank div/padding in VueJS h (hyperscript) functions

I'm working on a project using VueJS's h() functions and all the content I need to include needs to be inside one of these. I'm trying to add content to a div by appending additional h('divs') to it, but need a way to space them (and the text inside…
rrr
  • 1
  • 1
0
votes
0 answers

explain hyperscript's element scoped variable

I am playing around with variables in hyperscript. The docs say there are three different types of variables; local, element & global. Local has no prefix, while element & global use : & $ respectively. I have had success with implementing global…
Terry
  • 27
  • 5
0
votes
1 answer

How to use variables in _hyperscript js

I'm having fun with _hyperscript js which I find very promising and amusing. Now I'm trying to understand the use of variables inside simple commands. Suppose that I have the following code generated by a PHP script that queried a dB and where ids…
Nicero
  • 4,181
  • 6
  • 30
  • 52
0
votes
1 answer

Input datalist not working in hyperscript

I am using the following library: https://github.com/hyperhype/hyperscript The following code: h('input', { list: "list-id"}), h('datalist', { id: "list-id" }, [ h('option', ["Option 1"]), ])` results in:
Ivan
  • 1,967
  • 4
  • 34
  • 60
0
votes
1 answer

MithrilJS Hyperscript

m("div", { onclick: function(e) { console.log(e); }, }, "Test") Hello, i would like to know if having an event handler such as the one above creates a new function on Mithril redraw? I want to avoid performance issues.
Carlos
  • 139
  • 2
  • 12
0
votes
1 answer

inferno-hyperscript hyperscript-helpers declaration error

I'm using: Inferno webpack typescript hyperscript-helpers hyperscript inferno-hyperscript I have this 3 code line: import h from 'inferno-hyperscript'; import hh from 'hyperscript-helpers'; const html = hh(h); this code give me…
user2053904
0
votes
1 answer

TypeScript function overloading for hyperscript signature

I'm currently dabbling around with more advanced typings in typescript and was wondering how one would define a function like the one from hyperscript. I tried various approaches but I'm not able to successfully overload the h function and make all…
0
votes
1 answer

Rx timer state not updating in view in Cycle.js

I'm starting a timer when someone clicks a button that I intend to use as the opacity for some element. When I use do to trace the value I can see it spitting out to the console 40 times, but in the view the number stays put. Not sure where I'm…
azium
  • 20,056
  • 7
  • 57
  • 79
1
2