Giter Club home page Giter Club logo

dollar-js's People

Contributors

dependabot[bot] avatar iwoodruff avatar raymondborkowski avatar seebigs avatar seebigswork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dollar-js's Issues

Support custom css properties?

<div style="--color: red; color: var(--color)">text</div>
<script>
$('div').css('--color') ; // should return "red"
$('div').css('--color','blue') ; // should change text color to blue

//without jQuery we must currently do it like this:
getComputedStyle($('div')[0]).getPropertyValue('--color') ;
$('div')[0].style.setProperty('--color','blue') ;
</script>

Unsupported Selector

<div>
<div>Text</div>
<div>Text</div>
<div>Text</div>
</div>

While querying the above dom with $('div:contains("Text")') an exception is thrown.
jQuery handles this.

Here's the exception

dollar.min.js:1 Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': 'div:contains("Text")' is not a valid selector.
    at e (https://gitcdn.xyz/cdn/seebigs/dollar-js/83c50c0ab564cedf80fea3bb559c31c1f30ed81b/prebuilt/dollar.min.js:1:826)
    at n (https://gitcdn.xyz/cdn/seebigs/dollar-js/83c50c0ab564cedf80fea3bb559c31c1f30ed81b/prebuilt/dollar.min.js:1:269)
    at B.fn.init (https://gitcdn.xyz/cdn/seebigs/dollar-js/83c50c0ab564cedf80fea3bb559c31c1f30ed81b/prebuilt/dollar.min.js:1:5309)
    at B (https://gitcdn.xyz/cdn/seebigs/dollar-js/83c50c0ab564cedf80fea3bb559c31c1f30ed81b/prebuilt/dollar.min.js:1:4657)
    at <anonymous>:1:1

Script src is not loaded when appended with $

When updating a script node that was previously appended to the DOM with a url, no network request is made.

  1. Append script node to document
  2. Find script node with selector
  3. $node.attr('src', someUrl);

Observe: No network request for someUrl is made in the browser's network tab
See example of jquery handling this: https://jsfiddle.net/w1gg6dgm/

This lack of functionality is manifested in a few different ways...
Appending a script node that already has a src attribute set never requests the file at src.

Example:

const $node = $('<script src=${url}></script>');
$('body').append($node); // should cause the script src to be loaded.... it doesn't

animate needs some love

  • I think that the callback doesn't work
  • We don't have any specs
  • No clear definition of what attributes can/can't be animated (scroll, etc)

$(window).height() throws an error

$(window).height()

Uncaught TypeError: Cannot read property 'defaultView' of undefined
    at getStyleModern (dollar.js:1600)
    at $.fn.init.$.fn.css (dollar.js:1704)
    at $.fn.init.$.fn.height (dollar.js:1761)

AJAX Support

Please add ajax support in order to not have to add multi able libraries to a project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.