Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add support for a 'Fragment' tag #38

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source/jadelet.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ observeAttribute = (element, context, name, value) ->
if isEvent("on#{name}", element)
# It doesn't make sense for events to not be bound
bindEvent(element, name, value.bind, context)
else
else
bindObservable element, value, context, (newValue) ->
if newValue? and newValue != false
element.setAttribute name, newValue
Expand Down Expand Up @@ -305,6 +305,8 @@ render = (astNode, context={}, namespace) ->

if namespace
element = document.createElementNS namespace, tag
else if tag is "Fragment" or tag is "<>"
element = document.createDocumentFragment()
else
element = document.createElement tag
# We populate the content first so that value binding for `select` tags
Expand Down