当前位置: 首页 > news >正文

Chromium HTML5 新的 Input 类型email对应c++

一、Input 类型: email

email 类型用于应该包含 e-mail 地址的输入域。

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>test</title> 
</head>
<body><form action="demo-form.php">E-mail: <input type="email" name="usremail"><input type="submit">
</form><p><b>注意:</b> Internet Explorer 9  及更早 IE 版本不支持 type="email" 。</p></body>
</html>

二、c++定义:

third_party\blink\renderer\core\html\forms\email_input_type.h

third_party\blink\renderer\core\html\forms\email_input_type.cc

namespace blink {class EmailInputType final : public BaseTextInputType {public:explicit EmailInputType(HTMLInputElement&);// They are public for unit testing.CORE_EXPORT static String ConvertEmailAddressToASCII(const ScriptRegexp&,const String&);CORE_EXPORT static bool IsValidEmailAddress(const ScriptRegexp&,const String&);CORE_EXPORT static ScriptRegexp* CreateEmailRegexp(v8::Isolate* isolate);static Vector<String> ParseMultipleValues(const String& value);bool TypeMismatchFor(const String&) const;private:void CountUsage() override;bool TypeMismatch() const override;String TypeMismatchText() const override;bool SupportsSelectionAPI() const override;String SanitizeValue(const String&) const override;String ConvertFromVisibleValue(const String&) const override;String VisibleValue() const override;void MultipleAttributeChanged() override;String ConvertEmailAddressToUnicode(const String&) const;String FindInvalidAddress(const String&) const;
};template <>
struct DowncastTraits<EmailInputType> {static bool AllowFrom(const InputType& type) {return type.IsEmailInputType();}
};}  // namespace blink

http://www.lryc.cn/news/470423.html

相关文章:

  • 嵌入式Linux的AXI平台(platform)驱动教程
  • 什么是Java策略模式?与Spring的完美结合
  • [Go实战]:HTTP请求转发
  • 【C++单调栈 贡献法】907. 子数组的最小值之和|1975
  • 极狐GitLab 17.5 发布 20+ 与 DevSecOps 相关的功能【二】
  • Django 5 增删改查 小练习
  • 【STM32 Blue Pill编程实例】-I2C主从机通信(中断、DMA)
  • 基于SSM+小程序的旅游社交登录管理系统(旅游4)
  • 高级java每日一道面试题-2024年10月24日-JVM篇-说一下JVM有哪些垃圾回收器?
  • Java-内部类
  • flutter集成极光推送
  • D. Skipping 【 Codeforces Round 980 (Div. 2)】
  • 【golang】学习文档整理
  • 动态规划-子序列问题——1218.最长定差子序列
  • 双子塔楼宇可视化系统:提升建筑管理与运营效率
  • 32位的ARMlinux的4字节变量原子访问问题
  • 用哪种建站程序做谷歌SEO更容易?
  • IPsec简单介绍
  • 颠覆级AI:10秒生成超清视频
  • 《西安科技大学学报》
  • redis详细教程(2.List教程)
  • 电子电气架构 --- 电气系统工程
  • 15-4连续子串和的整除问题
  • Spring源码:Bean创建、Bean获取
  • MetaArena推出《Final Glory》:引领Web3游戏技术新风向
  • 玩转Shodan:深度挖掘特定漏洞与脆弱资产的实战技巧
  • Java程序设计:spring boot(8)——API ⽂档构建⼯具 - Swagger2
  • 【Python】if选择判断结构详解:逻辑分支与条件判断
  • 邮件系统SSL加密传输,保护你的电子邮件免受网络威胁
  • Redis_写时复制(cow)