mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update debugger-frontend from 97e9912...46feed4 (#50094)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50094 Changelog: [Internal] - Update `react-native/debugger-frontend` from 97e9912...46feed4 Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/97e9912605ce73b06f67fc607c1a5c434a67d6de...46feed41c15bcaafa086c1397562fa2af7cc503b). Reviewed By: hoxyq Differential Revision: D71391122 fbshipit-source-id: f7c201c407d417ec84509ae05a881bfc770009a0
This commit is contained in:
1 parent
adbcaef1e1
commit
a00963d1d5
3 files changed
+5
-5
No files matched your search
@@ -1,8 +1,8 @@
|
||||
@generated SignedSource<<347069bf171def94f2e48bf1e82bb02d>>
|
||||
Git revision: 97e9912605ce73b06f67fc607c1a5c434a67d6de
|
||||
@generated SignedSource<<d1e013234b08b556fdf215dc5ea7e5c9>>
|
||||
Git revision: 46feed41c15bcaafa086c1397562fa2af7cc503b
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
Remote branch: main
|
||||
GN build args (overrides only):
|
||||
is_official_build = true
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import*as t from"../root/root.js";import*as e from"../platform/platform.js";export{UIString}from"../platform/platform.js";import*as r from"../i18n/i18n.js";var s=Object.freeze({__proto__:null});const n=[];var i=Object.freeze({__proto__:null,registerAppProvider:function(t){n.push(t)},getRegisteredAppProviders:function(){return n.filter((e=>t.Runtime.Runtime.isDescriptorEnabled({experiment:void 0,condition:e.condition}))).sort(((t,e)=>(t.order||0)-(e.order||0)))}});const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=new Uint8Array(123);for(let t=0;t<64;++t)o[a.charCodeAt(t)]=t;var l=Object.freeze({__proto__:null,BASE64_CHARS:a,BASE64_CODES:o,decode:function(t){let e=3*t.length/4>>>0;61===t.charCodeAt(t.length-2)?e-=2:61===t.charCodeAt(t.length-1)&&(e-=1);const r=new Uint8Array(e);for(let e=0,s=0;e<t.length;e+=4){const n=o[t.charCodeAt(e+0)],i=o[t.charCodeAt(e+1)],a=o[t.charCodeAt(e+2)],l=o[t.charCodeAt(e+3)];r[s++]=n<<2|i>>4,r[s++]=(15&i)<<4|a>>2,r[s++]=(3&a)<<6|63&l}return r.buffer},encode:function(t){return new Promise(((e,r)=>{const s=new FileReader;s.onerror=()=>r(new Error("failed to convert to base64")),s.onload=()=>{const t=s.result,[,r]=t.split(",",2);e(r)},s.readAsDataURL(new Blob([t]))}))}});var h=Object.freeze({__proto__:null,CharacterIdMap:class{#t;#e;#r;constructor(){this.#t=new Map,this.#e=new Map,this.#r=33}toChar(t){let e=this.#t.get(t);if(!e){if(this.#r>=65535)throw new Error("CharacterIdMap ran out of capacity!");e=String.fromCharCode(this.#r++),this.#t.set(t,e),this.#e.set(e,t)}return e}fromChar(t){const e=this.#e.get(t);return void 0===e?null:e}}});const c=.9642,u=.8251;class g{values=[0,0,0];constructor(t){t&&(this.values=t)}}class d{values=[[0,0,0],[0,0,0],[0,0,0]];constructor(t){t&&(this.values=t)}multiply(t){const e=new g;for(let r=0;r<3;++r)e.values[r]=this.values[r][0]*t.values[0]+this.values[r][1]*t.values[1]+this.values[r][2]*t.values[2];return e}}class p{g;a;b;c;d;e;f;constructor(t,e,r=0,s=0,n=0,i=0,a=0){this.g=t,this.a=e,this.b=r,this.c=s,this.d=n,this.e=i,this.f=a}eval(t){const e=t<0?-1:1,r=t*e;return r<this.d?e*(this.c*r+this.f):e*(Math.pow(this.a*r+this.b,this.g)+this.e)}}const m={sRGB:new p(2.4,1/1.055,.055/1.055,1/12.92,.04045,0,0),sRGB_INVERSE:new p(.416667,1.13728,-0,12.92,.0031308,-.0549698,-0),proPhotoRGB:new p(1.8,1),proPhotoRGB_INVERSE:new p(.555556,1,-0,0,0,0,0),k2Dot2:new p(2.2,1),k2Dot2_INVERSE:new p(.454545,1),rec2020:new p(2.22222,.909672,.0903276,.222222,.0812429,0,0),rec2020_INVERSE:new p(.45,1.23439,-0,4.5,.018054,-.0993195,-0)},y={sRGB:new d([[.436065674,.385147095,.143066406],[.222488403,.716873169,.06060791],[.013916016,.097076416,.714096069]]),sRGB_INVERSE:new d([[3.134112151374599,-1.6173924597114966,-.4906334036481285],[-.9787872938826594,1.9162795854799963,.0334547139520088],[.07198304248352326,-.2289858493321844,1.4053851325241447]]),displayP3:new d([[.515102,.291965,.157153],[.241182,.692236,.0665819],[-.00104941,.0418818,.784378]]),displayP3_INVERSE:new d([[2.404045155982687,-.9898986932663839,-.3976317191366333],[-.8422283799266768,1.7988505115115485,.016048170293157416],[.04818705979712955,-.09737385156228891,1.2735066448052303]]),adobeRGB:new d([[.60974,.20528,.14919],[.31111,.62567,.06322],[.01947,.06087,.74457]]),adobeRGB_INVERSE:new d([[1.9625385510109137,-.6106892546501431,-.3413827467482388],[-.9787580455521,1.9161624707082339,.03341676594241408],[.028696263137883395,-.1406807819331586,1.349252109991369]]),rec2020:new d([[.673459,.165661,.1251],[.279033,.675338,.0456288],[-.00193139,.0299794,.797162]]),rec2020_INVERSE:new d([[1.647275201661012,-.3936024771460771,-.23598028884792507],[-.6826176165196962,1.647617775014935,.01281626807852422],[.029662725298529837,-.06291668721366285,1.2533964313435522]]),xyz:new d([[1,0,0],[0,1,0],[0,0,1]])};function f(t){return t*(Math.PI/180)}function b(t,e,r,s){return[t.eval(e),t.eval(r),t.eval(s)]}const w=new d([[.9999999984505198,.39633779217376786,.2158037580607588],[1.0000000088817609,-.10556134232365635,-.06385417477170591],[1.0000000546724108,-.08948418209496575,-1.2914855378640917]]),S=new d([[.2104542553,.7936177849999999,-.0040720468],[1.9779984951000003,-2.4285922049999997,.4505937099000001],[.025904037099999982,.7827717662,-.8086757660000001]]),x=new d([[.8190224432164319,.3619062562801221,-.12887378261216414],[.0329836671980271,.9292868468965546,.03614466816999844],[.048177199566046255,.26423952494422764,.6335478258136937]]),v=new d([[1.226879873374156,-.5578149965554814,.2813910501772159],[-.040575762624313734,1.1122868293970596,-.07171106666151703],[-.07637294974672144,-.4214933239627915,1.586924024427242]]),T=new d([[.7976700747153241,.13519395152800417,.03135596341127167],[.28803902352472205,.7118744007923554,8661179538844252e-20],[2.739876695467402e-7,-14405226518969991e-22,.825211112593861]]),z=new d([[1.3459533710138858,-.25561367037652133,-.051116041522131374],[-.544600415668951,1.5081687311475767,.020535163968720935],[-13975622054109725e-22,2717590904589903e-21,1.Line truncated
|
||||
import*as t from"../root/root.js";import*as e from"../platform/platform.js";export{UIString}from"../platform/platform.js";import*as r from"../i18n/i18n.js";var s=Object.freeze({__proto__:null});const n=[];var i=Object.freeze({__proto__:null,registerAppProvider:function(t){n.push(t)},getRegisteredAppProviders:function(){return n.filter((e=>t.Runtime.Runtime.isDescriptorEnabled({experiment:void 0,condition:e.condition}))).sort(((t,e)=>(t.order||0)-(e.order||0)))}});const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=new Uint8Array(123);for(let t=0;t<64;++t)o[a.charCodeAt(t)]=t;var l=Object.freeze({__proto__:null,BASE64_CHARS:a,BASE64_CODES:o,decode:function(t){let e=3*t.length/4>>>0;61===t.charCodeAt(t.length-2)?e-=2:61===t.charCodeAt(t.length-1)&&(e-=1);const r=new Uint8Array(e);for(let e=0,s=0;e<t.length;e+=4){const n=o[t.charCodeAt(e+0)],i=o[t.charCodeAt(e+1)],a=o[t.charCodeAt(e+2)],l=o[t.charCodeAt(e+3)];r[s++]=n<<2|i>>4,r[s++]=(15&i)<<4|a>>2,r[s++]=(3&a)<<6|63&l}return r.buffer},encode:function(t){return new Promise(((e,r)=>{const s=new FileReader;s.onerror=()=>r(new Error("failed to convert to base64")),s.onload=()=>{const t=s.result,[,r]=t.split(",",2);e(r)},s.readAsDataURL(new Blob([t]))}))}});var h=Object.freeze({__proto__:null,CharacterIdMap:class{#t;#e;#r;constructor(){this.#t=new Map,this.#e=new Map,this.#r=33}toChar(t){let e=this.#t.get(t);if(!e){if(this.#r>=65535)throw new Error("CharacterIdMap ran out of capacity!");e=String.fromCharCode(this.#r++),this.#t.set(t,e),this.#e.set(e,t)}return e}fromChar(t){const e=this.#e.get(t);return void 0===e?null:e}}});const c=.9642,u=.8251;class g{values=[0,0,0];constructor(t){t&&(this.values=t)}}class d{values=[[0,0,0],[0,0,0],[0,0,0]];constructor(t){t&&(this.values=t)}multiply(t){const e=new g;for(let r=0;r<3;++r)e.values[r]=this.values[r][0]*t.values[0]+this.values[r][1]*t.values[1]+this.values[r][2]*t.values[2];return e}}class p{g;a;b;c;d;e;f;constructor(t,e,r=0,s=0,n=0,i=0,a=0){this.g=t,this.a=e,this.b=r,this.c=s,this.d=n,this.e=i,this.f=a}eval(t){const e=t<0?-1:1,r=t*e;return r<this.d?e*(this.c*r+this.f):e*(Math.pow(this.a*r+this.b,this.g)+this.e)}}const m={sRGB:new p(2.4,1/1.055,.055/1.055,1/12.92,.04045,0,0),sRGB_INVERSE:new p(.416667,1.13728,-0,12.92,.0031308,-.0549698,-0),proPhotoRGB:new p(1.8,1),proPhotoRGB_INVERSE:new p(.555556,1,-0,0,0,0,0),k2Dot2:new p(2.2,1),k2Dot2_INVERSE:new p(.454545,1),rec2020:new p(2.22222,.909672,.0903276,.222222,.0812429,0,0),rec2020_INVERSE:new p(.45,1.23439,-0,4.5,.018054,-.0993195,-0)},y={sRGB:new d([[.436065674,.385147095,.143066406],[.222488403,.716873169,.06060791],[.013916016,.097076416,.714096069]]),sRGB_INVERSE:new d([[3.134112151374599,-1.6173924597114966,-.4906334036481285],[-.9787872938826594,1.9162795854799963,.0334547139520088],[.07198304248352326,-.2289858493321844,1.4053851325241447]]),displayP3:new d([[.515102,.291965,.157153],[.241182,.692236,.0665819],[-.00104941,.0418818,.784378]]),displayP3_INVERSE:new d([[2.404045155982687,-.9898986932663839,-.3976317191366333],[-.8422283799266768,1.7988505115115485,.016048170293157416],[.04818705979712955,-.09737385156228891,1.2735066448052303]]),adobeRGB:new d([[.60974,.20528,.14919],[.31111,.62567,.06322],[.01947,.06087,.74457]]),adobeRGB_INVERSE:new d([[1.9625385510109137,-.6106892546501431,-.3413827467482388],[-.9787580455521,1.9161624707082339,.03341676594241408],[.028696263137883395,-.1406807819331586,1.349252109991369]]),rec2020:new d([[.673459,.165661,.1251],[.279033,.675338,.0456288],[-.00193139,.0299794,.797162]]),rec2020_INVERSE:new d([[1.647275201661012,-.3936024771460771,-.23598028884792507],[-.6826176165196962,1.647617775014935,.01281626807852422],[.029662725298529837,-.06291668721366285,1.2533964313435522]]),xyz:new d([[1,0,0],[0,1,0],[0,0,1]])};function f(t){return t*(Math.PI/180)}function w(t,e,r,s){return[t.eval(e),t.eval(r),t.eval(s)]}const b=new d([[.9999999984505198,.39633779217376786,.2158037580607588],[1.0000000088817609,-.10556134232365635,-.06385417477170591],[1.0000000546724108,-.08948418209496575,-1.2914855378640917]]),S=new d([[.2104542553,.7936177849999999,-.0040720468],[1.9779984951000003,-2.4285922049999997,.4505937099000001],[.025904037099999982,.7827717662,-.8086757660000001]]),x=new d([[.8190224432164319,.3619062562801221,-.12887378261216414],[.0329836671980271,.9292868468965546,.03614466816999844],[.048177199566046255,.26423952494422764,.6335478258136937]]),v=new d([[1.226879873374156,-.5578149965554814,.2813910501772159],[-.040575762624313734,1.1122868293970596,-.07171106666151703],[-.07637294974672144,-.4214933239627915,1.586924024427242]]),T=new d([[.7976700747153241,.13519395152800417,.03135596341127167],[.28803902352472205,.7118744007923554,8661179538844252e-20],[2.739876695467402e-7,-14405226518969991e-22,.825211112593861]]),R=new d([[1.3459533710138858,-.25561367037652133,-.051116041522131374],[-.544600415668951,1.5081687311475767,.020535163968720935],[-13975622054109725e-22,2717590904589903e-21,1.Line truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import*as e from"../../core/common/common.js";import*as t from"../../core/host/host.js";import*as i from"../../core/i18n/i18n.js";import*as r from"../../ui/legacy/components/source_frame/source_frame.js";import*as o from"../../ui/legacy/legacy.js";import*as s from"../../core/platform/platform.js";import*as n from"../../core/sdk/sdk.js";import*as a from"../../models/logs/logs.js";import"../../ui/components/buttons/buttons.js";import*as l from"../../ui/visual_logging/visual_logging.js";import*as d from"../../ui/legacy/components/data_grid/data_grid.js";import*as c from"../mobile_throttling/mobile_throttling.js";import*as h from"../settings/emulation/components/components.js";import*as u from"../../models/bindings/bindings.js";import*as p from"../../models/workspace/workspace.js";import*as g from"./forward/forward.js";import*as m from"../../ui/components/icon_button/icon_button.js";import*as w from"../../ui/legacy/components/perf_ui/perf_ui.js";import*as k from"../../ui/legacy/components/utils/utils.js";import{PanelUtils as b}from"../utils/utils.js";import*as v from"../../ui/components/legacy_wrapper/legacy_wrapper.js";import*as f from"./components/components.js";import*as C from"../../ui/legacy/components/cookie_table/cookie_table.js";import*as S from"../../ui/legacy/components/object_ui/object_ui.js";import*as y from"../../models/text_utils/text_utils.js";import*as T from"../../core/root/root.js";import*as x from"../../models/har/har.js";import*as R from"../../models/persistence/persistence.js";import*as I from"../sources/sources.js";import*as q from"../../ui/components/adorners/adorners.js";import*as L from"../../ui/components/render_coordinator/render_coordinator.js";import*as F from"../../ui/legacy/theme_support/theme_support.js";import*as P from"../../models/trace/trace.js";import*as H from"../search/search.js";import*as M from"../timeline/utils/utils.js";const E=new CSSStyleSheet;E.replaceSync(".panel.network .toolbar.binary-view-toolbar{border-top:1px solid var(--sys-color-divider);border-bottom:0;padding-left:5px}.binary-view-copied-text{opacity:100%}.binary-view-copied-text.fadeout{opacity:0%;transition:opacity 1s}\n/*# sourceURL=binaryResourceView.css */\n");const A={copiedAsBase:"Copied as `Base64`",hexViewer:"`Hex` Viewer",copiedAsHex:"Copied as `Hex`",copiedAsUtf:"Copied as `UTF-8`",binaryViewType:"Binary view type",copyToClipboard:"Copy to clipboard",copyAsBase:"Copy as `Base64`",copyAsHex:"Copy as `Hex`",copyAsUtf:"Copy as `UTF-8`"},B=i.i18n.registerUIStrings("panels/network/BinaryResourceView.ts",A),U=i.i18n.getLocalizedString.bind(void 0,B);class N extends o.Widget.VBox{binaryResourceViewFactory;toolbar;binaryViewObjects;binaryViewTypeSetting;binaryViewTypeCombobox;copiedText;addFadeoutSettimeoutId;lastView;constructor(t,s,n){super(),this.binaryResourceViewFactory=new r.BinaryResourceViewFactory.BinaryResourceViewFactory(t,s,n),this.toolbar=new o.Toolbar.Toolbar("binary-view-toolbar",this.element),this.binaryViewObjects=[new V("base64",i.i18n.lockedString("Base64"),U(A.copiedAsBase),this.binaryResourceViewFactory.createBase64View.bind(this.binaryResourceViewFactory),(()=>Promise.resolve(this.binaryResourceViewFactory.base64()))),new V("hex",U(A.hexViewer),U(A.copiedAsHex),this.binaryResourceViewFactory.createHexView.bind(this.binaryResourceViewFactory),this.binaryResourceViewFactory.hex.bind(this.binaryResourceViewFactory)),new V("utf8",i.i18n.lockedString("UTF-8"),U(A.copiedAsUtf),this.binaryResourceViewFactory.createUtf8View.bind(this.binaryResourceViewFactory),this.binaryResourceViewFactory.utf8.bind(this.binaryResourceViewFactory))],this.binaryViewTypeSetting=e.Settings.Settings.instance().createSetting("binary-view-type","hex"),this.binaryViewTypeCombobox=new o.Toolbar.ToolbarComboBox(this.binaryViewTypeChanged.bind(this),U(A.binaryViewType));for(const e of this.binaryViewObjects)this.binaryViewTypeCombobox.addOption(this.binaryViewTypeCombobox.createOption(e.label,e.type));this.toolbar.appendToolbarItem(this.binaryViewTypeCombobox);const a=new o.Toolbar.ToolbarButton(U(A.copyToClipboard),"copy");a.addEventListener("Click",(e=>{this.copySelectedViewToClipboard()}),this),this.toolbar.appendToolbarItem(a),this.copiedText=new o.Toolbar.ToolbarText,this.copiedText.element.classList.add("binary-view-copied-text"),this.toolbar.element.appendChild(this.copiedText.element),this.addFadeoutSettimeoutId=null,this.lastView=null,this.updateView()}getCurrentViewObject(){const e=this.binaryViewObjects.find((e=>e.type===this.binaryViewTypeSetting.get()));return console.assert(Boolean(e),`No binary view found for binary view type found in setting 'binary-view-type': ${this.binaryViewTypeSetting.get()}`),e||null}async copySelectedViewToClipboard(){const e=this.getCurrentViewObject();e&&(t.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(await e.content()),this.copiedText.setText(e.copiedMessage),this.copiedText.element.classList.remove("fadeout"),this.addFadeoutSettimeoutId&&(clearTimeout(thiLine truncated
|
||||
import*as e from"../../core/common/common.js";import*as t from"../../core/host/host.js";import*as i from"../../core/i18n/i18n.js";import*as r from"../../ui/legacy/components/source_frame/source_frame.js";import*as o from"../../ui/legacy/legacy.js";import*as s from"../../core/platform/platform.js";import*as n from"../../core/sdk/sdk.js";import*as a from"../../models/logs/logs.js";import"../../ui/components/buttons/buttons.js";import*as l from"../../ui/visual_logging/visual_logging.js";import*as d from"../../ui/legacy/components/data_grid/data_grid.js";import*as c from"../mobile_throttling/mobile_throttling.js";import*as h from"../settings/emulation/components/components.js";import*as u from"../../models/bindings/bindings.js";import*as p from"../../models/workspace/workspace.js";import*as g from"./forward/forward.js";import*as m from"../../ui/components/icon_button/icon_button.js";import*as w from"../../ui/legacy/components/perf_ui/perf_ui.js";import*as k from"../../ui/legacy/components/utils/utils.js";import{PanelUtils as b}from"../utils/utils.js";import*as v from"../../ui/components/legacy_wrapper/legacy_wrapper.js";import*as f from"./components/components.js";import*as C from"../../ui/legacy/components/cookie_table/cookie_table.js";import*as S from"../../ui/legacy/components/object_ui/object_ui.js";import*as y from"../../models/text_utils/text_utils.js";import*as T from"../../core/root/root.js";import*as x from"../../models/har/har.js";import*as R from"../../models/persistence/persistence.js";import*as I from"../sources/sources.js";import*as q from"../../ui/components/adorners/adorners.js";import*as L from"../../ui/components/render_coordinator/render_coordinator.js";import*as F from"../../ui/legacy/theme_support/theme_support.js";import*as P from"../../models/trace/trace.js";import*as H from"../search/search.js";import*as M from"../timeline/utils/utils.js";const E=new CSSStyleSheet;E.replaceSync(".panel.network .toolbar.binary-view-toolbar{border-top:1px solid var(--sys-color-divider);border-bottom:0;padding-left:5px}.binary-view-copied-text{opacity:100%}.binary-view-copied-text.fadeout{opacity:0%;transition:opacity 1s}\n/*# sourceURL=binaryResourceView.css */\n");const A={copiedAsBase:"Copied as `Base64`",hexViewer:"`Hex` Viewer",copiedAsHex:"Copied as `Hex`",copiedAsUtf:"Copied as `UTF-8`",binaryViewType:"Binary view type",copyToClipboard:"Copy to clipboard",copyAsBase:"Copy as `Base64`",copyAsHex:"Copy as `Hex`",copyAsUtf:"Copy as `UTF-8`"},N=i.i18n.registerUIStrings("panels/network/BinaryResourceView.ts",A),B=i.i18n.getLocalizedString.bind(void 0,N);class U extends o.Widget.VBox{binaryResourceViewFactory;toolbar;binaryViewObjects;binaryViewTypeSetting;binaryViewTypeCombobox;copiedText;addFadeoutSettimeoutId;lastView;constructor(t,s,n){super(),this.binaryResourceViewFactory=new r.BinaryResourceViewFactory.BinaryResourceViewFactory(t,s,n),this.toolbar=new o.Toolbar.Toolbar("binary-view-toolbar",this.element),this.binaryViewObjects=[new V("base64",i.i18n.lockedString("Base64"),B(A.copiedAsBase),this.binaryResourceViewFactory.createBase64View.bind(this.binaryResourceViewFactory),(()=>Promise.resolve(this.binaryResourceViewFactory.base64()))),new V("hex",B(A.hexViewer),B(A.copiedAsHex),this.binaryResourceViewFactory.createHexView.bind(this.binaryResourceViewFactory),this.binaryResourceViewFactory.hex.bind(this.binaryResourceViewFactory)),new V("utf8",i.i18n.lockedString("UTF-8"),B(A.copiedAsUtf),this.binaryResourceViewFactory.createUtf8View.bind(this.binaryResourceViewFactory),this.binaryResourceViewFactory.utf8.bind(this.binaryResourceViewFactory))],this.binaryViewTypeSetting=e.Settings.Settings.instance().createSetting("binary-view-type","hex"),this.binaryViewTypeCombobox=new o.Toolbar.ToolbarComboBox(this.binaryViewTypeChanged.bind(this),B(A.binaryViewType));for(const e of this.binaryViewObjects)this.binaryViewTypeCombobox.addOption(this.binaryViewTypeCombobox.createOption(e.label,e.type));this.toolbar.appendToolbarItem(this.binaryViewTypeCombobox);const a=new o.Toolbar.ToolbarButton(B(A.copyToClipboard),"copy");a.addEventListener("Click",(e=>{this.copySelectedViewToClipboard()}),this),this.toolbar.appendToolbarItem(a),this.copiedText=new o.Toolbar.ToolbarText,this.copiedText.element.classList.add("binary-view-copied-text"),this.toolbar.element.appendChild(this.copiedText.element),this.addFadeoutSettimeoutId=null,this.lastView=null,this.updateView()}getCurrentViewObject(){const e=this.binaryViewObjects.find((e=>e.type===this.binaryViewTypeSetting.get()));return console.assert(Boolean(e),`No binary view found for binary view type found in setting 'binary-view-type': ${this.binaryViewTypeSetting.get()}`),e||null}async copySelectedViewToClipboard(){const e=this.getCurrentViewObject();e&&(t.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(await e.content()),this.copiedText.setText(e.copiedMessage),this.copiedText.element.classList.remove("fadeout"),this.addFadeoutSettimeoutId&&(clearTimeout(thiLine truncated
|
||||
Reference in new issue
Block a user