Comments (9)
- Verified on firefox as well
- I think I've traced it down as far as dommy.template.__GT_document_fragment(document.body) failing, but it's really hard for me to debug it further as I'm not very familiar with protocols and cljs yet.
Unfortunately neither chrome nor firefox are giving a traceback for this error, so it's really hard to track down.
from dommy.
This might be due to how Polymer handle specially body as opposed to other elements. You probably won't have any issue with other selections (at least I don't here).
body
normally has to be manually wrapped, see faq.
from dommy.
Sorry I never got back to you on this issue. So, the question is, whose responsibility is this incompatibility? Should Dommy work around it, or should this be filed as a bug against Polymer? Do you have any opinions on that?
from dommy.
Good question. I don't think polymer will fix that as it's a deliberate trade-off for performance reason (I believe). On the other hand dommy
can't reasonably implement a work around specific to polymer.
I guess your best option is not to use dommy to select document.body
and relies on good old DOM:
(dommy/append! js/document.body "foo")
from dommy.
Hmm, not sure why you're getting that issue as (sel1 :body)
should just be expanding to js/document.body
: https://github.com/Prismatic/dommy/blob/master/src/dommy/macros.clj#L70
from dommy.
Ah sorry, I re-read your initial comment.. the issue is in append!
, not sel1
: https://github.com/Prismatic/dommy/blob/master/src/dommy/core.cljs#L74
The parent node in append! gets "coerced" to a node with template/->node-like
. I wonder if it would be better if it was assumed that the parent is a valid dom node, instead of being looser. I'm not sure if anyone is taking advantage of it anyways..
from dommy.
I believe this might help understanding the issue.
One theory could be that dommy
somehow installs its own properties to a polymer wrapped
element then later on access the non-wrapped
version.
from dommy.
FYI I got this issue and fixed it by using (.querySelector js/document "body")
to select the body.
I don't think there is any other option when using polymer's polyfill as using document.body
is not supported.
from dommy.
Dommy no longer coerces nodes (see #85), and @jeluard's fix (using the native querySelector for body) seems reasonable for use with polymer.
from dommy.
Related Issues (20)
- set-class! returns the class name instead of the element
- Listening to js/window :load breaks with :advanced optimizations
- html2hiccup
- HTML to Hiccup
- Click Events do not work HOT 1
- Add support for Custom Elements HOT 12
- Tests broken in Firefox with attr/style
- Any plan to cut a release? HOT 3
- Android 4.0 stock browser compatibility with Dommy? HOT 1
- Listen to keypress HOT 1
- Request for CLJS version doc HOT 7
- Compilation warnings on Clojure 1.7 HOT 10
- Huge number of warnings HOT 1
- append! requires a DOM node, documentation says otherwise HOT 1
- Delegated event handling
- Tagged releases
- Prose documentation HOT 2
- Length of children HOT 2
- interested in a dispatch! function?
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 dommy.