加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

dojo.js的官方描述

发布时间:2020-12-16 21:48:04 所属栏目:百科 来源:网络整理
导读:Dojo Dojo is divided into two parts: dojo.js ,and the rest of Dojo Core. Typically,if a function or Class exists within the dojo namespace directly (eg: dojo.require() , dojo.addOnLoad() ) it is provided directly by dojo.js . If the functi

Dojo

Dojo is divided into two parts: dojo.js ,and the rest of Dojo Core. Typically,if a function or Class exists within the dojo namespace directly (eg: dojo.require() ,dojo.addOnLoad() ) it is provided directly by dojo.js . If the function or Class exists beneath the dojo namespace (eg: dojo.dnd.Mover ),you will need to require the appropriate module (eg: dojo.require("dojo.dnd.Mover"); )

These pages cover both cases,and indicate how they are provided.

Base Dojo: dojo.js

Dojo Base is the functionality you get by just including a stock built dojo.js or dojo.xd.js in your page.

Configuring Dojo

  • djConfig

    Possibility to override certain global settings that control how the framework operates

Array utilities

Details on dojo.every,dojo.filter,dojo.forEach,dojo.indexOf,dojo.lastIndexOf,dojo.map,and dojo.some. See the Array QuickStart for an overview.

  • dojo.forEach

    Invokes a callback function for every item in array

  • dojo.map

    Applies a callback to each element of arr and returns an Array with the results

  • dojo.some

    Iterate over an array,escaping when the callback returns true for some logic check.

  • dojo.every

    Iterate over an array,escaping when the callback returns false for some logic check.

  • dojo.filter

    Iterate over an array,reducing the array based on the callback return.

  • dojo.indexOf

    Find the index of some element in an Array.

  • NodeList array methods

    • NodeList.indexOf,NodeList.lastIndexOf,NodeList.forEach,NodeList.every,NodeList.some,NodeList.concat,NodeList.map,NodeList.filter,NodeList.at

Language Utilities

  • dojo.Deferred

    Communication between threads

  • dojo.hitch

    Function that generates a wrapper function that ensures a function that will only ever execute in a defined scope.

  • dojo.partial

    Function that generates a wrapper function that ensures a function will only ever execute globally.

  • dojo.delegate

    Returns a new object which “looks” to obj for properties which it does not have a value for.

  • dojo.isString

    Checks if the parameter is a String

  • dojo.isArray

    Checks if the parameter is an Array

  • dojo.isFunction

    Checks if the parameter is a Function

  • dojo.isObject

    Checks if the parameter is an Object

  • dojo.isArrayLike

    Checks if the parameter is like an Array

  • dojo.isAlien

    Checks if the parameter is a built-in function

String Utilities

  • dojo.trim

    Trim whitespace from a String

  • dojo.replace

    Simple templates with parameterized substitutions.

DOM

  • dojo.query

    The swiss army knife of DOM node manipulation in Dojo.

  • dojo.NodeList

    A class to handle a list of DOM nodes. Most commonly returned from a dojo.query call.

  • dojo.doc

    Alias for the current document

  • dojo.body

    Return the body element of the document

  • dojo.byId

    Select a DOM node by ‘id’

  • Manipulation

    • dojo.create

      Creates a dom node with optional values and placement

    • dojo.place

      Place DOM nodes relative to others

    • NodeList.place

      Place DOM nodes in list relative to others

    • NodeList.orphan

    • NodeList.adopt

    • NodeList.clone

    • NodeList.addContent

    • dojo.destroy

      Destroy a DOM element

    • dojo.empty

      Empty the contents of a DOM element

    • NodeList.empty

  • Attributes

    • dojo.formToJson

      Create an object from an form node

    • dojo.attr

      Modifying DOM node attributes

    • dojo.NodeList.attr

      Set/Get attributes for nodes in the list

    • dojo.hasAttr

    • dojo.removeAttr

    • dojo.getNodeProp

    • dojo.formToObject

    • dojo.formToQuery

    • dojo.isDescendant

    • dojo.setSelectable

  • Styles

    • dojo.coords

      Getter for the coordinates (relative to parent and absolute) of a DOM node. Deprecated in Dojo 1.4.

    • NodeList.coords

      Getter for the coordinates of each node in the list. Deprecated in Dojo 1.4.

    • dojo.position

      Getter for the border-box x/y coordinates and size of a DOM node.

    • NodeList.position

      Calls dojo.position for each node in the list and returns those objects as an Array.

    • dojo.style

      A getter/setter for styles on a DOM node

    • dojo.getComputedStyle

      Return a cachable object of all computed styles for a node

    • Class Utilities

      • dojo.hasClass

        Returns a boolean depending on whether or not a node has a passed class string.

      • dojo.addClass

        Adds a CSS class to a node.

      • dojo.removeClass

        Removes a class from a Node.

      • dojo.toggleClass

        Toggles a className (or now in 1.4 an array of classNames).

    • dojo.marginBox

      Getter/setter for the margin-box of node

    • dojo.contentBox

      Getter/setter for the content-box of node

Effects

  • dojo.animateProperty

    The workhorse of most dojo.fx animations. Used for animating CSS properties

  • dojo.Animation

    1.4+ previously dojo._Animation,the class behind all dojo.fx

  • dojo.anim

    Shorthand version of animateProperty using positional arguments

  • dojo.fadeOut

  • dojo.fadeIn

Events

  • dojo.connect

    Connects events to methods

  • NodeList.connect

    Connects events to every node in the list,like dojo.connect

  • NodeList.events

    Common event names mapped as functions on a NodeList - eg: .onclick(function(){})

  • dojo.disconnect

    Disconnects methods from linked topics

  • dojo.subscribe

    Linked a listener to a named topic

  • dojo.unsubscribe

    Remove a topic listener

  • dojo.publish

    Publish an event to all subscribers of a topic

  • dojo.connectPublisher

    Ensure that everytime an event is called,a message is published on the topic.

  • dojo.stopEvent

    Stop an event’s bubbling and propagation.

Document Lifecycle

  • dojo.addOnLoad

    Call functions after the DOM has finished loading and widgets declared in markup have been instantiated

  • dojo.ready

    1.4+ Alias for dojo.addOnLoad

  • dojo.addOnUnload

    Call functions when the page unloads

  • dojo.addOnWindowUnload

    Call functions when window.onunload fires

  • dojo.windowUnloaded

    Signal fired by impending window destruction

Ajax / IO

  • IO Pipeline Topics

  • dojo.contentHandlers

    1.4+ Pre-defined XHR content handlers,and an extension point to add your own custom handling.

  • dojo.xhr

    Core for all xhr* verbs,eg: xhrPost,getGet

  • dojo.xhrDelete

  • dojo.xhrGet

  • dojo.xhrPost

  • dojo.xhrPut

  • dojo.rawXhrPost

  • dojo.rawXhrPut

Package System

  • dojo.registerModulePath

    Maps module name to a path

  • dojo.require

    Loads a Javascript module from the appropriate URI

  • dojo.provide

  • dojo.moduleUrl

JSON Tools

  • dojo.fromJson

    Parses a JSON string to return a JavaScript object

  • dojo.toJson

    Returns a JSON serialization of an object

Objects / OO Tools

  • dojo.mixin

    Mixes one object into another. Can be used as a shallow copy

  • dojo.declare

    Creates a constructor using a compact notation for inheritance and prototype extension

  • dojo.extend

  • dojo.exists

    Determine if an object supports a given method

  • dojo.delegate

    Delegate an Object (beget)

  • dojo.getObject

    Get a property from a dot-separated string,such as “A.B.C”

  • dojo.setObject

    Set a property from a dot-separated string,such as “A.B.C”

  • dojo.objectToQuery

  • dojo.queryToObject

  • NodeList.instantiate

    Create classes out of each node in the list

Colors

  • dojo._base.Color

    Color object and utility functions to handle colors. Details on

  • dojo.colorFromArray

  • dojo.colorFromHex

  • dojo.colorFromString

  • dojo.colorFromRgb.

Miscellaneous Base

  • dojo.deprecated

    Log a debug message to indicate that a behavior has been deprecated

  • dojo.eval

    Evaluate some string of JavaScript

  • dojo.global

    Alias for the global scope

  • dojo.keys

    A collection of key constants.

  • dojo.locale

    A string containing the current locale as defined by Dojo

  • dojo.setContext

    Changes the behavior of many core Dojo functions that deal with namespace and DOM lookup

  • dojo.version

    The current version number of Dojo

  • dojo.withDoc

    Call callback with documentObject as dojo.doc

  • dojo.withGlobal

    Call callback with globalObject as dojo.global and globalObject.document as dojo.doc

Dojo Core

  • dojo.AdapterRegistry

    A registry to make contextual calling/searching easier

  • dojo.back

    Browser history management resources (Back button functionality)

  • dojo.behavior

    Utility for unobtrusive/progressive event binding,DOM traversal,and manipulation

  • dojo.cldr

    A Common Locale Data Repository (CLDR) implementation

  • dojo.cache

    1.4+ A mechanism to cache inline text.

  • dojo.colors

    CSS color manipulation functions

  • dojo.cookie

    Simple HTTP cookie manipulation

  • dojo.currency

    Localized formatting and parsing routines for currency data

  • dojo.data

    A uniform data access layer

    • dojo.data.api
    • dojo.data.api.Read
    • dojo.data.api.Write
    • dojo.data.api.Identity
    • dojo.data.api.Notification
    • dojo.data.ItemFileReadStore
    • dojo.data.ItemFileWriteStore
  • dojo.date

    Date manipulation utilities

    • dojo.date.locale

      Offers a library of localization methods to format and parse dates and times

      • dojo.date.locale.addCustomFormats

        Adds a reference to a bundle containing localized custom formats to be used by date/time formatting and parsing routines.

      • dojo.date.locale.format

        Formats a Date object as a String,using locale-specific settings or custom patterns.

      • dojo.date.locale.getNames

        Used to get localized strings from dojo.cldr for day or month names.

      • dojo.date.locale.isWeekend

        Determines if the date falls on a weekend,according to local custom.

      • dojo.date.locale.parse

        Converts a properly formatted string to a primitive Date object,using locale-specific settings.

      • dojo.date.locale.regexp

        Builds the regular needed to parse a localized date

  • dojo.DeferredList

    Event handling for a group of Deferred objects

  • dojo.dnd

    Drag and Drop

    • dojo.dnd.Moveable
  • dojo.fx

    Effects library on top of Base animations

  • dojo.gears

    Google Gears

  • dojo.hash

    Normalized onhashchange module

  • dojo.html

    Inserting contents in HTML nodes

  • dojo.i18n

    Utility classes to enable loading of resources for internationalization

  • Additional AJAX I/O transports (dojo.io)

    • dojo.io.iframe

      Sends an AJAX I/O call using an IFrame

    • dojo.io.script

      Sends a JSONP request using a script tag

  • dojo.jaxer

  • dojo.NodeList-data

    Adds a .data() and .removeData() API to dojo.query operations

  • dojo.NodeList-fx

    Adds dojo.fx animation support to dojo.query()

  • dojo.NodeList-html

    Adds a chainable html method to dojo.query()

  • dojo.NodeList-manipulate

    1.4+ Method extensions to dojo.NodeList/dojo.query() that manipulate HTML.

  • dojo.NodeList-traverse

    1.4+ Method extensions to dojo.NodeList/dojo.query() for traversing the DOM.

  • dojo.number

    Localized formatting and parsing methods for number data

  • dojo.parser

    The Dom/Widget parsing package

  • dojo.regexp

    Regular expressions and Builder resources

  • dojo.robot

    experimental module for DOH users

  • dojo.robotx

    experimental module for DOH users

  • dojo.rpc

    Communicate via Remote Procedure Calls (RPC) with Backend Servers

    • dojo.rpc.JsonpService

      Generic JSONP service

    • dojo.rpc.JsonService

      JSON RPC service

    • dojo.rpc.RpcService

      RPC service class

  • dojo.string

    String utilities for Dojo

See also

  • Dijit

    The widget system layered on top of Dojo

  • DojoX

    An area for development of extensions to the Dojo toolkit

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读