Giter Club home page Giter Club logo

jslib's People

Contributors

mytharcher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jslib's Issues

需要mouseenter和mouseleave事件支持

由于非IE浏览器还未实现鼠标进入/离开的事件接口,而其他JavaScript库比如jQuery早已实现。这两个事件在DOM开发中会非常有用,可以参考其他库的实现来进行支持。

Ajax需要支持授权验证处理

即在请求头中添加setHeader('WWW-Authenticate', 'Basic realm="need login"')类似内容,或使用http://user:pass@host/path的方式添加都URL中。

调用时:

js.net.Ajax.request({
    url: 'http://user:pass@host/path',
    // ...
});

或:

js.net.Ajax.request({
    url: 'someurl',
    auth: 'user:pass',
    // ...
});

auth参数中的值优先于url中的配置。

`js.dom.Selector.match`方法不支持单独检测tag

js.dom.Relation.test()方法中暴露,当要检测一个元素的标签名是否匹配时,无法通过内部的正则完成。

expected:

js.dom.Selector.match(div, 'div'); // true
js.dom.Selector.match(span, 'div'); // false

now:

js.dom.Selector.match(div, 'div'); // true
js.dom.Selector.match(span, 'div'); // true -> BUG

Ajax需要支持不同HTTP状态码分发

当用户自定义HTTP状态码来处理返回结果时,不再使用默认的onsuccessonfailure处理。使响应状态更加有含义,整个设计可以扩展的更加RESTful。

例如:

js.net.Ajax.request({
    url: 'some url',
    on200: function () {},
    on401: function () {},
    on404: function () {}
    // ...
});

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.