lolmaus / ember-element-query Goto Github PK
View Code? Open in Web Editor NEWElement queries for Ember
Home Page: https://lolmaus.github.io/ember-element-query/
License: MIT License
Element queries for Ember
Home Page: https://lolmaus.github.io/ember-element-query/
License: MIT License
This would allow reducing this:
to this:
Likely, the utils have to be helpers for this to work.
display: none
is applied to an element query element or any of its parents, Ember tests would pause forever because of ember-element-query
test waiter.Both issues are caused by the fact that the initial applying of element queries is asynchronous and channeled through ResizeObserver. Running the initial applying synchronously should fix them.
Details discovered by @simonihmig.
Idk if it works currently or not, but ember-try scenarios should be added to test w/ Embroider. Running ember-cli-update
should add those, as they are not part of the official addon boilerplate.
Hi!
I find this library to be super helpful. Thanks for sharing it with the world!
I was experimenting with Ember Fastboot. Since Fastboot renders on the server, some browser functionality is missing. For example, window
, document
, and Event
are not defined.
This leads to trouble when trying to setup the custom eq-update
event in addon/trigger.js. Fastboot tries to define the new event and throws an error that prevents successful rendering.
To address this, I added some quick checks to make sure Event and window are defined.
export const event = (typeof Event !== 'undefined') ? new Event('eq-update') : null;
export default function trigger() {
if (window && event) {
return window.dispatchEvent(event);
}
}
I'll open a PR in a moment. I hope that helps.
Thanks again.
IE11 crashes on new Event()
.
Must use a polyfill or a custom event dispatcher.
This has never happened in this addon's own tests, but when used in an app, tests are flaky: sometimes element query attributes are applied before assertions execute, sometimes not.
CC @simonihmig
Currently I have github:lolmaus/ember-element-query
in my package.json
Is there a reason the latest version hasn't been published to npm?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.