Web Application API

由于Ajax的火爆,所以我会重点介绍与它相关的一些技术。下面的文档已经写了很久了,由于上一篇的尖括号搞的我非常之烦,现在才贴出来,见谅。

我将从Window,XMLHttpRequest等这几个主要接口出发(Document前面已经描述了),描述客户端Javascript编程的主要轮廓。另外,值得注意的是,这个领域的变化仍然非常剧烈,我不保证我描述的东西都可用。无论是现在(我描述的东西还太新)还是以后(而且还没有定型)。

interface XMLHttpRequest {
attribute EventListener onreadystatechange;
readonly attribute unsigned short readyState;
void open(in DOMString method, in DOMString uri);
void open(in DOMString method, in DOMString uri, in boolean async);
void open(in DOMString method, in DOMString uri, in boolean async, in DOMString user);
void open(in DOMString method, in DOMString uri, in boolean async, in DOMString user, in DOMString password);
void setRequestHeader(in DOMString header, in DOMString value) raises(DOMException);
void send(in DOMString data) raises(DOMException);
void send(in Document data) raises(DOMException);
void abort();
DOMString getAllResponseHeaders();
DOMString getResponseHeader(in DOMString header);
attribute DOMString responseText;
attribute Document responseXML;
attribute unsigned short status;
// raises(DOMException) on retrieval
attribute DOMString statusText;
// raises(DOMException) on retrieval
};

interface Item {
readonly attribute boolean exists;
readonly attribute DOMString name;
};

interface IntegerItem : Item {
readonly attribute long value;
};

interface BooleanItem : Item {
attribute boolean value;
};

interface StringItem : Item {
readonly attribute DOMString value;
};

interface ContentItem : Item {
attribute Node nodeArg;
attribute unsigned long offset;
};

interface Match {
// MatchTestGroup
const unsigned short IS_EQUAL = 0;
const unsigned short IS_NOT_EQUAL = 1;
const unsigned short INT_PRECEDES = 2;
const unsigned short INT_PRECEDES_OR_EQUALS = 3;
const unsigned short INT_FOLLOWS = 4;
const unsigned short INT_FOLLOWS_OR_EQUALS = 5;
const unsigned short STR_STARTS_WITH = 6;
const unsigned short STR_ENDS_WITH = 7;
const unsigned short STR_CONTAINS = 8;
const unsigned short SET_ANY = 9;
const unsigned short SET_ALL = 10;
const unsigned short SET_NOT_ANY = 11;
const unsigned short SET_NOT_ALL = 12;

readonly attribute unsigned short test;
};

interface MatchInteger : Match {
readonly attribute DOMString name;
readonly attribute long value;
};

interface MatchBoolean : Match {
readonly attribute DOMString name;
readonly attribute boolean value;
};

interface MatchString : Match {
readonly attribute DOMString name;
readonly attribute DOMString value;
};

interface MatchContent : Match {
readonly attribute DOMString name;
readonly attribute Node nodeArg;
readonly attribute unsigned long offset;
};

interface MatchSet : Match {
readonly attribute Node nodeArg;
void addMatch(in Match add);
Match getMatch(in unsigned long index);
};

interface Segment : Match {
attribute Match criteria;
attribute DOMString order;
void addItem(in Item add);
MatchString createMatchString(in unsigned short test, in DOMString name, in DOMString value);
MatchInteger createMatchInteger(in unsigned short test, in DOMString name, in long value);
MatchBoolean createMatchBoolean(in unsigned short test, in DOMString name, in boolean value);
MatchContent createMatchContent(in unsigned short test, in DOMString name, in unsigned long offset, in Node nodeArg);
MatchSet createMatchSet(in unsigned short test);
StringItem createStringItem(in DOMString name);
IntegerItem createIntegerItem(in DOMString name);
BooleanItem createBooleanItem(in DOMString name);
ContentItem createContentItem(in DOMString name);
void getItem(in unsigned long index);
boolean getNext();
};

interface View {
void select(in Node boundary, in unsigned long offset, in boolean extend, in boolean add);
Segment createSegment();
boolean matchFirstSegment(inout Segment todo) raises(DOMException);
long getIntegerProperty(in DOMString name) raises(DOMException);
DOMString getStringProperty(in DOMString name) raises(DOMException);
boolean getBooleanProperty(in boolean name) raises(DOMException);
Node getContentPropertyNode(in DOMString name) raises(DOMException);
unsigned long getContentPropertyOffset(in DOMString name) raises(DOMException);
};

interface VisualView {
readonly attribute DOMString fontScheme;
readonly attribute unsigned long width;
readonly attribute unsigned long height;
readonly attribute unsigned long horizontalDPI;
readonly attribute unsigned long verticalDPI;
VisualCharacter createVisualCharacter();
VisualCharacterRun createVisualCharacterRun();
VisualFrame createVisualFrame();
VisualImage createVisualImage();
VisualFormButton createVisualFormButton();
VisualFormField createVisualFormField();
void select(in Node boundary, n unsigned long offset, in boolean extend, in boolean add);
void matchSegment(in VisualResource segment);
};

interface VisualResource {
};

interface VisualFont : VisualResource {
attribute DOMString matchFontName;
readonly attribute boolean exists;
readonly attribute DOMString fontName;
boolean getNext();
};

interface VisualSegment : VisualResource {
attribute boolean matchPosition;
attribute boolean matchInside;
attribute boolean matchContaining;
attribute long matchX;
attribute long matchY;
attribute long matchXR;
attribute long matchYR;
attribute boolean matchContent;
attribute boolean matchRange;
attribute Node matchNode;
attribute unsigned long matchOffset;
attribute Node matchNodeR;
attribute unsigned long matchOffsetR;
attribute boolean matchContainsSelected;
attribute boolean matchContainsVisible;
readonly attribute boolean exists;
readonly attribute Node startNode;
readonly attribute unsigned long startOffset;
readonly attribute Node endNode;
readonly attribute unsigned long endOffset;
readonly attribute long topOffset;
readonly attribute long bottomOffset;
readonly attribute long leftOffset;
readonly attribute long rightOffset;
readonly attribute unsigned long width;
readonly attribute unsigned long height;
readonly attribute boolean selected;
readonly attribute boolean visible;
readonly attribute unsigned long foregroundColor;
readonly attribute unsigned long backgroundColor;
readonly attribute DOMString fontName;
readonly attribute DOMString fontHeight;
boolean getNext();
};

interface VisualCharacter : VisualSegment {
};

interface VisualCharacterRun : VisualSegment {
};

interface VisualFrame : VisualSegment {
readonly attribute VisualSegment embedded;
};

interface VisualImage : VisualSegment {
readonly attribute DOMString imageURL;
readonly attribute boolean isLoaded;
};

interface VisualFormButton : VisualSegment {
readonly attribute boolean isPressed;
};

interface VisualFormField : VisualSegment {
readonly attribute DOMString formValue;
};

interface EmbeddingElement {
readonly attribute dom::Document contentDocument;
readonly attribute Window contentWindow;
};

// behavior is always special in ECMAScript, this is defined only for the benefit
// of other languages
interface TimerListener {
// what to put here?
};

interface AbstractView {
readonly attribute DocumentView document;
};

interface DocumentView {
readonly attribute AbstractView defaultView;
};

interface Window : views::AbstractView {
// self-references
readonly attribute Window window;
readonly attribute Window self;

// assigning this has special behavior in ECMAScript, but it is otherwise
// read only. specifically, in ES a string URI can be assigned to location,
// having the same effect as location.assign(URI)
readonly attribute Location location;

// name attribute of referencing frame/iframe/object, or name passed to
// window.open
attribute dom::DOMString name;

// global object of containing document
readonly attribute Window parent;

// global object of outermost containing document
readonly attribute Window top;

// referencing <html:frame>, <html:iframe>, <html:object>, <svg:foreignObject>,
// <svg:animation> or other embedding point, or null if none
readonly attribute dom::Element frameElement;

// one-shot timer
long setTimeout(in TimerListener listener, in long milliseconds);
void clearTimeout(in long timerID);

// repeating timer
long setInterval(in TimerListener listener, in long milliseconds);
void clearInterval(in long timerID);
};

interface DocumentWindow : views::DocumentView {
readonly attribute Location location;
};

interface Location {
attribute dom::DOMString href;

// pieces of the URI, per the generic URI syntax
attribute dom::DOMString hash;
attribute dom::DOMString host;
attribute dom::DOMString hostname;
attribute dom::DOMString pathname;
attribute dom::DOMString port;
attribute dom::DOMString protocol;
attribute dom::DOMString search;

void assign(in dom::DOMString url);
void replace(in dom::DOMString url);
void reload();

dom::DOMString toString();
};
架构师之路 — API 经济 — Web、HTTP Server、API Service、Application 目录 文章目录目录WebHTTP ServerAPI ServiceApplication Web Web(World Wide Web,全球广域网),也称:万维网,它是一种基于 HTML(超文本标记语言)和 HTTP 协议的、全球性的、动态交互的、跨平台的分布式图形信息系统。是建立在 Internet 之上的一种网络服务,为浏览者(浏览器)在 Internet 上查找和浏览信息提供了图形化的、易于访问的直观界面,其中的文档及超级链接将 Internet 上的信息节点组织成一个互为关联的网状结构。一个典型的 阅读详情

相关推荐

OnlyOffice Docker部署实战:解除20连接限制+500M文件上传配置(附中文字体解决方案)

本文详细介绍了OnlyOffice企业级Docker部署的全过程,包括解除20并发连接限制、提升文件上传大小至500MB以及解决中文字体显示问题。通过定制镜像、优化配置和字体安装,帮助技术团队快速搭建高性能的文档协作平台,适用于企业级应用场景。

weixin_26850069的博客 444

web.py源码分析: application(1)

本文主要分析的是web.py库的application.py这个模块中的代码。总的来说,这个模块主要实现了WSGI兼容的接口,以便应用程序能够被WSGI应用服务器调用。WSGI是Web Server Gateway Interface的缩写,具体细节可以查看WSGI的WIKI页面 接口的使用 使用web.py自带的HTTP Server ...

weixin_33845881的博客 211

LT9211 单路mipi转双路mipi芯片,方案成熟,提供技术支持

LT9211 单路mipi转双路mipi芯片

TEL15012949045的博客 5017

C# WebApi Application_Start一直重启的问题

开发环境和生产环境 最近一直忙着把C# 应用程序项目和WebApi项目做成开发环境(Debug)和生产环境(Release),已经完成啦。 动态选择加载数据库 然后C# 应用程序项目开发环境下首先默认动态选择加载数据库,(因为项目-----数据库的对应关系是1对多) C#应用程序项目没有问题。 然后就是WebApi项目中Application_Start方法在Debug模式的时候调用SelectDB.exe程序来动态选择加载数据库,每次点击完SelectDB.exe程序以后 过大概5秒的时候Applicat

weixin_46879188的博客 1430

Ubuntu终端接入Codex:一行脚本搞定AI编程助手安装与配置

在开发者日常工作中,命令行终端是最高频的操作环境,而AI编程助手的出现正在改变传统的编码方式。通过将大模型能力与终端工具链结合,开发者无需切换窗口即可完成命令查询、代码生成、项目理解和自动执行等任务。Ubuntu作为服务器和开发机的主流系统,搭配Node.js生态和API Key认证,即可在本地闭环运行AI助手。本文从环境准备、密钥配置、权限管理到自动化脚本封装,系统拆解在终端中接入Codex的完整流程,并分享高频用法与实测排障经验,帮助开发者安全、高效地让AI融入命令行工作流。

weixin_29061041的博客 322

DoubletFinder实战:如何优化参数提升scRNA-seq双细胞识别准确率?

本文深入探讨了如何通过优化DoubletFinder参数提升scRNA-seq双细胞识别准确率。详细解析了pK和nExp参数的影响机制,提供了系统化的参数优化流程和多样本整合策略,并结合真实数据集演示了验证方法与高级应用场景,帮助研究人员获得更可靠的分析结果。

weixin_28523493的博客 339

API接口的基础知识

每个API都是由函数的调用来实现的。当用户启动API的调用时,它会通知应用程序去启用API与Web服务器通信,并执行相应的任务。

weixin_44353800的博客 844

6、探索音乐结构中的统一性:贝多芬《英雄交响曲》第一乐章的深度剖析

本文深入剖析了贝多芬《英雄交响曲》第一乐章的音乐结构,探讨其统一性的来源及表现形式。通过主题与动机、和声与调性、旋律与节奏、织体与动态等多方面的分析,揭示了这部作品在技术层面和情感表达上的卓越成就。

b9c0d的博客 518

用API使计算机休眠或待机

(声明:魏滔序原创,转贴请注明出处。)Private Declare Function SetSuspendState Lib "Powrprof" (ByVal Hibernate As Boolean, ByVal ForceCritical As Boolean, ByVal DisableWakeEvent As Boolean) As Boolean示例:SetSuspendState

迈克揉索芙特 4408

企业级AI平台架构设计:AI应用架构师的未来趋势

企业级AI平台是AI从“实验室”走向“生产线”的关键,而AI应用架构师就是这条“生产线”的总设计师。未来,随着生成式AI、边缘计算、自治式AI的发展,架构师的角色将越来越重要——他们不仅要构建技术平台,还要连接技术与业务,让AI真正创造价值。“不要做‘只会调模型的工程师’,要做‘能解决业务问题的架构师’。因为,真正有价值的AI,从来不是“最先进的模型”,而是“能落地、能复用、能创造业务价值的平台”。愿你在企业AI转型的浪潮中,成为那个“搭建桥梁的人”——连接技术与业务,连接现在与未来。

小程序开发 973

全球建筑物提取数据集(免费下载):微软/GlobalMLBuildingFootprints

这个是GitHub上的开源数据集: https://github.com/microsoft/GlobalMLBuildingFootprints 介绍 必应地图正在世界各地发布开放式建筑足迹。我们从 2014 年到 2021 年间的 Bing Maps 图像中检测到了 7.77 亿座建筑物,包括 Maxar 和 Airbus 的图像。数据可在 ODbL 下免费下载和使用。该数据集补充了我们的其他版本。 包括的地区 执照 此数据由 Microsoft 根据Open Dat..

此星光明博客 6290

Unity API详解——Application类

Unity对API的合理利用不仅可以减轻编码负担,而且往往可以提高程序的运行效率,尽管官方给出了较为丰富的API文档,然而这并不能满足实际开发的需要,因为官方给出的API解释往往只描述相应的API的主要功能,缺少对其边界条件的说明和API的算法解释,于是熟悉API也成了新手进阶的必经之路,对学习过程做一个记录。Application类不含实例属性和实例方法,在脚本中通过直接调用Application类的静态属性和静态方法来控制程序的运行时数据,如场景的管理、数据的加载等。在Application类中,设计的

极客园地 2623

WPF vs Avalonia: 跨入C#桌面应用现代化的大门

请注意,这只是一个目录,详细内容将根据这个结构逐步展开。如果您需要某个特定部分的详细内容,请告知我,我将为您提供深入的解析和示例代码。WPF,全称Windows Presentation Foundation,是微软为Windows平台量身打造的UI框架。自2006年发布以来,它就像一位经验丰富的老船长,引领着桌面应用的航船在技术的海洋中乘风破浪。Avalonia,一个新兴的跨平台UI框架,它像一位年轻的探险家,勇敢地探索着桌面应用的新世界。

java专栏 2398

Web Application Push API

(原文见:http://www.xdarui.com/index.php/archives/111) 本月18日W3C发布了一个新的草案《Push API》,原文见这里:http://www.w3.org/TR/push-api/。不才鄙陋,目前只是一知半解。下面文叔给大家分享下这份草案,当然还是建议同学们直接无视本文而直接到W3C的原文地址学习。由于只是草案,同时的随时都...

dianchun8914的博客 322

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

ASP.NET Web Api中使用Session、Cache和Application的几个方法

介绍了在ASP.NET Web Api中使用Session、Cache和Application的两个方法,程序在VS2012和Firefox中测试通过。

HuLihui's Blog 1万+

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

.net web api在application_start 每次请求都触发

需求:dotenet web api在初次启动的时候去请求API,获取数据写入web.config。 问题:在application_start里面去请求第三方API,获取的数据可以正常写入web.config,但是有个问题困扰了好久,每次发起request请都会触发Application_start,正常情况下application_start只在iis启动的时候被触发(就是在整个生命周期中只...

weixin_38644677的博客 1194

API Centeric Web Application论文

1.http://newzan.com/read/360384 2.http://www.oschina.net/translate/creating-an-api-centric-web-application 3.http://www.thinkphp.cn/topic/5023.html 转载于:https://www.cnblogs.com/valentinei...

dia17009的博客 172

Web API对application/json内容类型的CORS支持

假设有一简单架构分为前后两部分,其一是Angular构成的前端页面站点,另一个则是通过ASP.NET Web API搭建的后端服务站点。两个站点因为分别布署,所有会有CORS(Cross-Origin Resource Sharing)的问题。 再假设后端已经对此做好相应配置,比如在web.config里加上了: <httpProtocol> <custom...

aixing8475的博客 287

开发 .NET 8 Web API 以使用 IActionResult 返回热门内容类型(text/plain、application/json /xml /octet-stream)

由于我们的控制器继承了“ControllerBase”,我们可以调用可用的“File”方法。单击开始后,“Swagger UI”页面将在您选择的浏览器中打开。现在我们知道 IIS Express 运行良好,我们可以通过单击停止图标在 Visual Studio 中停止我们的应用程序。上述代码与用于 JSON 的代码几乎相同,最大的区别是“[Produces(“application/xml”)]”。因为我们返回的是 IActionResult 类型的对象,所以 .NET 知道自动序列化传递的参数。

csdn_aspnet的专栏,请点击博客主页右上角三个点中的私信联系 1715

为abp的application service 添加Swagger的Restful api 描述, 并动态生成web api

如果不选择多租户, ABP生成的sample并没有把后台逻辑包装成RESTFul api, 而是mvc前端直接dll引用application service。我们需要做2点改动:1.把mvc改成web api host, 然后添加swagger的描述2.把application service动态生成web api。步骤:1.在Web工程的wwwroot中添加swagger 的前端页面资源把...

muzizongheng的专栏 2824

CRUD Operation using Web API and Windows Application

原文:http://www.dotnetfunda.com/articles/show/2341/crud-operation-using-web-api-and-windows-application Introduction In this article we will perform a basic CRUD operation using Web API and Wi

每天进步一点点 1538

Creating an API-Centric Web Application[转]

Creating an API-Centric Web Application 转自http://hub.tutsplus.com/tutorials/creating-an-api-centric-web-application--net-23417 byNIKKO BAUTISTAonDEC 30, 2011 SHARE Difficulty:INTERMEDIA...

weixin_30673715的博客 265

mvn compile卡住半小时?用线程栈定位javac类型推断爆炸

编译构建是开发流程中最基础也最容易被忽视的环节,Maven 作为 Java 工程主流的构建工具,其执行效率直接影响交付节奏。当 mvn compile 长时间无响应,不一定是网络或仓库问题,而可能是 javac 内部类型推断在复杂泛型约束下陷入大规模搜索。理解编译器约束求解的原理,利用 jstack 抓取线程栈,就能快速区分“死锁等待”与“无效计算”。这类异常常见于泛型方法引用、Optional/CompletableFuture 嵌套等场景,错误信息往往延迟到耗尽 CPU 后才输出。掌握线程栈定位与 ja

weixin_34235457的博客 339

Create an Asp.Net Web Forms Application using Bootstrap and Web API

http://www.codeproject.com/Articles/815916/How-To-Create-an-Asp-Net-Web-Forms-Application-usi

Web先锋 1944

使用Swagger辅助开发Fabric Application的Web API

前面的几篇博客,我们已经把Fabric环境搭建好了,也可以使用Go开发ChainCode了,那么我们在ChainCode开发完毕后,可以通过CLI来测试ChainCode的正确性,ChainCode开发后,接下来就是关于Application的编写了。 Application分为2部分,一部分是关于后来业务逻辑的,也就是Web API,一般是通过REST...

weixin_33734785的博客 121
上一篇: XML基础
下一篇: Style&CSS的编程接口
lifeNet
博客等级 码龄20年 1粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值