Commit graph

22 commits

Author SHA1 Message Date
Rasmus Porsager
421474c0e2 Cast className using toString (#2309)
* Cast className using toString

* Add to change-log
2018-11-24 08:13:56 -05:00
Isiah Meadows
1ecc30a064 Fix custom elements attribute application, improve key checking
- Fix custom elements attribute application to acknowledge that not all
  custom elements operate purely based on attributes. (Plus, those
  blasted things are verbose as heck when you're working with them in
  raw form. It's also not that uncommon for functionality to be exposed
  via property and *not* attribute.)
- Don't memoize the normalized value when we 1. only use it once in each
  branch, and 2. only use it for a few special cases.
- Centralize the "has property key" code, so it's easier to tune and
  read. I also inlined a couple functions while I was at it since they
  were small and only used once.
- Actually test for how attributes are applied to raw DOM elements vs
  when we choose to use keys. When I first developed the patch, it
  silently worked, when I should've been breaking things.
2018-09-20 15:08:49 -04:00
Pierre-Yves Gérardy
32b319d140 [render/hyperscript] Normalize to class attrs to className, ignore only nullish values 2018-06-07 18:09:38 +02:00
Pierre-Yves Gérardy
92b22fe8e6 [render/hyperscript] have the attrs take precedence over the selector, improve class normalization
fix #1773
fix #2172
2018-06-07 18:09:38 +02:00
Barney Carroll
1579fe8430
Do not normalise component children on ingestion (#2155)
* Do not normalise component children on ingestion

* Don't normalise vnode children

* Component hyperscript tests: children aren't normalised

* test, not text

* Update change log: #2155 & #2064
2018-05-29 10:53:16 +01:00
Ilya Sarantsev
9e6b175519 Handle shared attributes object in hyperscript (#1941) 2017-08-23 16:36:14 +03:00
Scotty Simpson
73d9265c6d fix: selector [value=""] is mishandled (#1843) 2017-05-02 14:28:59 -07:00
Pat Cavit
34d6a710a9 style: fix quotes (#1787) 2017-04-07 12:56:31 -07:00
ludbek
5c616c0fbb removed console.log 2017-04-05 22:01:21 +05:45
Pierre-Yves Gerardy
98e3cbdc69 Revert attrs.class creation logic to what we had in v1.0.1. fix #1764 2017-04-04 12:23:51 +02:00
Isiah Meadows
295b764f52 Merge pull request #1753 from StephanHoyer/master
Fix rendering `0` as only child without attrs - fixes #1752
2017-03-29 18:24:19 -04:00
Isiah Meadows
1cc5fa5ba7 "use strict" and other linty fixes 2017-03-03 18:24:38 -05:00
Pierre-Yves Gérardy
3f3af74dde Support classes and factories as components (#1339)
* Support classes and factories as components

* Tests for class and factory component support
2017-02-14 22:48:02 -05:00
Pat Cavit
9f32267259 tests: Update tests for false -> "" behavior 2017-01-05 23:07:47 -08:00
Barney Carroll
63f491db88 Initial test case: can't declare class as an attribute in hyperscript selector 2016-11-19 17:32:36 +00:00
Pat Cavit
6ae4e22446 Improve hyperscript test coverage (#1250) 2016-08-17 10:09:35 -07:00
impinball
b4fb21475c Add editorconfig, resolve differences
This includes newlines, tabs, among other things.
2016-06-18 03:22:12 -04:00
Leo Horie
ca784a684e fix svg across component boundaries 2016-06-03 12:27:24 -04:00
Leo Horie
15373057df ensure multiple attributes work at the same time as attrs w/ square brackets 2016-06-01 16:22:37 -04:00
Leo Horie
b2b0ab34dd parse pattern attribute correctly 2016-06-01 15:43:42 -04:00
Leo Horie
3282ef3f77 components, angular dbmon 2016-05-03 23:39:01 -04:00
Leo Horie
559369016d initial commit (work in progress) 2016-04-20 20:02:37 -04:00