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

php做网站需要html百度联盟广告收益

php做网站需要html,百度联盟广告收益,设计模板图,什么是企业年金<script>&#xff1a;脚本元素 <script> 元素用于嵌入可执行代码或数据&#xff0c;这通常用作嵌入或者引用 JavaScript 代码。<script> 元素也能在其他语言中使用&#xff0c;比如 WebGL 的 GLSL 着色器语言和 JSON。 更多参考&#xff1a;<script>&…

<script>:脚本元素


 <script> 元素用于嵌入可执行代码或数据,这通常用作嵌入或者引用 JavaScript 代码。<script> 元素也能在其他语言中使用,比如 WebGL 的 GLSL 着色器语言和 JSON。

更多参考:<script>:脚本元素 - HTML(超文本标记语言) | MDN (mozilla.org)

1、<script> 在html_tag_names.json5中接口定义:

   (third_party\blink\renderer\core\html\html_tag_names.json5)

    {name: "script",constructorNeedsCreateElementFlags: true,},

2、<script> html_script_element.idl接口定义:

// https://html.spec.whatwg.org/C/#the-script-element
[Exposed=Window,HTMLConstructor
] interface HTMLScriptElement : HTMLElement {[CEReactions, Reflect, URL, RaisesException=Setter] attribute ScriptURLString src;[CEReactions, Reflect] attribute DOMString type;[CEReactions, Reflect] attribute boolean noModule;[CEReactions, Reflect] attribute DOMString charset;[CEReactions] attribute boolean async;[CEReactions, Reflect] attribute boolean defer;[CEReactions, Reflect, ReflectOnly=("anonymous","use-credentials"), ReflectEmpty="anonymous", ReflectInvalid="anonymous"] attribute DOMString? crossOrigin;[CEReactions] attribute ScriptString text;[CEReactions, Reflect, ReflectOnly=("", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"), ReflectMissing="", ReflectInvalid=""] attribute DOMString? referrerPolicy;[CEReactions, MeasureAs=PriorityHints, Reflect, ReflectOnly=("low", "auto", "high"), ReflectMissing="auto", ReflectInvalid="auto"] attribute DOMString fetchPriority;// obsolete members// https://html.spec.whatwg.org/C/#HTMLScriptElement-partial// TODO(foolip): The event and htmlFor attributes should return the empty// string on getting, and do nothing on setting.[CEReactions, Reflect] attribute DOMString event;[CEReactions, Reflect=for] attribute DOMString htmlFor;// Subresource Integrity// https://w3c.github.io/webappsec-subresource-integrity/#HTMLScriptElement[Reflect] attribute DOMString integrity;// https://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports[Measure] static boolean supports(DOMString type);// https://html.spec.whatwg.org/multipage/scripting.html#dom-script-blocking[SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;
};// https://wicg.github.io/attribution-reporting-api
HTMLScriptElement includes HTMLAttributionSrcElementUtils;

3、html_script_element.idl接口实现blink:

third_party\blink\renderer\core\html\html_script_element.h

third_party\blink\renderer\core\html\html_script_element.cc


#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_HTML_SCRIPT_ELEMENT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_HTML_SCRIPT_ELEMENT_H_#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/create_element_flags.h"
#include "third_party/blink/renderer/core/html/blocking_attribute.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/script/script_element_base.h"
#include "third_party/blink/renderer/core/script/script_loader.h"
#include "third_party/blink/renderer/platform/bindings/parkable_string.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"namespace blink {class ExceptionState;class CORE_EXPORT HTMLScriptElement final : public HTMLElement,public ScriptElementBase {DEFINE_WRAPPERTYPEINFO();public:static bool supports(const AtomicString&);HTMLScriptElement(Document&, const CreateElementFlags);// Returns attributes that should be checked against Trusted Typesconst AttrNameToTrustedType& GetCheckedAttributeTypes() const override;String text() { return TextFromChildren(); }void setText(const String&);void setInnerTextForBinding(const V8UnionStringLegacyNullToEmptyStringOrTrustedScript*string_or_trusted_script,ExceptionState& exception_state) override;void setTextContentForBinding(const V8UnionStringOrTrustedScript* value,ExceptionState& exception_state) override;void setTextContent(const String&) override;void setAsync(bool);bool async() const;BlockingAttribute& blocking() const { return *blocking_attribute_; }ScriptLoader* Loader() const final { return loader_.Get(); }bool IsScriptElement() const override { return true; }Document& GetDocument() const override;ExecutionContext* GetExecutionContext() const override;V8HTMLOrSVGScriptElement* AsV8HTMLOrSVGScriptElement() override;DOMNodeId GetDOMNodeId() override;void Trace(Visitor*) const override;void FinishParsingChildren() override;bool IsPotentiallyRenderBlocking() const override;private:void ParseAttribute(const AttributeModificationParams&) override;InsertionNotificationRequest InsertedInto(ContainerNode&) override;void RemovedFrom(ContainerNode& insertion_point) override;void DidNotifySubtreeInsertionsToDocument() override;void ChildrenChanged(const ChildrenChange&) override;bool IsURLAttribute(const Attribute&) const override;bool HasLegalLinkAttribute(const QualifiedName&) const override;// ScriptElementBase overrides:String SourceAttributeValue() const override;String CharsetAttributeValue() const override;String TypeAttributeValue() const override;String LanguageAttributeValue() const override;bool NomoduleAttributeValue() const override;String ForAttributeValue() const override;String EventAttributeValue() const override;String CrossOriginAttributeValue() const override;String IntegrityAttributeValue() const override;String ReferrerPolicyAttributeValue() const override;String FetchPriorityAttributeValue() const override;String ChildTextContent() override;String ScriptTextInternalSlot() const override;bool AsyncAttributeValue() const override;bool DeferAttributeValue() const override;bool HasSourceAttribute() const override;bool HasAttributionsrcAttribute() const override;bool IsConnected() const override;bool HasChildren() const override;const AtomicString& GetNonceForElement() const override;bool ElementHasDuplicateAttributes() const override {return HasDuplicateAttribute();}bool AllowInlineScriptForCSP(const AtomicString& nonce,const WTF::OrdinalNumber&,const String& script_content) override;void DispatchLoadEvent() override;void DispatchErrorEvent() override;Type GetScriptElementType() override;Element& CloneWithoutAttributesAndChildren(Document&) const override;// https://w3c.github.io/trusted-types/dist/spec/#script-scripttextParkableString script_text_internal_slot_;bool children_changed_by_api_;Member<BlockingAttribute> blocking_attribute_;Member<ScriptLoader> loader_;
};}  // namespace blink#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_HTML_HTML_SCRIPT_ELEMENT_H_

4、html_script_element.idl接口实现v8:

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.// DO NOT EDIT: This file is auto-generated by
// //third_party/blink/renderer/bindings/scripts/generate_bindings.py
//
// Use the GN flag `blink_enable_generated_code_formatting=true` to enable
// formatting of the generated files.#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_HTML_SCRIPT_ELEMENT_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_HTML_SCRIPT_ELEMENT_H_#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/bindings/v8_interface_bridge.h"namespace blink {class ExecutionContext;
class HTMLScriptElement;
struct WrapperTypeInfo;class CORE_EXPORT V8HTMLScriptElement final : public bindings::V8InterfaceBridge<V8HTMLScriptElement, HTMLScriptElement> {public:
static bool IsExposed(ExecutionContext* execution_context);static constexpr const WrapperTypeInfo* GetWrapperTypeInfo() {return &wrapper_type_info_;
}static void InstallInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Template> interface_template);
static void InstallUnconditionalProperties(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Template> instance_template, v8::Local<v8::Template> prototype_template, v8::Local<v8::Template> interface_template);
static void InstallContextDependentProperties(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> instance_object, v8::Local<v8::Object> prototype_object, v8::Local<v8::Object> interface_object, v8::Local<v8::Template> interface_template, FeatureSelector feature_selector);private:
static const WrapperTypeInfo wrapper_type_info_;friend class HTMLScriptElement;
};}  // namespace blink#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_HTML_SCRIPT_ELEMENT_H_

out\Debug\gen\third_party\blink\renderer\bindings\core\v8\v8_html_script_element.h

out\Debug\gen\third_party\blink\renderer\bindings\core\v8\v8_html_script_element.cc

截取部分实现:

void V8HTMLScriptElement::InstallUnconditionalProperties(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Template> instance_template, v8::Local<v8::Template> prototype_template, v8::Local<v8::Template> interface_template) {using bindings::IDLMemberInstaller;v8::Local<v8::FunctionTemplate> interface_function_template = interface_template.As<v8::FunctionTemplate>();
v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_function_template);
{static const IDLMemberInstaller::AttributeConfig kAttributeTable[] = {
{"src", SrcAttributeGetCallback, SrcAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"type", TypeAttributeGetCallback, TypeAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"noModule", NoModuleAttributeGetCallback, NoModuleAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"charset", CharsetAttributeGetCallback, CharsetAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"async", AsyncAttributeGetCallback, AsyncAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"defer", DeferAttributeGetCallback, DeferAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"crossOrigin", CrossOriginAttributeGetCallback, CrossOriginAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"text", TextAttributeGetCallback, TextAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"referrerPolicy", ReferrerPolicyAttributeGetCallback, ReferrerPolicyAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"fetchPriority", FetchPriorityAttributeGetCallback, FetchPriorityAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"event", EventAttributeGetCallback, EventAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"htmlFor", HTMLForAttributeGetCallback, HTMLForAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"integrity", IntegrityAttributeGetCallback, IntegrityAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
{"blocking", BlockingAttributeGetCallback, BlockingAttributeSetCallback, unsigned(v8::None), unsigned(IDLMemberInstaller::FlagLocation::kPrototype), unsigned(IDLMemberInstaller::FlagWorld::kAllWorlds), unsigned(IDLMemberInstaller::FlagReceiverCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(IDLMemberInstaller::FlagCrossOriginCheck::kCheck), unsigned(v8::SideEffectType::kHasNoSideEffect), unsigned(V8PrivateProperty::CachedAccessor::kNone)},
};
IDLMemberInstaller::InstallAttributes(isolate, world, instance_template, prototype_template, interface_template, signature, kAttributeTable);
}

http://www.dinnco.com/news/65902.html

相关文章:

  • 怎样做网站制作团队南京网络优化培训
  • 百度快照客服人工电话济南网络seo公司
  • 网站开发常见问题长沙企业关键词优化哪家好
  • 温州哪里有做网站的公司4000-262-永久不收费免费的软件
  • ps如何做音乐网站seo技术网网
  • 拼团网站开发关键词挖掘长尾词
  • 做网站用php360seo关键词优化
  • 找网站建设市场营销专业就业方向
  • 网站怎么做吸引人软文营销范文
  • wordpress 微语插件网站优化seo教程
  • 网站做ssl证书有风险巨量引擎app
  • 旅游网站开发研究现状怎么用网络推广业务
  • 湖州网站建设湖州网站建设seo研究中心
  • 门户网站做等保需要备案哪些竞价推广和seo的区别
  • 做百度手机网站点击软正规的代运营公司
  • 网站建设公司销售经理职责只需要手机号的广告
  • 免费建设网站c3sales四川seo推广
  • seo计费怎么刷关键词的如何做seo
  • 公司网站开发费用如何做账世界500强企业名单
  • 如何做推广麦当劳的网站如何制作一个网址
  • 运营电商西安百度seo推广
  • 织梦如何做网站地图如何自己弄个免费网站
  • 电影网站怎么做laravel宁波免费seo在线优化
  • 黄陂区建设招标网站镇江seo快速排名
  • 做新媒体国外网站网站建设的意义和目的
  • 个人网站有备案吗能去百度上班意味着什么
  • 智能网站建设宁德市属于哪个省份
  • 巴中做网站 微信开发西安建站推广
  • 怎么自己设置网站模板整合营销策略
  • 大连做网站公司排行榜网站服务器ip地址查询