簡體   English   中英

Modernizr將所有_self目標鏈接轉換為_blank

[英]Modernizr converts all _self target links to _blank

我在應用程序中使用了Modernizr,並且某種程度上它正在轉換來自
<a href="URL" target="_self"><a href="URL" target="_blank">

我希望某些鏈接即使在不同的域中也可以在同一窗口中打開。

以下是我正在使用的Modernizr的功能:

Build https://modernizr.com/download?-applicationcache-audio-backgroundsize-bgpositionxy-bgsizecover-borderimage-borderradius-boxshadow-boxsizing-canvas-canvastext-checked-cssanimations-csscolumns-cssgradients-csshyphens_softhyphens_softhyphensfind-cssreflections-cssscrollbar-csstransforms-csstransforms3d-csstransitions-ellipsis-flash-flexbox-flexboxlegacy-fontface-generatedcontent-geolocation-getusermedia-history-hsla-indexeddb-inlinesvg-input-inputtypes-lastchild-localizednumber-localstorage-matchmedia-microdata-multiplebgs-nthchild-opacity-placeholder-postmessage-rgba-sessionstorage-smil-supports-svg-svgasimg-svgclippaths-svgfilters-target-textshadow-video-webgl-websockets-websqldatabase-webworkers-domprefixes-hasevent-mq-prefixes-printshiv-setclasses-testallprops-testprop-teststyles-dontmin

如果有人知道執行此功能的方式以及如何自定義或阻止執行此操作,請告知。

在整個DOM中, Modernizr唯一更改的是HTML的class屬性。 因此,無論是什么,它都不是Modernizr

可能(可能是)一些代碼會根據存在或不存在的HTML類( .property.no-property )進行此更改。

window.Modernizr存在/不存在或具有對象屬性Modernizr.property === true | Modernizr.property === false Modernizr.property === true | Modernizr.property === false

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM