diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/CefSharp.BrowserSubprocess.Core.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/CefSharp.BrowserSubprocess.Core.dll new file mode 100644 index 0000000..9a7f3fc Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/CefSharp.BrowserSubprocess.Core.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/CefSharp.BrowserSubprocess.exe b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/CefSharp.BrowserSubprocess.exe new file mode 100644 index 0000000..f8891fa Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/CefSharp.BrowserSubprocess.exe differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef.pak b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef.pak new file mode 100644 index 0000000..f40fe1a Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef.pak differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_100_percent.pak b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_100_percent.pak new file mode 100644 index 0000000..6dc4a19 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_100_percent.pak differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_200_percent.pak b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_200_percent.pak new file mode 100644 index 0000000..d3721d8 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_200_percent.pak differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_extensions.pak b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_extensions.pak new file mode 100644 index 0000000..a66463c Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/cef_extensions.pak differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/chrome_elf.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/chrome_elf.dll new file mode 100644 index 0000000..6bb65f9 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/chrome_elf.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/d3dcompiler_47.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/d3dcompiler_47.dll new file mode 100644 index 0000000..71220ae Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/d3dcompiler_47.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/icudtl.dat b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/icudtl.dat new file mode 100644 index 0000000..9782827 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/icudtl.dat differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libEGL.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libEGL.dll new file mode 100644 index 0000000..030f757 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libEGL.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libGLESv2.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libGLESv2.dll new file mode 100644 index 0000000..3fbd1c8 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libGLESv2.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libcef.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libcef.dll new file mode 100644 index 0000000..4fab92f Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/libcef.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/locales/en-US.pak b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/locales/en-US.pak new file mode 100644 index 0000000..2f6903b Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/locales/en-US.pak differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/natives_blob.bin b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/natives_blob.bin new file mode 100644 index 0000000..305d48a --- /dev/null +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/natives_blob.bin @@ -0,0 +1,14203 @@ + mirrorsJ} +(function(a,b){ +"use strict"; +var c=a.Array; +var d=a.isNaN; +var e=a.JSON.stringify; +var f; +var g; +var h; +var i; +b.Import(function(j){ +f=j.MapEntries; +g=j.MapIteratorNext; +h=j.SetIteratorNext; +i=j.SetValues; +}); +var k={ +UNDEFINED_TYPE:'undefined', +NULL_TYPE:'null', +BOOLEAN_TYPE:'boolean', +NUMBER_TYPE:'number', +STRING_TYPE:'string', +SYMBOL_TYPE:'symbol', +OBJECT_TYPE:'object', +FUNCTION_TYPE:'function', +REGEXP_TYPE:'regexp', +ERROR_TYPE:'error', +PROPERTY_TYPE:'property', +INTERNAL_PROPERTY_TYPE:'internalProperty', +FRAME_TYPE:'frame', +SCRIPT_TYPE:'script', +CONTEXT_TYPE:'context', +SCOPE_TYPE:'scope', +PROMISE_TYPE:'promise', +MAP_TYPE:'map', +SET_TYPE:'set', +ITERATOR_TYPE:'iterator', +GENERATOR_TYPE:'generator', +} +var l=0; +var m=-1; +var n=[]; +var o=true; +function MirrorCacheIsEmpty(){ +return l==0&&n.length==0; +} +function ToggleMirrorCache(p){ +o=p; +ClearMirrorCache(); +} +function ClearMirrorCache(p){ +l=0; +n=[]; +} +function MakeMirror(p,q){ +var r; +if(!q&&o){ +for(var s in n){ +r=n[s]; +if(r.value()===p){ +return r; +} +if(r.isNumber()&&d(r.value())&& +typeof p=='number'&&d(p)){ +return r; +} +} +} +if((p===(void 0))){ +r=new UndefinedMirror(); +}else if((p===null)){ +r=new NullMirror(); +}else if((typeof(p)==='boolean')){ +r=new BooleanMirror(p); +}else if((typeof(p)==='number')){ +r=new NumberMirror(p); +}else if((typeof(p)==='string')){ +r=new StringMirror(p); +}else if((typeof(p)==='symbol')){ +r=new SymbolMirror(p); +}else if((%_IsArray(p))){ +r=new ArrayMirror(p); +}else if((%IsDate(p))){ +r=new DateMirror(p); +}else if((%IsFunction(p))){ +r=new FunctionMirror(p); +}else if(%IsRegExp(p)){ +r=new RegExpMirror(p); +}else if((%_ClassOf(p)==='Error')){ +r=new ErrorMirror(p); +}else if((%_ClassOf(p)==='Script')){ +r=new ScriptMirror(p); +}else if((%_ClassOf(p)==='Map')||(%_ClassOf(p)==='WeakMap')){ +r=new MapMirror(p); +}else if((%_ClassOf(p)==='Set')||(%_ClassOf(p)==='WeakSet')){ +r=new SetMirror(p); +}else if((%_ClassOf(p)==='Map Iterator')||(%_ClassOf(p)==='Set Iterator')){ +r=new IteratorMirror(p); +}else if(%is_promise(p)){ +r=new PromiseMirror(p); +}else if((%_ClassOf(p)==='Generator')){ +r=new GeneratorMirror(p); +}else{ +r=new ObjectMirror(p,k.OBJECT_TYPE,q); +} +if(o)n[r.handle()]=r; +return r; +} +function LookupMirror(t){ +if(!o){ +throw %make_error(2,"Mirror cache is disabled"); +} +return n[t]; +} +function GetUndefinedMirror(){ +return MakeMirror((void 0)); +} +function inherits(u,v){ +var w=function(){}; +w.prototype=v.prototype; +u.super_=v.prototype; +u.prototype=new w(); +u.prototype.constructor=u; +} +var x=80; +var y={}; +y.Data=0; +y.Accessor=1; +var z={}; +z.None=0; +z.ReadOnly=1; +z.DontEnum=2; +z.DontDelete=4; +var A={Global:0, +Local:1, +With:2, +Closure:3, +Catch:4, +Block:5, +Script:6, +Eval:7, +Module:8, +}; +function Mirror(B){ +this.type_=B; +} +Mirror.prototype.type=function(){ +return this.type_; +}; +Mirror.prototype.isValue=function(){ +return this instanceof ValueMirror; +}; +Mirror.prototype.isUndefined=function(){ +return this instanceof UndefinedMirror; +}; +Mirror.prototype.isNull=function(){ +return this instanceof NullMirror; +}; +Mirror.prototype.isBoolean=function(){ +return this instanceof BooleanMirror; +}; +Mirror.prototype.isNumber=function(){ +return this instanceof NumberMirror; +}; +Mirror.prototype.isString=function(){ +return this instanceof StringMirror; +}; +Mirror.prototype.isSymbol=function(){ +return this instanceof SymbolMirror; +}; +Mirror.prototype.isObject=function(){ +return this instanceof ObjectMirror; +}; +Mirror.prototype.isFunction=function(){ +return this instanceof FunctionMirror; +}; +Mirror.prototype.isUnresolvedFunction=function(){ +return this instanceof UnresolvedFunctionMirror; +}; +Mirror.prototype.isArray=function(){ +return this instanceof ArrayMirror; +}; +Mirror.prototype.isDate=function(){ +return this instanceof DateMirror; +}; +Mirror.prototype.isRegExp=function(){ +return this instanceof RegExpMirror; +}; +Mirror.prototype.isError=function(){ +return this instanceof ErrorMirror; +}; +Mirror.prototype.isPromise=function(){ +return this instanceof PromiseMirror; +}; +Mirror.prototype.isGenerator=function(){ +return this instanceof GeneratorMirror; +}; +Mirror.prototype.isProperty=function(){ +return this instanceof PropertyMirror; +}; +Mirror.prototype.isInternalProperty=function(){ +return this instanceof InternalPropertyMirror; +}; +Mirror.prototype.isFrame=function(){ +return this instanceof FrameMirror; +}; +Mirror.prototype.isScript=function(){ +return this instanceof ScriptMirror; +}; +Mirror.prototype.isContext=function(){ +return this instanceof ContextMirror; +}; +Mirror.prototype.isScope=function(){ +return this instanceof ScopeMirror; +}; +Mirror.prototype.isMap=function(){ +return this instanceof MapMirror; +}; +Mirror.prototype.isSet=function(){ +return this instanceof SetMirror; +}; +Mirror.prototype.isIterator=function(){ +return this instanceof IteratorMirror; +}; +Mirror.prototype.allocateHandle_=function(){ +if(o)this.handle_=l++; +}; +Mirror.prototype.allocateTransientHandle_=function(){ +this.handle_=m--; +}; +Mirror.prototype.toText=function(){ +return"#<"+this.constructor.name+">"; +}; +function ValueMirror(B,p,C){ +%_Call(Mirror,this,B); +this.value_=p; +if(!C){ +this.allocateHandle_(); +}else{ +this.allocateTransientHandle_(); +} +} +inherits(ValueMirror,Mirror); +Mirror.prototype.handle=function(){ +return this.handle_; +}; +ValueMirror.prototype.isPrimitive=function(){ +var B=this.type(); +return B==='undefined'|| +B==='null'|| +B==='boolean'|| +B==='number'|| +B==='string'|| +B==='symbol'; +}; +ValueMirror.prototype.value=function(){ +return this.value_; +}; +function UndefinedMirror(){ +%_Call(ValueMirror,this,k.UNDEFINED_TYPE,(void 0)); +} +inherits(UndefinedMirror,ValueMirror); +UndefinedMirror.prototype.toText=function(){ +return'undefined'; +}; +function NullMirror(){ +%_Call(ValueMirror,this,k.NULL_TYPE,null); +} +inherits(NullMirror,ValueMirror); +NullMirror.prototype.toText=function(){ +return'null'; +}; +function BooleanMirror(p){ +%_Call(ValueMirror,this,k.BOOLEAN_TYPE,p); +} +inherits(BooleanMirror,ValueMirror); +BooleanMirror.prototype.toText=function(){ +return this.value_?'true':'false'; +}; +function NumberMirror(p){ +%_Call(ValueMirror,this,k.NUMBER_TYPE,p); +} +inherits(NumberMirror,ValueMirror); +NumberMirror.prototype.toText=function(){ +return %_NumberToString(this.value_); +}; +function StringMirror(p){ +%_Call(ValueMirror,this,k.STRING_TYPE,p); +} +inherits(StringMirror,ValueMirror); +StringMirror.prototype.length=function(){ +return this.value_.length; +}; +StringMirror.prototype.getTruncatedValue=function(D){ +if(D!=-1&&this.length()>D){ +return this.value_.substring(0,D)+ +'... (length: '+this.length()+')'; +} +return this.value_; +}; +StringMirror.prototype.toText=function(){ +return this.getTruncatedValue(x); +}; +function SymbolMirror(p){ +%_Call(ValueMirror,this,k.SYMBOL_TYPE,p); +} +inherits(SymbolMirror,ValueMirror); +SymbolMirror.prototype.description=function(){ +return %SymbolDescription(%ValueOf(this.value_)); +} +SymbolMirror.prototype.toText=function(){ +return %SymbolDescriptiveString(%ValueOf(this.value_)); +} +function ObjectMirror(p,B,C){ +B=B||k.OBJECT_TYPE; +%_Call(ValueMirror,this,B,p,C); +} +inherits(ObjectMirror,ValueMirror); +ObjectMirror.prototype.className=function(){ +return %_ClassOf(this.value_); +}; +ObjectMirror.prototype.constructorFunction=function(){ +return MakeMirror(%DebugGetProperty(this.value_,'constructor')); +}; +ObjectMirror.prototype.prototypeObject=function(){ +return MakeMirror(%DebugGetProperty(this.value_,'prototype')); +}; +ObjectMirror.prototype.protoObject=function(){ +return MakeMirror(%DebugGetPrototype(this.value_)); +}; +ObjectMirror.prototype.hasNamedInterceptor=function(){ +var E=%GetInterceptorInfo(this.value_); +return(E&2)!=0; +}; +ObjectMirror.prototype.hasIndexedInterceptor=function(){ +var E=%GetInterceptorInfo(this.value_); +return(E&1)!=0; +}; +ObjectMirror.prototype.propertyNames=function(){ +return %GetOwnPropertyKeys(this.value_,0); +}; +ObjectMirror.prototype.properties=function(){ +var F=this.propertyNames(); +var G=new c(F.length); +for(var H=0;H'; +}; +ObjectMirror.GetInternalProperties=function(p){ +var G=%DebugGetInternalProperties(p); +var M=[]; +for(var H=0;HT)return new c(); +var U=new c(T-S+1); +for(var H=S;H<=T;H++){ +var J=%DebugGetPropertyDetails(this.value_,(%_ToString(H))); +var p; +if(J){ +p=new PropertyMirror(this,H,J); +}else{ +p=GetUndefinedMirror(); +} +U[H-S]=p; +} +return U; +}; +function DateMirror(p){ +%_Call(ObjectMirror,this,p); +} +inherits(DateMirror,ObjectMirror); +DateMirror.prototype.toText=function(){ +var V=e(this.value_); +return V.substring(1,V.length-1); +}; +function RegExpMirror(p){ +%_Call(ObjectMirror,this,p,k.REGEXP_TYPE); +} +inherits(RegExpMirror,ObjectMirror); +RegExpMirror.prototype.source=function(){ +return this.value_.source; +}; +RegExpMirror.prototype.global=function(){ +return this.value_.global; +}; +RegExpMirror.prototype.ignoreCase=function(){ +return this.value_.ignoreCase; +}; +RegExpMirror.prototype.multiline=function(){ +return this.value_.multiline; +}; +RegExpMirror.prototype.sticky=function(){ +return this.value_.sticky; +}; +RegExpMirror.prototype.unicode=function(){ +return this.value_.unicode; +}; +RegExpMirror.prototype.toText=function(){ +return"/"+this.source()+"/"; +}; +function ErrorMirror(p){ +%_Call(ObjectMirror,this,p,k.ERROR_TYPE); +} +inherits(ErrorMirror,ObjectMirror); +ErrorMirror.prototype.message=function(){ +return this.value_.message; +}; +ErrorMirror.prototype.toText=function(){ +var W; +try{ +W=%ErrorToString(this.value_); +}catch(e){ +W='#'; +} +return W; +}; +function PromiseMirror(p){ +%_Call(ObjectMirror,this,p,k.PROMISE_TYPE); +} +inherits(PromiseMirror,ObjectMirror); +function PromiseGetStatus_(p){ +var X=%PromiseStatus(p); +if(X==0)return"pending"; +if(X==1)return"resolved"; +return"rejected"; +} +function PromiseGetValue_(p){ +return %PromiseResult(p); +} +PromiseMirror.prototype.status=function(){ +return PromiseGetStatus_(this.value_); +}; +PromiseMirror.prototype.promiseValue=function(){ +return MakeMirror(PromiseGetValue_(this.value_)); +}; +function MapMirror(p){ +%_Call(ObjectMirror,this,p,k.MAP_TYPE); +} +inherits(MapMirror,ObjectMirror); +MapMirror.prototype.entries=function(Y){ +var M=[]; +if((%_ClassOf(this.value_)==='WeakMap')){ +var Z=%GetWeakMapEntries(this.value_,Y||0); +for(var H=0;H3){ +this.exception_=J[3]; +this.getter_=J[4]; +this.setter_=J[5]; +} +} +inherits(PropertyMirror,Mirror); +PropertyMirror.prototype.isReadOnly=function(){ +return(this.attributes()&z.ReadOnly)!=0; +}; +PropertyMirror.prototype.isEnum=function(){ +return(this.attributes()&z.DontEnum)==0; +}; +PropertyMirror.prototype.canDelete=function(){ +return(this.attributes()&z.DontDelete)==0; +}; +PropertyMirror.prototype.name=function(){ +return this.name_; +}; +PropertyMirror.prototype.toText=function(){ +if((typeof(this.name_)==='symbol'))return %SymbolDescriptiveString(this.name_); +return this.name_; +}; +PropertyMirror.prototype.isIndexed=function(){ +for(var H=0;H0; +}; +FrameDetails.prototype.inlinedFrameIndex=function(){ +%CheckExecutionState(this.break_id_); +var ay=aw; +return(this.details_[ap]&ay)>>2; +}; +FrameDetails.prototype.argumentCount=function(){ +%CheckExecutionState(this.break_id_); +return this.details_[ak]; +}; +FrameDetails.prototype.argumentName=function(P){ +%CheckExecutionState(this.break_id_); +if(P>=0&&P=0&&P=0&&P=0&&P0){ +for(var H=0;H0){ +M+=this.lineOffset(); +M+='-'; +M+=this.lineOffset()+this.lineCount()-1; +}else{ +M+=this.lineCount(); +} +M+=')'; +return M; +}; +function ContextMirror(aZ){ +%_Call(Mirror,this,k.CONTEXT_TYPE); +this.data_=aZ; +this.allocateHandle_(); +} +inherits(ContextMirror,Mirror); +ContextMirror.prototype.data=function(){ +return this.data_; +}; +function MakeMirrorSerializer(J,ba){ +return new JSONProtocolSerializer(J,ba); +} +function JSONProtocolSerializer(J,ba){ +this.details_=J; +this.options_=ba; +this.mirrors_=[]; +} +JSONProtocolSerializer.prototype.serializeReference=function(r){ +return this.serialize_(r,true,true); +}; +JSONProtocolSerializer.prototype.serializeValue=function(r){ +var bb=this.serialize_(r,false,true); +return bb; +}; +JSONProtocolSerializer.prototype.serializeReferencedObjects=function(){ +var bc=[]; +var bd=this.mirrors_.length; +for(var H=0;Hthis.maxStringLength_()){ +var bf=r.getTruncatedValue(this.maxStringLength_()); +bc.value=bf; +bc.fromIndex=0; +bc.toIndex=this.maxStringLength_(); +}else{ +bc.value=r.value(); +} +bc.length=r.length(); +break; +case k.SYMBOL_TYPE: +bc.description=r.description(); +break; +case k.OBJECT_TYPE: +case k.FUNCTION_TYPE: +case k.ERROR_TYPE: +case k.REGEXP_TYPE: +case k.PROMISE_TYPE: +case k.GENERATOR_TYPE: +this.serializeObject_(r,bc,J); +break; +case k.PROPERTY_TYPE: +case k.INTERNAL_PROPERTY_TYPE: +throw %make_error(2, +'PropertyMirror cannot be serialized independently'); +break; +case k.FRAME_TYPE: +this.serializeFrame_(r,bc); +break; +case k.SCOPE_TYPE: +this.serializeScope_(r,bc); +break; +case k.SCRIPT_TYPE: +if(r.name()){ +bc.name=r.name(); +} +bc.id=r.id(); +bc.lineOffset=r.lineOffset(); +bc.columnOffset=r.columnOffset(); +bc.lineCount=r.lineCount(); +if(r.data()){ +bc.data=r.data(); +} +if(this.includeSource_()){ +bc.source=r.source(); +}else{ +var bg=r.source().substring(0,80); +bc.sourceStart=bg; +} +bc.sourceLength=r.source().length; +bc.scriptType=r.scriptType(); +bc.compilationType=r.compilationType(); +if(r.compilationType()==1&& +r.evalFromScript()){ +bc.evalFromScript= +this.serializeReference(r.evalFromScript()); +var bh=r.evalFromLocation(); +if(bh){ +bc.evalFromLocation={line:bh.line, +column:bh.column}; +} +if(r.evalFromFunctionName()){ +bc.evalFromFunctionName=r.evalFromFunctionName(); +} +} +if(r.context()){ +bc.context=this.serializeReference(r.context()); +} +break; +case k.CONTEXT_TYPE: +bc.data=r.data(); +break; +} +bc.text=r.toText(); +return bc; +}; +JSONProtocolSerializer.prototype.serializeObject_=function(r,bc, +J){ +bc.className=r.className(); +bc.constructorFunction= +this.serializeReference(r.constructorFunction()); +bc.protoObject=this.serializeReference(r.protoObject()); +bc.prototypeObject=this.serializeReference(r.prototypeObject()); +if(r.hasNamedInterceptor()){ +bc.namedInterceptor=true; +} +if(r.hasIndexedInterceptor()){ +bc.indexedInterceptor=true; +} +if(r.isFunction()){ +bc.name=r.name(); +if(!(r.inferredName()===(void 0))){ +bc.inferredName=r.inferredName(); +} +bc.resolved=r.resolved(); +if(r.resolved()){ +bc.source=r.source(); +} +if(r.script()){ +bc.script=this.serializeReference(r.script()); +bc.scriptId=r.script().id(); +serializeLocationFields(r.sourceLocation(),bc); +} +bc.scopes=[]; +for(var H=0;H0){ +var bl=[]; +for(var H=0;H0){ +return'Infinity'; +}else{ +return'-Infinity'; +} +} +return p; +} +b.InstallFunctions(a,2,[ +"MakeMirror",MakeMirror, +"MakeMirrorSerializer",MakeMirrorSerializer, +"LookupMirror",LookupMirror, +"ToggleMirrorCache",ToggleMirrorCache, +"MirrorCacheIsEmpty",MirrorCacheIsEmpty, +]); +b.InstallConstants(a,[ +"ScopeType",A, +"PropertyType",y, +"PropertyAttribute",z, +"Mirror",Mirror, +"ValueMirror",ValueMirror, +"UndefinedMirror",UndefinedMirror, +"NullMirror",NullMirror, +"BooleanMirror",BooleanMirror, +"NumberMirror",NumberMirror, +"StringMirror",StringMirror, +"SymbolMirror",SymbolMirror, +"ObjectMirror",ObjectMirror, +"FunctionMirror",FunctionMirror, +"UnresolvedFunctionMirror",UnresolvedFunctionMirror, +"ArrayMirror",ArrayMirror, +"DateMirror",DateMirror, +"RegExpMirror",RegExpMirror, +"ErrorMirror",ErrorMirror, +"PromiseMirror",PromiseMirror, +"MapMirror",MapMirror, +"SetMirror",SetMirror, +"IteratorMirror",IteratorMirror, +"GeneratorMirror",GeneratorMirror, +"PropertyMirror",PropertyMirror, +"InternalPropertyMirror",InternalPropertyMirror, +"FrameMirror",FrameMirror, +"ScriptMirror",ScriptMirror, +"ScopeMirror",ScopeMirror, +"FrameDetails",FrameDetails, +]); +b.InstallFunctions(b,2,[ +"ClearMirrorCache",ClearMirrorCache +]); +b.Export(function(bt){ +bt.MirrorType=k; +}); +}) + +debugêL +(function(a,b){ +"use strict"; +var c=a.FrameMirror; +var d=a.Array; +var e=a.RegExp; +var f=a.isNaN; +var g=a.JSON.parse; +var h=a.JSON.stringify; +var i=a.LookupMirror; +var j=a.MakeMirror; +var k=a.MakeMirrorSerializer; +var l=a.Math.min; +var m=a.Mirror; +var n; +var o=a.parseInt; +var p=a.ValueMirror; +b.Import(function(q){ +n=q.MirrorType; +}); +var r=10; +var s={}; +var t=/^(?:\s*(?:\/\*.*?\*\/)*)*/; +s.DebugEvent={Break:1, +Exception:2, +AfterCompile:3, +CompileError:4, +AsyncTaskEvent:5}; +s.ExceptionBreak={Caught:0, +Uncaught:1}; +s.StepAction={StepOut:0, +StepNext:1, +StepIn:2, +StepFrame:3}; +s.ScriptType={Native:0, +Extension:1, +Normal:2, +Wasm:3}; +s.ScriptCompilationType={Host:0, +Eval:1, +JSON:2}; +s.ScriptBreakPointType={ScriptId:0, +ScriptName:1, +ScriptRegExp:2}; +s.BreakPositionAlignment={ +Statement:0, +BreakPosition:1 +}; +function ScriptTypeFlag(u){ +return(1<=this.frameCount()){ +throw %make_type_error(32); +} +return new c(this.break_id,au); +}; +ExecutionState.prototype.setSelectedFrame=function(av){ +var J=(%_ToNumber(av)); +if(J<0||J>=this.frameCount()){ +throw %make_type_error(32); +} +this.selected_frame=J; +}; +ExecutionState.prototype.selectedFrame=function(){ +return this.selected_frame; +}; +ExecutionState.prototype.debugCommandProcessor=function(aw){ +return new DebugCommandProcessor(this,aw); +}; +function MakeBreakEvent(H,ax){ +return new BreakEvent(H,ax); +} +function BreakEvent(H,ax){ +this.frame_=new c(H,0); +this.break_points_hit_=ax; +} +BreakEvent.prototype.eventType=function(){ +return s.DebugEvent.Break; +}; +BreakEvent.prototype.func=function(){ +return this.frame_.func(); +}; +BreakEvent.prototype.sourceLine=function(){ +return this.frame_.sourceLine(); +}; +BreakEvent.prototype.sourceColumn=function(){ +return this.frame_.sourceColumn(); +}; +BreakEvent.prototype.sourceLineText=function(){ +return this.frame_.sourceLineText(); +}; +BreakEvent.prototype.breakPointsHit=function(){ +return this.break_points_hit_; +}; +BreakEvent.prototype.toJSONProtocol=function(){ +var ay={seq:v++, +type:"event", +event:"break", +body:{invocationText:this.frame_.invocationText()} +}; +var M=this.func().script(); +if(M){ +ay.body.sourceLine=this.sourceLine(), +ay.body.sourceColumn=this.sourceColumn(), +ay.body.sourceLineText=this.sourceLineText(), +ay.body.script=MakeScriptObject_(M,false); +} +if(this.breakPointsHit()){ +ay.body.breakpoints=[]; +for(var J=0;J0){ +ay.body.sourceLine=this.sourceLine(); +ay.body.sourceColumn=this.sourceColumn(); +ay.body.sourceLineText=this.sourceLineText(); +var M=this.func().script(); +if(M){ +ay.body.script=MakeScriptObject_(M,false); +} +}else{ +ay.body.sourceLine=-1; +} +return ay.toJSONProtocol(); +}; +function MakeCompileEvent(M,u){ +return new CompileEvent(M,u); +} +function CompileEvent(M,u){ +this.script_=j(M); +this.type_=u; +} +CompileEvent.prototype.eventType=function(){ +return this.type_; +}; +CompileEvent.prototype.script=function(){ +return this.script_; +}; +CompileEvent.prototype.toJSONProtocol=function(){ +var ay=new ProtocolMessage(); +ay.running=true; +switch(this.type_){ +case s.DebugEvent.BeforeCompile: +ay.event="beforeCompile"; +break; +case s.DebugEvent.AfterCompile: +ay.event="afterCompile"; +break; +case s.DebugEvent.CompileError: +ay.event="compileError"; +break; +} +ay.body={}; +ay.body.script=this.script_; +return ay.toJSONProtocol(); +}; +function MakeScriptObject_(M,aE){ +var ay={id:M.id(), +name:M.name(), +lineOffset:M.lineOffset(), +columnOffset:M.columnOffset(), +lineCount:M.lineCount(), +}; +if(!(M.data()===(void 0))){ +ay.data=M.data(); +} +if(aE){ +ay.source=M.source(); +} +return ay; +} +function MakeAsyncTaskEvent(u,aF){ +return new AsyncTaskEvent(u,aF); +} +function AsyncTaskEvent(u,aF){ +this.type_=u; +this.id_=aF; +} +AsyncTaskEvent.prototype.type=function(){ +return this.type_; +} +AsyncTaskEvent.prototype.id=function(){ +return this.id_; +} +function DebugCommandProcessor(F,aw){ +this.exec_state_=F; +this.running_=aw||false; +} +DebugCommandProcessor.prototype.processDebugRequest=function(aG){ +return this.processDebugJSONRequest(aG); +}; +function ProtocolMessage(aG){ +this.seq=v++; +if(aG){ +this.type='response'; +this.request_seq=aG.seq; +this.command=aG.command; +}else{ +this.type='event'; +} +this.success=true; +this.running=(void 0); +} +ProtocolMessage.prototype.setOption=function(aH,A){ +if(!this.options_){ +this.options_={}; +} +this.options_[aH]=A; +}; +ProtocolMessage.prototype.failed=function(aI,aJ){ +this.success=false; +this.message=aI; +if((typeof(aJ)==='object')){ +this.error_details=aJ; +} +}; +ProtocolMessage.prototype.toJSONProtocol=function(){ +var aK={}; +aK.seq=this.seq; +if(this.request_seq){ +aK.request_seq=this.request_seq; +} +aK.type=this.type; +if(this.event){ +aK.event=this.event; +} +if(this.command){ +aK.command=this.command; +} +if(this.success){ +aK.success=this.success; +}else{ +aK.success=false; +} +if(this.body){ +var aL; +var aM=k(true,this.options_); +if(this.body instanceof m){ +aL=aM.serializeValue(this.body); +}else if(this.body instanceof d){ +aL=[]; +for(var J=0;J=this.exec_state_.frameCount()){ +return aN.failed('Invalid frame "'+bl+'"'); +} +aN.body=this.exec_state_.frame(bx).evaluate(bw); +return; +}else{ +aN.body=this.exec_state_.frame().evaluate(bw); +return; +} +}; +DebugCommandProcessor.prototype.lookupRequest_=function(aG,aN){ +if(!aG.arguments){ +return aN.failed('Missing arguments'); +} +var by=aG.arguments.handles; +if((by===(void 0))){ +return aN.failed('Argument "handles" missing'); +} +if(!(aG.arguments.includeSource===(void 0))){ +var bz=(!!(aG.arguments.includeSource)); +aN.setOption('includeSource',bz); +} +var bA={}; +for(var J=0;J=this.exec_state_.frameCount()){ +return aN.failed('Invalid frame "'+bl+'"'); +} +bl=this.exec_state_.frame(bx); +} +} +var M=bl.func().script(); +if(!M){ +return aN.failed('No source'); +} +var bD=M.value(); +var bE=bD.line_offset; +var bF=%ScriptLineCount(bD); +bB=(bB===(void 0))?0:bB-bE; +bC=(bC===(void 0))?bF:bC-bE; +if(bB<0)bB=0; +if(bC>bF)bC=bF; +if(bB>=bF||bC<0||bB>bC){ +return aN.failed('Invalid line interval'); +} +aN.body={}; +aN.body.fromLine=bB+bE; +aN.body.toLine=bC+bE; +aN.body.fromPosition=%ScriptLineStartPosition(bD,bB); +aN.body.toPosition= +(bC==0)?0:%ScriptLineEndPosition(bD,bC-1); +aN.body.totalLines=%ScriptLineCount(bD); +aN.body.source=%_SubString(bD.source, +aN.body.fromPosition, +aN.body.toPosition); +}; +DebugCommandProcessor.prototype.scriptsRequest_=function(aG,aN){ +var bG=ScriptTypeFlag(s.ScriptType.Normal); +var bz=false; +var bH=null; +if(aG.arguments){ +if(!(aG.arguments.types===(void 0))){ +bG=(%_ToNumber(aG.arguments.types)); +if(f(bG)||bG<0){ +return aN.failed('Invalid types "'+ +aG.arguments.types+'"'); +} +} +if(!(aG.arguments.includeSource===(void 0))){ +bz=(!!(aG.arguments.includeSource)); +aN.setOption('includeSource',bz); +} +if((%_IsArray(aG.arguments.ids))){ +bH={}; +var bI=aG.arguments.ids; +for(var J=0;J=0){ +bM=true; +} +} +if(!bM)continue; +} +if(bG&ScriptTypeFlag(V[J].type)){ +aN.body.push(j(V[J])); +} +} +}; +DebugCommandProcessor.prototype.suspendRequest_=function(aG,aN){ +aN.running=false; +}; +DebugCommandProcessor.prototype.versionRequest_=function(aG,aN){ +aN.body={ +V8Version:%GetV8Version() +}; +}; +DebugCommandProcessor.prototype.changeLiveRequest_=function( +aG,aN){ +if(!aG.arguments){ +return aN.failed('Missing arguments'); +} +var bN=aG.arguments.script_id; +var bO=!!aG.arguments.preview_only; +var bP=scriptById(bN); +if(!bP){ +aN.failed('Script not found'); +return; +} +var bQ=new d(); +if(!(typeof(aG.arguments.new_source)==='string')){ +throw"new_source argument expected"; +} +var bR=aG.arguments.new_source; +var bS; +try{ +bS=s.LiveEdit.SetScriptSource(bP, +bR,bO,bQ); +}catch(e){ +if(e instanceof s.LiveEdit.Failure&&"details"in e){ +aN.failed(e.message,e.details); +return; +} +throw e; +} +aN.body={change_log:bQ,result:bS}; +if(!bO&&!this.running_&&bS.stack_modified){ +aN.body.stepin_recommended=true; +} +}; +DebugCommandProcessor.prototype.restartFrameRequest_=function( +aG,aN){ +if(!aG.arguments){ +return aN.failed('Missing arguments'); +} +var bl=aG.arguments.frame; +if(this.exec_state_.frameCount()==0){ +return aN.failed('No frames'); +} +var bT; +if(!(bl===(void 0))){ +var bx=(%_ToNumber(bl)); +if(bx<0||bx>=this.exec_state_.frameCount()){ +return aN.failed('Invalid frame "'+bl+'"'); +} +bT=this.exec_state_.frame(bx); +}else{ +bT=this.exec_state_.frame(); +} +var bS=bT.restart(); +aN.body={result:bS}; +}; +DebugCommandProcessor.prototype.debuggerFlagsRequest_=function(aG, +aN){ +if(!aG.arguments){ +aN.failed('Missing arguments'); +return; +} +var bU=aG.arguments.flags; +aN.body={flags:[]}; +if(!(bU===(void 0))){ +for(var J=0;Jf(max,info.function_literal_id),0); +var q=BuildCodeInfoTree(m); +FindCorrespondingFunctions(k,q); +var r=new d(); +var s=new d(); +var t=new d(); +var u=new d(); +function HarvestTodo(v){ +function CollectDamaged(w){ +s.push(w); +for(var x=0;xO[E].start_position){ +R=E; +} +} +if(R!=x){ +var S=O[R]; +var T=P[R]; +O[R]=O[x]; +P[R]=P[x]; +O[x]=S; +P[x]=T; +} +} +var U=0; +function ResetIndexes(V,W){ +var X=-1; +while(U=ay.pos1+ay.len1){ +return as+ay.pos2+ay.len2-ay.pos1-ay.len1; +} +if(!at){ +at=PosTranslator.DefaultInsideChunkHandler; +} +return at(as,ay); +}; +PosTranslator.DefaultInsideChunkHandler=function(as,az){ +Assert(false,"Cannot translate position in changed area"); +}; +PosTranslator.ShiftWithTopInsideChunkHandler= +function(as,az){ +return as-az.pos1+az.pos2; +}; +var h={ +UNCHANGED:"unchanged", +SOURCE_CHANGED:"source changed", +CHANGED:"changed", +DAMAGED:"damaged" +}; +function CodeInfoTreeNode(aA,aB,aC){ +this.info=aA; +this.children=aB; +this.array_index=aC; +this.parent=(void 0); +this.status=h.UNCHANGED; +this.status_explanation=(void 0); +this.new_start_pos=(void 0); +this.new_end_pos=(void 0); +this.corresponding_node=(void 0); +this.unmatched_new_nodes=(void 0); +this.textual_corresponding_node=(void 0); +this.textually_unmatched_new_nodes=(void 0); +this.live_shared_function_infos=(void 0); +} +function BuildCodeInfoTree(aD){ +var aE=0; +function BuildNode(){ +var aF=aE; +aE++; +var aG=new d(); +while(aE=am.length;}; +this.TranslatePos=function(as){return as+aL;}; +}; +function ProcessInternals(aM){ +aM.new_start_pos=aJ.TranslatePos( +aM.info.start_position); +var aN=0; +var aO=false; +var aP=false; +while(!aJ.done()&& +aJ.current().pos1= +aJ.current().pos1+aJ.current().len1){ +aO=true; +aJ.next(); +continue; +}else if(aQ.info.start_position<=aJ.current().pos1&& +aQ.info.end_position>=aJ.current().pos1+ +aJ.current().len1){ +ProcessInternals(aQ); +aP=aP|| +(aQ.status!=h.UNCHANGED); +aO=aO|| +(aQ.status==h.DAMAGED); +aN++; +continue; +}else{ +aO=true; +aQ.status=h.DAMAGED; +aQ.status_explanation= +"Text diff overlaps with function boundary"; +aN++; +continue; +} +}else{ +if(aJ.current().pos1+aJ.current().len1<= +aM.info.end_position){ +aM.status=h.CHANGED; +aJ.next(); +continue; +}else{ +aM.status=h.DAMAGED; +aM.status_explanation= +"Text diff overlaps with function boundary"; +return; +} +} +Assert("Unreachable",false); +} +while(aN0){ +return bd; +} +} +function TraverseTree(w){ +w.live_shared_function_infos=FindFunctionInfos(w.info); +for(var x=0;x ["+bl+"]"; +} +return; +} +var bm; +function CheckStackActivations(old_shared_wrapper_list, +new_shared_list, +Z){ +var bn=new d(); +for(var x=0;x0){ +Z.push({dropped_from_stack:bq}); +} +if(bp.length>0){ +Z.push({functions_on_stack:bp}); +throw new Failure("Blocked by functions on stack"); +} +return bq.length; +} +var bm={ +AVAILABLE_FOR_PATCH:1, +BLOCKED_ON_ACTIVE_STACK:2, +BLOCKED_ON_OTHER_STACK:3, +BLOCKED_UNDER_NATIVE_CODE:4, +REPLACED_ON_ACTIVE_STACK:5, +BLOCKED_UNDER_GENERATOR:6, +BLOCKED_ACTIVE_GENERATOR:7, +BLOCKED_NO_NEW_TARGET_ON_RESTART:8 +}; +bm.SymbolName=function(bt){ +var bu=bm; +for(var bv in bu){ +if(bu[bv]==bt){ +return bv; +} +} +}; +function Failure(ag){ +this.message=ag; +} +Failure.prototype.toString=function(){ +return"LiveEdit Failure: "+this.message; +}; +function CopyErrorPositionToDetails(bw,o){ +function createPositionStruct(M,bx){ +if(bx==-1)return; +var by=M.locationFromPosition(bx,true); +if(by==null)return; +return{ +line:by.line+1, +column:by.column+1, +position:bx +}; +} +if(!("scriptObject"in bw)||!("startPosition"in bw)){ +return; +} +var M=bw.scriptObject; +var bz={ +start:createPositionStruct(M,bw.startPosition), +end:createPositionStruct(M,bw.endPosition) +}; +o.position=bz; +} +function SetScriptSource(M,bA,bB,Z){ +var i=M.source; +var bC=CompareStrings(i,bA); +return ApplyPatchMultiChunk(M,bC,bA,bB, +Z); +} +function CompareStrings(bD,bE){ +return %LiveEditCompareStrings(bD,bE); +} +function ApplySingleChunkPatch(M,change_pos,change_len,new_str, +Z){ +var i=M.source; +var bA=i.substring(0,change_pos)+ +new_str+i.substring(change_pos+change_len); +return ApplyPatchMultiChunk(M, +[change_pos,change_pos+change_len,change_pos+new_str.length], +bA,false,Z); +} +function DescribeChangeTree(aR){ +function ProcessOldNode(w){ +var bF=[]; +for(var x=0;x>1); +var m=2|4|1; +for(var n=0;n>1); +for(var n=0;n>1)+(fields?fields.length:0); +if(u>=4){ +%OptimizeObjectForAddingMultipleProperties(t,u); +} +if(fields){ +for(var n=0;n9007199254740991)throw %make_range_error(i); +return j; +} +function MaxSimple(k,l){ +return k>l?k:l; +} +function MinSimple(k,l){ +return k>l?l:k; +} +%SetForceInlineFlag(MaxSimple); +%SetForceInlineFlag(MinSimple); +function SpeciesConstructor(m,n){ +var o=m.constructor; +if((o===(void 0))){ +return n; +} +if(!(%_IsJSReceiver(o))){ +throw %make_type_error(27); +} +var p=o[f]; +if((p==null)){ +return n; +} +if(%IsConstructor(p)){ +return p; +} +throw %make_type_error(235); +} +%FunctionSetPrototype(c,new c(0)); +b.Export(function(q){ +q.MaxSimple=MaxSimple; +q.MinSimple=MinSimple; +q.ToPositiveInteger=ToPositiveInteger; +q.ToIndex=ToIndex; +q.SpeciesConstructor=SpeciesConstructor; +}); +}) + +$v8nativesu +(function(a,b){ +%CheckIsBootstrapping(); +var c=a.Number; +var d=a.Object; +var e=b.ImportNow("iterator_symbol"); +var f=%GetRootNaN(); +var g=b.ImportNow("object_to_string"); +var h=2|4|1; +b.InstallConstants(a,[ +"Infinity",(1/0), +"NaN",f, +"undefined",(void 0), +]); +function ObjectToLocaleString(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Object.prototype.toLocaleString"); +return this.toString(); +} +function ObjectValueOf(){ +return(%_ToObject(this)); +} +function ObjectIsPrototypeOf(i){ +if(!(%_IsJSReceiver(i)))return false; +var j=(%_ToObject(this)); +return %HasInPrototypeChain(i,j); +} +function GetMethod(k,l){ +var m=k[l]; +if((m==null))return(void 0); +if((typeof(m)==='function'))return m; +throw %make_type_error(14,typeof m); +} +function ObjectConstructor(n){ +if(d!=new.target&&!(new.target===(void 0))){ +return this; +} +if((n===null)||(n===(void 0)))return{}; +return(%_ToObject(n)); +} +%SetNativeFlag(d); +%SetCode(d,ObjectConstructor); +%AddNamedProperty(d.prototype,"constructor",d, +2); +b.InstallFunctions(d.prototype,2,[ +"toString",g, +"toLocaleString",ObjectToLocaleString, +"valueOf",ObjectValueOf, +"isPrototypeOf",ObjectIsPrototypeOf, +]); +b.InstallConstants(c,[ +"MAX_VALUE",1.7976931348623157e+308, +"MIN_VALUE",5e-324, +"NaN",f, +"NEGATIVE_INFINITY",-(1/0), +"POSITIVE_INFINITY",(1/0), +"MAX_SAFE_INTEGER",9007199254740991, +"MIN_SAFE_INTEGER",-9007199254740991, +"EPSILON",2.220446049250313e-16, +]); +function GetIterator(k,o){ +if((o===(void 0))){ +o=k[e]; +} +if(!(typeof(o)==='function')){ +throw %make_type_error(70,k); +} +var p=%_Call(o,k); +if(!(%_IsJSReceiver(p))){ +throw %make_type_error(64,p); +} +return p; +} +b.Export(function(q){ +q.GetIterator=GetIterator; +q.GetMethod=GetMethod; +q.ObjectHasOwnProperty=d.prototype.hasOwnProperty; +}); +%InstallToContext([ +"object_value_of",ObjectValueOf, +]); +}) + +arrayji +(function(a,b,c){ +"use strict"; +%CheckIsBootstrapping(); +var d; +var e; +var f=a.Array; +var g=b.InternalArray; +var h=b.InternalPackedArray; +var i; +var j; +var k; +var l=b.ImportNow("object_to_string"); +var m=b.ImportNow("iterator_symbol"); +var n=b.ImportNow("unscopables_symbol"); +b.Import(function(o){ +d=o.GetIterator; +e=o.GetMethod; +i=o.MaxSimple; +j=o.MinSimple; +k=o.ObjectHasOwnProperty; +}); +function ArraySpeciesCreate(p,q){ +q=((q)+0); +var r=%ArraySpeciesConstructor(p); +return new r(q); +} +function KeySortCompare(s,t){ +return s-t; +} +function GetSortedArrayKeys(p,u){ +if((typeof(u)==='number')){ +var v=u; +var w=new g(); +for(var x=0;x>2; +var H=%EstimateNumberOfElements(p); +return(HH*4); +} +function Stack(){ +this.length=0; +this.values=new g(); +} +Stack.prototype.length=null; +Stack.prototype.values=null; +function StackPush(I,J){ +I.values[I.length++]=J; +} +function StackPop(I){ +I.values[--I.length]=null +} +function StackHas(I,K){ +var q=I.length; +var L=I.values; +for(var x=0;x=O){ +var S=p[D]; +if(!(S===(void 0))||D in p){ +%CreateDataProperty(R,D-O,S); +} +} +} +} +} +function SparseMove(p,O,P,Q,U){ +if(U===P)return; +var V=new g( +j(Q-P+U,0xffffffff)); +var W; +var u=%GetArrayKeys(p,Q); +if((typeof(u)==='number')){ +var v=u; +for(var x=0;x=O+P){ +var S=p[D]; +if(!(S===(void 0))||D in p){ +var X=D-P+U; +V[X]=S; +if(X>0xfffffffe){ +W=W||new g(); +W.push(X); +} +} +} +} +} +%MoveArrayContents(V,p); +if(!(W===(void 0))){ +var q=W.length; +for(var x=0;xP){ +for(var x=Q-P;x>O;x--){ +var Z=x+P-1; +var aa=x+U-1; +if(Z in p){ +p[aa]=p[Z]; +}else{ +delete p[aa]; +} +} +}else{ +for(var x=O;xQ-P+U;x--){ +delete p[x-1]; +} +} +} +} +function ArrayToString(){ +var p; +var ab; +if((%_IsArray(this))){ +ab=this.join; +if(ab===ArrayJoin){ +return Join(this,this.length,',',false); +} +p=this; +}else{ +p=(%_ToObject(this)); +ab=p.join; +} +if(!(typeof(ab)==='function')){ +return %_Call(l,p); +} +return %_Call(ab,p); +} +function InnerArrayToLocaleString(p,q){ +return Join(p,(%_ToLength(q)),',',true); +} +function ArrayToLocaleString(){ +var p=(%_ToObject(this)); +var ac=p.length; +return InnerArrayToLocaleString(p,ac); +} +function InnerArrayJoin(A,p,q){ +if((A===(void 0))){ +A=','; +}else{ +A=(%_ToString(A)); +} +if(q===1){ +var y=p[0]; +if((y==null))return''; +return(%_ToString(y)); +} +return Join(p,q,A,false); +} +function ArrayJoin(A){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Array.prototype.join"); +var p=(%_ToObject(this)); +var q=(%_ToLength(p.length)); +return InnerArrayJoin(A,p,q); +} +function ArrayPop(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Array.prototype.pop"); +var p=(%_ToObject(this)); +var ad=(%_ToLength(p.length)); +if(ad==0){ +p.length=ad; +return; +} +ad--; +var J=p[ad]; +%DeleteProperty_Strict(p,ad); +p.length=ad; +return J; +} +function ArrayPush(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Array.prototype.push"); +var p=(%_ToObject(this)); +var ad=(%_ToLength(p.length)); +var ae=arguments.length; +if(ae>9007199254740991-ad)throw %make_type_error(227,ae,ad); +for(var x=0;x=x){ +ak=x; +while(w[++ah]==x){} +al=Q-x-1; +} +var am=p[ak]; +if(!(am===(void 0))||ak in p){ +var an=p[al]; +if(!(an===(void 0))||al in p){ +p[ak]=an; +p[al]=am; +}else{ +p[al]=am; +delete p[ak]; +} +}else{ +var an=p[al]; +if(!(an===(void 0))||al in p){ +p[ak]=an; +delete p[al]; +} +} +} +} +function PackedArrayReverse(p,Q){ +var ai=Q-1; +for(var x=0;x0&&UseSparseVariant(p,Q,(%_IsArray(p)),Q)&& +!%object_is_sealed(p)){ +SparseMove(p,0,0,Q,ar); +}else{ +SimpleMove(p,0,0,Q,ar); +} +for(var x=0;xQ)O=Q; +} +if(au<0){ +au+=Q; +if(au<0)au=0; +}else{ +if(au>Q)au=Q; +} +var av=ArraySpeciesCreate(p,i(au-O,0)); +if(auQ?Q:O; +} +function ComputeSpliceDeleteCount(aw,ar,Q,O){ +var P=0; +if(ar==1) +return Q-O; +P=(%_ToInteger(aw)); +if(P<0) +return 0; +if(P>Q-O) +return Q-O; +return P; +} +function ArraySplice(as,aw){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Array.prototype.splice"); +var ar=arguments.length; +var p=(%_ToObject(this)); +var Q=(%_ToLength(p.length)); +var O=ComputeSpliceStartIndex((%_ToInteger(as)),Q); +var P=ComputeSpliceDeleteCount(aw,ar,Q, +O); +var R=ArraySpeciesCreate(p,P); +R.length=P; +var ax=ar>2?ar-2:0; +if(P!=ax&&%object_is_sealed(p)){ +throw %make_type_error(13); +}else if(P>0&&%object_is_frozen(p)){ +throw %make_type_error(12); +} +var ay=P; +if(ax!=P){ +ay+=Q-O-P; +} +if(UseSparseVariant(p,Q,(%_IsArray(p)),ay)){ +%NormalizeElements(p); +if((%_IsArray(R)))%NormalizeElements(R); +SparseSlice(p,O,P,Q,R); +SparseMove(p,O,P,Q,ax); +}else{ +SimpleSlice(p,O,P,Q,R); +SimpleMove(p,O,P,Q,ax); +} +var x=O; +var az=2; +var aA=arguments.length; +while(az=o;ai--){ +var aF=s[ai]; +var aG=aB(aF,aE); +if(aG>0){ +s[ai+1]=aF; +}else{ +break; +} +} +s[ai+1]=aE; +} +}; +function GetThirdIndex(s,o,aD){ +var aH=new g(); +var aI=200+((aD-o)&15); +var ai=0; +o+=1; +aD-=1; +for(var x=o;x>1][0]; +return aJ; +} +function QuickSort(s,o,aD){ +var aJ=0; +while(true){ +if(aD-o<=10){ +InsertionSort(s,o,aD); +return; +} +if(aD-o>1000){ +aJ=GetThirdIndex(s,o,aD); +}else{ +aJ=o+((aD-o)>>1); +} +var aK=s[o]; +var aL=s[aD-1]; +var aM=s[aJ]; +var aN=aB(aK,aL); +if(aN>0){ +var aF=aK; +aK=aL; +aL=aF; +} +var aO=aB(aK,aM); +if(aO>=0){ +var aF=aK; +aK=aM; +aM=aL; +aL=aF; +}else{ +var aP=aB(aL,aM); +if(aP>0){ +var aF=aL; +aL=aM; +aM=aF; +} +} +s[o]=aK; +s[aD-1]=aM; +var aQ=aL; +var aR=o+1; +var aS=aD-1; +s[aJ]=s[aR]; +s[aR]=aQ; +partition:for(var x=aR+1;x0){ +do{ +aS--; +if(aS==x)break partition; +var aT=s[aS]; +aG=aB(aT,aQ); +}while(aG>0); +s[x]=s[aS]; +s[aS]=aE; +if(aG<0){ +aE=s[x]; +s[x]=s[aR]; +s[aR]=aE; +aR++; +} +} +} +if(aD-aS=aV){aV=x+1;} +} +} +}else{ +for(var x=0;x=aV){aV=Y+1;} +} +} +} +} +return aV; +}; +function ShadowPrototypeElements(aU,o,aD){ +for(var aW=%object_get_prototype_of(aU);aW; +aW=%object_get_prototype_of(aW)){ +var u=(%_IsJSProxy(aW))?aD:%GetArrayKeys(aW,aD); +if((typeof(u)==='number')){ +var aX=u; +for(var x=o;x=q)Y=q-1; +} +var bh=0; +var aV=Y; +if(UseSparseVariant(p,q,(%_IsArray(p)),Y)){ +%NormalizeElements(p); +var u=%GetArrayKeys(p,Y+1); +if((typeof(u)==='number')){ +aV=u; +}else{ +if(u.length==0)return-1; +var bi=GetSortedArrayKeys(p,u); +var x=bi.length-1; +while(x>=0){ +var D=bi[x]; +if(p[D]===aE)return D; +x--; +} +return-1; +} +} +if(!(aE===(void 0))){ +for(var x=aV;x>=bh;x--){ +if(p[x]===aE)return x; +} +return-1; +} +for(var x=aV;x>=bh;x--){ +if((p[x]===(void 0))&&x in p){ +return x; +} +} +return-1; +} +function ArrayLastIndexOf(aE,Y){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Array.prototype.lastIndexOf"); +var q=(%_ToLength(this.length)); +return InnerArrayLastIndexOf(this,aE,Y,q, +arguments.length); +} +function InnerArrayReduce(bj,S,p,q,bg){ +if(!(typeof(bj)==='function')){ +throw %make_type_error(14,bj); +} +var x=0; +find_initial:if(bg<2){ +for(;x=0;x--){ +if(x in p){ +S=p[x--]; +break find_initial; +} +} +throw %make_type_error(122); +} +for(;x>=0;x--){ +if(x in p){ +var aE=p[x]; +S=bj(S,aE,x,p); +} +} +return S; +} +function ArrayReduceRight(bj,S){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Array.prototype.reduceRight"); +var p=(%_ToObject(this)); +var q=(%_ToLength(p.length)); +return InnerArrayReduceRight(bj,S,p,q, +arguments.length); +} +function InnerArrayCopyWithin(bk,as,at,p,q){ +bk=(%_ToInteger(bk)); +var aD; +if(bk<0){ +aD=i(q+bk,0); +}else{ +aD=j(bk,q); +} +as=(%_ToInteger(as)); +var o; +if(as<0){ +o=i(q+as,0); +}else{ +o=j(as,q); +} +at=(at===(void 0))?q:(%_ToInteger(at)); +var bl; +if(at<0){ +bl=i(q+at,0); +}else{ +bl=j(at,q); +} +var bm=j(bl-o,q-aD); +var bn=1; +if(o0){ +if(o in p){ +p[aD]=p[o]; +}else{ +delete p[aD]; +} +o=o+bn; +aD=aD+bn; +bm--; +} +return p; +} +function ArrayCopyWithin(bk,as,at){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Array.prototype.copyWithin"); +var p=(%_ToObject(this)); +var q=(%_ToLength(p.length)); +return InnerArrayCopyWithin(bk,as,at,p,q); +} +function InnerArrayFind(bo,bp,p,q){ +if(!(typeof(bo)==='function')){ +throw %make_type_error(14,bo); +} +for(var x=0;xq)x=q; +} +if(at<0){ +at+=q; +if(at<0)at=0; +}else{ +if(at>q)at=q; +} +if((at-x)>0&&%object_is_frozen(p)){ +throw %make_type_error(12); +} +for(;x0)D+=%_SubString(y,0,H); +while(true){ +F='$'; +E=H+1; +if(E=48&&G<=57){ +I=(G-48); +J=1; +if(E+1=48&&H<=57){ +K=I*10+((H-48)); +if(KE){ +D+=%_SubString(y,E,H); +} +} +return D; +} +function StringReplace(M,N){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.replace"); +if(!(M==null)){ +var O=M[i]; +if(!(O===(void 0))){ +return %_Call(O,M,this,N); +} +} +var s=(%_ToString(this)); +M=(%_ToString(M)); +if(M.length==1&& +s.length>0xFF&& +(typeof(N)==='string')&& +%StringIndexOf(N,'$',0)<0){ +return %StringReplaceOneCharWithString(s,M,N); +} +var P=%StringIndexOf(s,M,0); +if(P<0)return s; +var Q=P+M.length; +var D=%_SubString(s,0,P); +if((typeof(N)==='function')){ +D+=N(M,P,s); +}else{ +const x={length:1}; +const u=%_SubString(s,P,Q); +D+=GetSubstitution(u,s,P,x, +(%_ToString(N))); +} +return D+%_SubString(s,Q,s.length); +} +function StringSearch(q){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.search"); +if(!(q==null)){ +var R=q[j]; +if(!(R===(void 0))){ +return %_Call(R,q,this); +} +} +var s=(%_ToString(this)); +var t=%RegExpCreate(q); +return %_Call(t[j],t,s); +} +function StringSlice(P,Q){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.slice"); +var n=(%_ToString(this)); +var S=n.length; +var T=(%_ToInteger(P)); +var U=S; +if(!(Q===(void 0))){ +U=(%_ToInteger(Q)); +} +if(T<0){ +T+=S; +if(T<0){ +T=0; +} +}else{ +if(T>S){ +return''; +} +} +if(U<0){ +U+=S; +if(U<0){ +return''; +} +}else{ +if(U>S){ +U=S; +} +} +if(U<=T){ +return''; +} +return %_SubString(n,T,U); +} +function StringSplitJS(V,W){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.split"); +if(!(V==null)){ +var X=V[k]; +if(!(X===(void 0))){ +return %_Call(X,V,this,W); +} +} +var s=(%_ToString(this)); +W=((W===(void 0)))?4294967295:((W)>>>0); +var Y=s.length; +var Z=(%_ToString(V)); +if(W===0)return[]; +if((V===(void 0)))return[s]; +var aa=Z.length; +if(aa===0)return %StringToArray(s,W); +return %StringSplit(s,Z,W); +} +function StringToLowerCaseJS(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.toLowerCase"); +return %StringToLowerCase((%_ToString(this))); +} +function StringToLocaleLowerCase(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.toLocaleLowerCase"); +return %StringToLowerCase((%_ToString(this))); +} +function StringToUpperCaseJS(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.toUpperCase"); +return %StringToUpperCase((%_ToString(this))); +} +function StringToLocaleUpperCase(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.toLocaleUpperCase"); +return %StringToUpperCase((%_ToString(this))); +} +function HtmlEscape(ab){ +return %RegExpInternalReplace(/"/g,(%_ToString(ab)),"""); +} +function StringAnchor(ac){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.anchor"); +return""+(%_ToString(this))+ +""; +} +function StringBig(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.big"); +return""+(%_ToString(this))+""; +} +function StringBlink(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.blink"); +return""+(%_ToString(this))+""; +} +function StringBold(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.bold"); +return""+(%_ToString(this))+""; +} +function StringFixed(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.fixed"); +return""+(%_ToString(this))+""; +} +function StringFontcolor(ad){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.fontcolor"); +return""+(%_ToString(this))+ +""; +} +function StringFontsize(ae){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.fontsize"); +return""+(%_ToString(this))+ +""; +} +function StringItalics(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.italics"); +return""+(%_ToString(this))+""; +} +function StringLink(n){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.link"); +return""+(%_ToString(this))+""; +} +function StringSmall(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.small"); +return""+(%_ToString(this))+""; +} +function StringStrike(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.strike"); +return""+(%_ToString(this))+""; +} +function StringSub(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.sub"); +return""+(%_ToString(this))+""; +} +function StringSup(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.sup"); +return""+(%_ToString(this))+""; +} +function StringRepeat(af){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.repeat"); +var n=(%_ToString(this)); +var ag=(%_ToInteger(af)); +if(ag<0||ag===(1/0))throw %make_range_error(157); +if(n.length===0)return""; +if(ag>%_MaxSmi())throw %make_range_error(157); +var ah=""; +while(true){ +if(ag&1)ah+=n; +ag>>=1; +if(ag===0)return ah; +n+=n; +} +} +function StringCodePointAt(E){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.codePointAt"); +var v=(%_ToString(this)); +var ae=v.length; +E=(%_ToInteger(E)); +if(E<0||E>=ae){ +return(void 0); +} +var ai=%_StringCharCodeAt(v,E); +if(ai<0xD800||ai>0xDBFF||E+1==ae){ +return ai; +} +var aj=%_StringCharCodeAt(v,E+1); +if(aj<0xDC00||aj>0xDFFF){ +return ai; +} +return(ai-0xD800)*0x400+aj+0x2400; +} +function StringRaw(ak){ +"use strict"; +var al=arguments.length; +var am=(%_ToObject(ak)); +var an=(%_ToObject(am.raw)); +var ao=(%_ToLength(an.length)); +if(ao<=0)return""; +var D=(%_ToString(an[0])); +for(var p=1;p%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 1!==0){ +throw %make_range_error(168, +"start offset","Uint8Array",1); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 1!==0){ +throw %make_range_error(168, +"byte length","Uint8Array",1); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Uint8Array",1); +} +}else{ +ag=ad*1; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,1,ab,af,ag,true); +} +function Uint8ArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*1; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,1,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,1,null,0,ai,true); +} +} +function Uint8ArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*1; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,1,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,1,aj,ah); +} +if(!ak){ +for(var al=0;al%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 1!==0){ +throw %make_range_error(168, +"start offset","Int8Array",1); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 1!==0){ +throw %make_range_error(168, +"byte length","Int8Array",1); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Int8Array",1); +} +}else{ +ag=ad*1; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,2,ab,af,ag,true); +} +function Int8ArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*1; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,2,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,2,null,0,ai,true); +} +} +function Int8ArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*1; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,2,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,2,aj,ah); +} +if(!ak){ +for(var al=0;al%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 2!==0){ +throw %make_range_error(168, +"start offset","Uint16Array",2); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 2!==0){ +throw %make_range_error(168, +"byte length","Uint16Array",2); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Uint16Array",2); +} +}else{ +ag=ad*2; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,3,ab,af,ag,true); +} +function Uint16ArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*2; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,3,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,3,null,0,ai,true); +} +} +function Uint16ArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*2; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,3,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,3,aj,ah); +} +if(!ak){ +for(var al=0;al%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 2!==0){ +throw %make_range_error(168, +"start offset","Int16Array",2); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 2!==0){ +throw %make_range_error(168, +"byte length","Int16Array",2); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Int16Array",2); +} +}else{ +ag=ad*2; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,4,ab,af,ag,true); +} +function Int16ArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*2; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,4,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,4,null,0,ai,true); +} +} +function Int16ArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*2; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,4,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,4,aj,ah); +} +if(!ak){ +for(var al=0;al%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 4!==0){ +throw %make_range_error(168, +"start offset","Uint32Array",4); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 4!==0){ +throw %make_range_error(168, +"byte length","Uint32Array",4); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Uint32Array",4); +} +}else{ +ag=ad*4; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,5,ab,af,ag,true); +} +function Uint32ArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*4; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,5,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,5,null,0,ai,true); +} +} +function Uint32ArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*4; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,5,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,5,aj,ah); +} +if(!ak){ +for(var al=0;al%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 4!==0){ +throw %make_range_error(168, +"start offset","Int32Array",4); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 4!==0){ +throw %make_range_error(168, +"byte length","Int32Array",4); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Int32Array",4); +} +}else{ +ag=ad*4; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,6,ab,af,ag,true); +} +function Int32ArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*4; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,6,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,6,null,0,ai,true); +} +} +function Int32ArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*4; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,6,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,6,aj,ah); +} +if(!ak){ +for(var al=0;al%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 4!==0){ +throw %make_range_error(168, +"start offset","Float32Array",4); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 4!==0){ +throw %make_range_error(168, +"byte length","Float32Array",4); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Float32Array",4); +} +}else{ +ag=ad*4; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,7,ab,af,ag,true); +} +function Float32ArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*4; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,7,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,7,null,0,ai,true); +} +} +function Float32ArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*4; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,7,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,7,aj,ah); +} +if(!ak){ +for(var al=0;al%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 8!==0){ +throw %make_range_error(168, +"start offset","Float64Array",8); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 8!==0){ +throw %make_range_error(168, +"byte length","Float64Array",8); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Float64Array",8); +} +}else{ +ag=ad*8; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,8,ab,af,ag,true); +} +function Float64ArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*8; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,8,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,8,null,0,ai,true); +} +} +function Float64ArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*8; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,8,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,8,aj,ah); +} +if(!ak){ +for(var al=0;al%_MaxSmi()){ +throw %make_range_error(170); +} +var ae=%_ArrayBufferGetByteLength(ab); +var af; +if((ac===(void 0))){ +af=0; +}else{ +af=ac; +if(af % 1!==0){ +throw %make_range_error(168, +"start offset","Uint8ClampedArray",1); +} +} +var ag; +if((ad===(void 0))){ +if(ae % 1!==0){ +throw %make_range_error(168, +"byte length","Uint8ClampedArray",1); +} +ag=ae-af; +if(ag<0){ +throw %make_range_error(168, +"byte length","Uint8ClampedArray",1); +} +}else{ +ag=ad*1; +if(af+ag>ae){ +throw %make_range_error(170); +} +} +%_TypedArrayInitialize(aa,9,ab,af,ag,true); +} +function Uint8ClampedArrayConstructByLength(aa,ad){ +var ah=(ad===(void 0))? +0:D(ad,170); +if(ad>%_MaxSmi()){ +throw %make_range_error(170); +} +var ai=ah*1; +if(ai>%_TypedArrayMaxSizeInHeap()){ +var ab=new h(ai); +%_TypedArrayInitialize(aa,9,ab,0,ai,true); +}else{ +%_TypedArrayInitialize(aa,9,null,0,ai,true); +} +} +function Uint8ClampedArrayConstructByArrayLike(aa,aj,ad){ +var ah=C(ad,170); +if(ah>%_MaxSmi()){ +throw %make_range_error(170); +} +var ak=false; +var ai=ah*1; +if(ai<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(aa,9,null,0,ai,false); +}else{ +ak= +%TypedArrayInitializeFromArrayLike(aa,9,aj,ah); +} +if(!ak){ +for(var al=0;al0){ +for(var al=0;al=aK&&aI>=aJ; +aL--){ +aD[af+aL]=aE[aL]; +aI-=aH; +aJ-=aG; +} +return aL; +} +var aL=CopyRightPart(); +var aM=new g(aL+1-aK); +for(var al=aK;al<=aL;al++){ +aM[al-aK]=aE[al]; +} +for(al=aK;al<=aL;al++){ +aD[af+al]=aM[al-aK]; +} +} +function TypedArraySet(aa,af){ +var aN=(af===(void 0))?0:(%_ToInteger(af)); +if(aN<0)throw %make_type_error(181); +if(aN>%_MaxSmi()){ +throw %make_range_error(182); +} +switch(%TypedArraySetFastCases(this,aa,aN)){ +case 0: +return; +case 1: +TypedArraySetFromOverlappingTypedArray(this,aa,aN); +return; +case 2: +TypedArraySetFromArrayLike(this, +aa,%_TypedArrayGetLength(aa),aN); +return; +case 3: +var ah=aa.length; +if((ah===(void 0))){ +if((typeof(aa)==='number')){ +throw %make_type_error(46); +} +return; +} +ah=(%_ToLength(ah)); +if(aN+ah>%_TypedArrayGetLength(this)){ +throw %make_range_error(182); +} +TypedArraySetFromArrayLike(this,aa,ah,aN); +return; +} +} +%FunctionSetLength(TypedArraySet,1); +function TypedArrayGetToStringTag(){ +if(!(%_IsTypedArray(this)))return; +var aO=%_ClassOf(this); +if((aO===(void 0)))return; +return aO; +} +function TypedArrayCopyWithin(aD,aP,ax){ +if(!(%_IsTypedArray(this)))throw %make_type_error(72); +var ad=%_TypedArrayGetLength(this); +return k(aD,aP,ax,this,ad); +} +%FunctionSetLength(TypedArrayCopyWithin,2); +function TypedArrayEvery(aQ,aR){ +if(!(%_IsTypedArray(this)))throw %make_type_error(72); +var ad=%_TypedArrayGetLength(this); +return l(aQ,aR,this,ad); +} +%FunctionSetLength(TypedArrayEvery,1); +function TypedArrayForEach(aQ,aR){ +if(!(%_IsTypedArray(this)))throw %make_type_error(72); +var ad=%_TypedArrayGetLength(this); +q(aQ,aR,this,ad); +} +%FunctionSetLength(TypedArrayForEach,1); +function TypedArrayFill(ar,aP,ax){ +if(!(%_IsTypedArray(this)))throw %make_type_error(72); +var ad=%_TypedArrayGetLength(this); +return m(ar,aP,ax,this,ad); +} +%FunctionSetLength(TypedArrayFill,1); +function TypedArrayFilter(aQ,aS){ +if(!(%_IsTypedArray(this)))throw %make_type_error(72); +var ad=%_TypedArrayGetLength(this); +if(!(typeof(aQ)==='function'))throw %make_type_error(14,aQ); +var aT=new x(); +n(aQ,aS,this,ad,aT); +var aU=aT.length; +var aV=TypedArraySpeciesCreate(this,aU); +for(var al=0;alaY){ +return 1; +}else if((!%_IsSmi(%IS_VAR(aX))&&!(aX==aX))&&(!%_IsSmi(%IS_VAR(aY))&&!(aY==aY))){ +return(!%_IsSmi(%IS_VAR(aY))&&!(aY==aY))?0:1; +}else if((!%_IsSmi(%IS_VAR(aX))&&!(aX==aX))){ +return 1; +} +return 0; +} +function TypedArraySort(aZ){ +if(!(%_IsTypedArray(this)))throw %make_type_error(72); +var ad=%_TypedArrayGetLength(this); +if((aZ===(void 0))){ +aZ=TypedArrayComparefn; +} +return v(this,ad,aZ); +} +function TypedArrayIndexOf(ba,bb){ +if(!(%_IsTypedArray(this)))throw %make_type_error(72); +var ad=%_TypedArrayGetLength(this); +if(ad===0)return-1; +if(!(typeof(ba)==='number'))return-1; +var bc=(%_ToInteger(bb)); +var bd; +if(bc===0){ +bd=0; +}else if(bc>0){ +bd=bc; +}else{ +bd=ad+bc; +if(bd<0){ +bd=0; +} +} +while(bd=0){ +if(ad<=bc){ +bd=ad-1; +}else if(bc===0){ +bd=0; +}else{ +bd=bc; +} +}else{ +bd=ad+bc; +} +while(bd>=0){ +var be=this[bd]; +if(ba===be){ +return bd; +} +--bd; +} +return-1; +} +%FunctionSetLength(TypedArrayLastIndexOf,1); +function TypedArrayMap(aQ,aS){ +if(!(%_IsTypedArray(this)))throw %make_type_error(72); +var ad=%_TypedArrayGetLength(this); +var aT=TypedArraySpeciesCreate(this,ad); +if(!(typeof(aQ)==='function'))throw %make_type_error(14,aQ); +for(var al=0;al=0){ +bd=bc; +}else{ +bd=ad+bc; +if(bd<0){ +bd=0; +} +} +while(bd>>12); +m=m+(m<<2); +m=m^(m>>>4); +m=(m*2057)|0; +m=m^(m>>>16); +return m&0x3fffffff; +} +%SetForceInlineFlag(ComputeIntegerHash); +function GetExistingHash(p){ +if(%_IsSmi(p)){ +return ComputeIntegerHash(p,0); +} +if((typeof(p)==='string')){ +var u=%_StringGetRawHashField(p); +if((u&1)===0){ +return u>>>2; +} +}else if((%_IsJSReceiver(p))&&!(%_IsJSProxy(p))&&!(%_ClassOf(p)==='global')){ +var m=(p[f]); +return m; +} +return %GenericHash(p); +} +%SetForceInlineFlag(GetExistingHash); +function GetHash(p){ +var m=GetExistingHash(p); +if((m===(void 0))){ +m=(g()*0x40000000)|0; +if(m===0)m=1; +(p[f]=m); +} +return m; +} +%SetForceInlineFlag(GetHash); +function SetConstructor(v){ +if((new.target===(void 0))){ +throw %make_type_error(26,"Set"); +} +%_SetInitialize(this); +if(!(v==null)){ +var w=this.add; +if(!(typeof(w)==='function')){ +throw %make_type_error(87,w,'add',this); +} +for(var x of v){ +%_Call(w,this,x); +} +} +} +function SetAdd(p){ +if(!(%_ClassOf(this)==='Set')){ +throw %make_type_error(44,'Set.prototype.add',this); +} +if(p===0){ +p=0; +} +var l=%_JSCollectionGetTable(this); +var n=((%_FixedArrayGet(l,(0)|0))); +var m=GetHash(p); +if(SetFindEntry(l,n,p,m)!==-1)return this; +var y=((%_FixedArrayGet(l,(1)|0))); +var z=((%_FixedArrayGet(l,(2)|0))); +var A=n<<1; +if((y+z)>=A){ +%SetGrow(this); +l=%_JSCollectionGetTable(this); +n=((%_FixedArrayGet(l,(0)|0))); +y=((%_FixedArrayGet(l,(1)|0))); +z=((%_FixedArrayGet(l,(2)|0))); +} +var q=y+z; +var B=(3+(n)+((q)<<1)); +var o=(m&((n)-1)); +var C=((%_FixedArrayGet(l,(3+(o))|0))); +((%_FixedArraySet(l,(3+(o))|0,q))); +(((%_FixedArraySet(l,(1)|0,(y+1)|0)))); +(%_FixedArraySet(l,(B)|0,p)); +((%_FixedArraySet(l,(B+1)|0,(C)|0))); +return this; +} +function SetHas(p){ +if(!(%_ClassOf(this)==='Set')){ +throw %make_type_error(44,'Set.prototype.has',this); +} +var l=%_JSCollectionGetTable(this); +var n=((%_FixedArrayGet(l,(0)|0))); +var m=GetExistingHash(p); +if((m===(void 0)))return false; +return SetFindEntry(l,n,p,m)!==-1; +} +function SetDelete(p){ +if(!(%_ClassOf(this)==='Set')){ +throw %make_type_error(44, +'Set.prototype.delete',this); +} +var l=%_JSCollectionGetTable(this); +var n=((%_FixedArrayGet(l,(0)|0))); +var m=GetExistingHash(p); +if((m===(void 0)))return false; +var q=SetFindEntry(l,n,p,m); +if(q===-1)return false; +var y=((%_FixedArrayGet(l,(1)|0)))-1; +var z=((%_FixedArrayGet(l,(2)|0)))+1; +var B=(3+(n)+((q)<<1)); +(%_FixedArraySet(l,(B)|0,%_TheHole())); +(((%_FixedArraySet(l,(1)|0,(y)|0)))); +(((%_FixedArraySet(l,(2)|0,(z)|0)))); +if(y<(n>>>1))%SetShrink(this); +return true; +} +function SetGetSize(){ +if(!(%_ClassOf(this)==='Set')){ +throw %make_type_error(44, +'Set.prototype.size',this); +} +var l=%_JSCollectionGetTable(this); +return((%_FixedArrayGet(l,(1)|0))); +} +function SetClearJS(){ +if(!(%_ClassOf(this)==='Set')){ +throw %make_type_error(44, +'Set.prototype.clear',this); +} +%_SetClear(this); +} +function SetForEach(D,E){ +if(!(%_ClassOf(this)==='Set')){ +throw %make_type_error(44, +'Set.prototype.forEach',this); +} +if(!(typeof(D)==='function'))throw %make_type_error(14,D); +var F=new i(this,2); +var p; +var G=[(void 0)]; +while(%SetIteratorNext(F,G)){ +p=G[0]; +%_Call(D,E,p,p,this); +} +} +%SetCode(e,SetConstructor); +%FunctionSetLength(e,0); +%FunctionSetPrototype(e,new d()); +%AddNamedProperty(e.prototype,"constructor",e,2); +%AddNamedProperty(e.prototype,j,"Set", +2|1); +%FunctionSetLength(SetForEach,1); +b.InstallGetter(e.prototype,"size",SetGetSize); +b.InstallFunctions(e.prototype,2,[ +"add",SetAdd, +"has",SetHas, +"delete",SetDelete, +"clear",SetClearJS, +"forEach",SetForEach +]); +function MapConstructor(v){ +if((new.target===(void 0))){ +throw %make_type_error(26,"Map"); +} +%_MapInitialize(this); +if(!(v==null)){ +var w=this.set; +if(!(typeof(w)==='function')){ +throw %make_type_error(87,w,'set',this); +} +for(var H of v){ +if(!(%_IsJSReceiver(H))){ +throw %make_type_error(51,H); +} +%_Call(w,this,H[0],H[1]); +} +} +} +function MapGet(p){ +if(!(%_ClassOf(this)==='Map')){ +throw %make_type_error(44, +'Map.prototype.get',this); +} +var l=%_JSCollectionGetTable(this); +var n=((%_FixedArrayGet(l,(0)|0))); +var m=GetExistingHash(p); +if((m===(void 0)))return(void 0); +var q=MapFindEntry(l,n,p,m); +if(q===-1)return(void 0); +return((%_FixedArrayGet(l,((3+(n)+((q)*3))+1)|0))); +} +function MapSet(p,x){ +if(!(%_ClassOf(this)==='Map')){ +throw %make_type_error(44, +'Map.prototype.set',this); +} +if(p===0){ +p=0; +} +var l=%_JSCollectionGetTable(this); +var n=((%_FixedArrayGet(l,(0)|0))); +var m=GetHash(p); +var q=MapFindEntry(l,n,p,m); +if(q!==-1){ +var I=(3+(n)+((q)*3)); +(%_FixedArraySet(l,(I+1)|0,x)); +return this; +} +var y=((%_FixedArrayGet(l,(1)|0))); +var z=((%_FixedArrayGet(l,(2)|0))); +var A=n<<1; +if((y+z)>=A){ +%MapGrow(this); +l=%_JSCollectionGetTable(this); +n=((%_FixedArrayGet(l,(0)|0))); +y=((%_FixedArrayGet(l,(1)|0))); +z=((%_FixedArrayGet(l,(2)|0))); +} +q=y+z; +var B=(3+(n)+((q)*3)); +var o=(m&((n)-1)); +var C=((%_FixedArrayGet(l,(3+(o))|0))); +((%_FixedArraySet(l,(3+(o))|0,q))); +(((%_FixedArraySet(l,(1)|0,(y+1)|0)))); +(%_FixedArraySet(l,(B)|0,p)); +(%_FixedArraySet(l,(B+1)|0,x)); +(%_FixedArraySet(l,(B+2)|0,C)); +return this; +} +function MapHas(p){ +if(!(%_ClassOf(this)==='Map')){ +throw %make_type_error(44, +'Map.prototype.has',this); +} +var l=%_JSCollectionGetTable(this); +var n=((%_FixedArrayGet(l,(0)|0))); +var m=GetHash(p); +return MapFindEntry(l,n,p,m)!==-1; +} +function MapDelete(p){ +if(!(%_ClassOf(this)==='Map')){ +throw %make_type_error(44, +'Map.prototype.delete',this); +} +var l=%_JSCollectionGetTable(this); +var n=((%_FixedArrayGet(l,(0)|0))); +var m=GetHash(p); +var q=MapFindEntry(l,n,p,m); +if(q===-1)return false; +var y=((%_FixedArrayGet(l,(1)|0)))-1; +var z=((%_FixedArrayGet(l,(2)|0)))+1; +var B=(3+(n)+((q)*3)); +(%_FixedArraySet(l,(B)|0,%_TheHole())); +(%_FixedArraySet(l,(B+1)|0,%_TheHole())); +(((%_FixedArraySet(l,(1)|0,(y)|0)))); +(((%_FixedArraySet(l,(2)|0,(z)|0)))); +if(y<(n>>>1))%MapShrink(this); +return true; +} +function MapGetSize(){ +if(!(%_ClassOf(this)==='Map')){ +throw %make_type_error(44, +'Map.prototype.size',this); +} +var l=%_JSCollectionGetTable(this); +return((%_FixedArrayGet(l,(1)|0))); +} +function MapClearJS(){ +if(!(%_ClassOf(this)==='Map')){ +throw %make_type_error(44, +'Map.prototype.clear',this); +} +%_MapClear(this); +} +function MapForEach(D,E){ +if(!(%_ClassOf(this)==='Map')){ +throw %make_type_error(44, +'Map.prototype.forEach',this); +} +if(!(typeof(D)==='function'))throw %make_type_error(14,D); +var F=new h(this,3); +var G=[(void 0),(void 0)]; +while(%MapIteratorNext(F,G)){ +%_Call(D,E,G[1],G[0],this); +} +} +%SetCode(c,MapConstructor); +%FunctionSetLength(c,0); +%FunctionSetPrototype(c,new d()); +%AddNamedProperty(c.prototype,"constructor",c,2); +%AddNamedProperty( +c.prototype,j,"Map",2|1); +%FunctionSetLength(MapForEach,1); +b.InstallGetter(c.prototype,"size",MapGetSize); +b.InstallFunctions(c.prototype,2,[ +"get",MapGet, +"set",MapSet, +"has",MapHas, +"delete",MapDelete, +"clear",MapClearJS, +"forEach",MapForEach +]); +%InstallToContext([ +"map_get",MapGet, +"map_set",MapSet, +"map_has",MapHas, +"map_delete",MapDelete, +"set_add",SetAdd, +"set_has",SetHas, +"set_delete",SetDelete, +]); +b.Export(function(J){ +J.GetExistingHash=GetExistingHash; +J.GetHash=GetHash; +}); +}) + +{ +if(r===true)return; +r=true; +p[o]=h; +if(--m===0){ +var s=[]; +%MoveArrayContents(p,s); +%_Call(q.resolve,(void 0),s); +} +}; +} +try{ +var t=0; +m=1; +for(var u of j){ +var v=this.resolve(u); +++m; +var w=v.then( +CreateResolveElementFunction(t,l,k), +k.reject); +if(n&&%is_promise(w)){ +(w[e]=k.promise); +} +++t; +} +if(--m===0){ +var s=[]; +%MoveArrayContents(l,s); +%_Call(k.resolve,(void 0),s); +} +}catch(e){ +%_Call(k.reject,(void 0),e); +} +return k.promise; +} +function PromiseRace(j){ +if(!(%_IsJSReceiver(this))){ +throw %make_type_error(15,PromiseRace); +} +var k=%new_promise_capability(this,false); +var n=(%_DebugIsActive()!=0); +if(n){ +(k.reject[f]=true); +} +try{ +for(var u of j){ +var w=this.resolve(u).then(k.resolve, +k.reject); +if(n&&%is_promise(w)){ +(w[e]=k.promise); +} +} +}catch(e){ +%_Call(k.reject,(void 0),e); +} +return k.promise; +} +b.InstallFunctions(g,2,[ +"all",PromiseAll, +"race",PromiseRace, +]); +%InstallToContext([ +"promise_id_resolve_handler",PromiseIdResolveHandler, +"promise_id_reject_handler",PromiseIdRejectHandler +]); +}) + + messagesÍ +(function(a,b){ +%CheckIsBootstrapping(); +var c=b.ImportNow("Script"); +%FunctionSetInstanceClassName(c,'Script'); +%AddNamedProperty(c.prototype,'constructor',c, +2|4|1); +function ScriptLocationFromPosition(position, +include_resource_offset){ +return %ScriptPositionInfo(this,position,!!include_resource_offset); +} +function ScriptNameOrSourceURL(){ +if(this.source_url)return this.source_url; +return this.name; +} +b.SetUpLockedPrototype(c,[ +"source", +"name", +"source_url", +"source_mapping_url", +"line_offset", +"column_offset" +],[ +"locationFromPosition",ScriptLocationFromPosition, +"nameOrSourceURL",ScriptNameOrSourceURL, +] +); +}); + +$templates +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.Map; +var d=b.InternalArray; +var e=new c; +var f=c.prototype.get; +var g=c.prototype.set; +function SameCallSiteElements(h,i){ +var j=h.length; +var i=i.raw; +if(j!==i.length)return false; +for(var k=0;k%JSProxyRevoke(f)}; +} +b.InstallFunctions(c,2,[ +"revocable",ProxyCreateRevocable +]); +}) + +,async-await¡ +(function(a,b,c){ +"use strict"; +%CheckIsBootstrapping(); +var d; +var e; +b.Import(function(f){ +d=f.AsyncFunctionNext; +e=f.AsyncFunctionThrow; +}); +var g= +b.ImportNow("promise_handled_by_symbol"); +var h= +b.ImportNow("promise_forwarding_handler_symbol"); +function PromiseCastResolved(i){ +if(%is_promise(i)){ +return i; +}else{ +var j=%promise_internal_constructor((void 0)); +%promise_resolve(j,i); +return j; +} +} +function AsyncFunctionAwait(k,l,m){ +var j=PromiseCastResolved(l); +var n=sentValue=>{ +%_Call(d,k,sentValue); +return; +}; +var o=sentError=>{ +%_Call(e,k,sentError); +return; +} +var p=%promise_internal_constructor(j); +%PromiseMarkAsHandled(p); +if((%_DebugIsActive()!=0)){ +if(%is_promise(l)){ +(o[h]=true); +} +(p[g]=m); +} +%perform_promise_then(j,n,o,p); +} +function AsyncFunctionAwaitUncaught(k,l,m){ +AsyncFunctionAwait(k,l,m); +} +function AsyncFunctionAwaitCaught(k,l,m){ +if((%_DebugIsActive()!=0)&&%is_promise(l)){ +%PromiseMarkHandledHint(l); +} +AsyncFunctionAwait(k,l,m); +} +function RejectPromiseNoDebugEvent(j,q){ +return %promise_internal_reject(j,q,false); +} +function AsyncFunctionPromiseCreate(){ +var j=%promise_internal_constructor((void 0)); +if((%_DebugIsActive()!=0)){ +%DebugAsyncFunctionPromiseCreated(j); +} +return j; +} +function AsyncFunctionPromiseRelease(j){ +if((%_DebugIsActive()!=0)){ +%DebugPopPromise(); +} +} +%InstallToContext([ +"async_function_await_caught",AsyncFunctionAwaitCaught, +"async_function_await_uncaught",AsyncFunctionAwaitUncaught, +"reject_promise_no_debug_event",RejectPromiseNoDebugEvent, +"async_function_promise_create",AsyncFunctionPromiseCreate, +"async_function_promise_release",AsyncFunctionPromiseRelease, +]); +}) + +Xharmony-string-paddingY +(function(a,b){ +%CheckIsBootstrapping(); +var c=a.String; +function StringPad(d,e,f){ +e=(%_ToLength(e)); +var g=d.length; +if(e<=g)return""; +if((f===(void 0))){ +f=" "; +}else{ +f=(%_ToString(f)); +if(f===""){ +return""; +} +} +var h=e-g; +var i=(h/f.length)|0; +var j=(h-f.length*i)|0; +var k=""; +while(true){ +if(i&1)k+=f; +i>>=1; +if(i===0)break; +f+=f; +} +if(j){ +k+=%_SubString(f,0,j); +} +return k; +} +function StringPadStart(e,f){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.padStart") +var d=(%_ToString(this)); +return StringPad(d,e,f)+d; +} +%FunctionSetLength(StringPadStart,1); +function StringPadEnd(e,f){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.padEnd") +var d=(%_ToString(this)); +return d+StringPad(d,e,f); +} +%FunctionSetLength(StringPadEnd,1); +b.InstallFunctions(c.prototype,2,[ +"padStart",StringPadStart, +"padEnd",StringPadEnd +]); +}); + +i18nêï +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c; +var d; +var e=a.Date; +var f=a.Intl; +var g=f.DateTimeFormat; +var h=f.NumberFormat; +var i=f.Collator; +var j=f.v8BreakIterator; +var k=a.Number; +var l=a.RegExp; +var m=a.String; +var n=b.ImportNow("intl_fallback_symbol"); +var o=b.InstallFunctions; +var p=b.InstallGetter; +var q=b.InternalArray; +var r=b.ImportNow("ObjectHasOwnProperty"); +var s=b.OverrideFunction; +var t=b.ImportNow("intl_pattern_symbol"); +var u=b.ImportNow("intl_resolved_symbol"); +var v=b.SetFunctionName; +var w=m.prototype.substr; +var x=m.prototype.substring; +b.Import(function(y){ +c=y.ArrayJoin; +d=y.ArrayPush; +}); +function InstallFunction(z,A,B){ +o(z,2,[A,B]); +} +function AddBoundMethod(obj,methodName,implementation,length,typename, +compat){ +%CheckIsBootstrapping(); +var C=%CreatePrivateSymbol(methodName); +var D=(0,(function(){ +var E=Unwrap(this,typename,obj,methodName,compat); +if((E[C]===(void 0))){ +var F; +if((length===(void 0))||length===2){ +F= +(0,((fst,snd)=>implementation(E,fst,snd))); +}else if(length===1){ +F=(0,(fst=>implementation(E,fst))); +}else{ +F=(0,((...args)=>{ +if(args.length>0){ +return implementation(E,args[0]); +}else{ +return implementation(E); +} +})); +} +%SetNativeFlag(F); +E[C]=F; +} +return E[C]; +})); +%FunctionRemovePrototype(D); +%DefineGetterPropertyUnchecked(obj.prototype,methodName,D,2); +%SetNativeFlag(D); +} +function IntlConstruct(E,constructor,create,newTarget,args, +compat){ +var G=args[0]; +var H=args[1]; +if((newTarget===(void 0))){ +if(compat&&E instanceof constructor){ +let success=%object_define_property(E,n, +{value:new constructor(G,H)}); +if(!success){ +throw %make_type_error(126,constructor); +} +return E; +} +return new constructor(G,H); +} +return create(G,H); +} +function Unwrap(E,I,J,K,L){ +if(!%IsInitializedIntlObjectOfType(E,I)){ +if(L&&E instanceof J){ +let fallback=E[n]; +if(%IsInitializedIntlObjectOfType(fallback,I)){ +return fallback; +} +} +throw %make_type_error(44,K,E); +} +return E; +} +var M={ +'collator':(void 0), +'numberformat':(void 0), +'dateformat':(void 0), +'breakiterator':(void 0) +}; +var N=(void 0); +function GetDefaultICULocaleJS(){ +if((N===(void 0))){ +N=%GetDefaultICULocale(); +} +return N; +} +var O=(void 0); +function GetUnicodeExtensionRE(){ +if(((void 0)===(void 0))){ +O=new l('-u(-[a-z0-9]{2,8})+','g'); +} +return O; +} +var P=(void 0); +function GetAnyExtensionRE(){ +if((P===(void 0))){ +P=new l('-[a-z0-9]{1}-.*','g'); +} +return P; +} +var Q=(void 0); +function GetQuotedStringRE(){ +if((Q===(void 0))){ +Q=new l("'[^']+'",'g'); +} +return Q; +} +var R=(void 0); +function GetServiceRE(){ +if((R===(void 0))){ +R= +new l('^(collator|numberformat|dateformat|breakiterator)$'); +} +return R; +} +var S=(void 0); +function GetLanguageTagRE(){ +if((S===(void 0))){ +BuildLanguageTagREs(); +} +return S; +} +var T=(void 0); +function GetLanguageVariantRE(){ +if((T===(void 0))){ +BuildLanguageTagREs(); +} +return T; +} +var U=(void 0); +function GetLanguageSingletonRE(){ +if((U===(void 0))){ +BuildLanguageTagREs(); +} +return U; +} +var V=(void 0); +function GetTimezoneNameCheckRE(){ +if((V===(void 0))){ +V=new l( +'^([A-Za-z]+)/([A-Za-z_-]+)((?:\/[A-Za-z_-]+)+)*$'); +} +return V; +} +var W=(void 0); +function GetTimezoneNameLocationPartRE(){ +if((W===(void 0))){ +W= +new l('^([A-Za-z]+)((?:[_-][A-Za-z]+)+)*$'); +} +return W; +} +function supportedLocalesOf(X,G,H){ +if((%regexp_internal_match(GetServiceRE(),X)===null)){ +throw %make_error(7,X); +} +if((H===(void 0))){ +H={}; +}else{ +H=(%_ToObject(H)); +} +var Y=H.localeMatcher; +if(!(Y===(void 0))){ +Y=(%_ToString(Y)); +if(Y!=='lookup'&&Y!=='best fit'){ +throw %make_range_error(174,Y); +} +}else{ +Y='best fit'; +} +var Z=initializeLocaleList(G); +if((M[X]===(void 0))){ +M[X]=getAvailableLocalesOf(X); +} +if(Y==='best fit'){ +return initializeLocaleList(bestFitSupportedLocalesOf( +Z,M[X])); +} +return initializeLocaleList(lookupSupportedLocalesOf( +Z,M[X])); +} +function lookupSupportedLocalesOf(Z,aa){ +var ab=new q(); +for(var ac=0;ac=3&&as<=8&&!(ar===(void 0))){ +if((al===(void 0))){ +al=at; +}else{ +al=al+"-"+at; +} +}else{ +return{}; +} +} +if(!(ar===(void 0))&&!(ar in aq)){ +aq[ar]=al; +} +return aq; +} +function setOptions(au,aq,av,ag,aw){ +var ao=''; +var ax=function updateExtension(ar,al){ +return'-'+ar+'-'+(%_ToString(al)); +} +var ay=function updateProperty(ah,ai,al){ +if(ai==='boolean'&&(typeof al==='string')){ +al=(al==='true')?true:false; +} +if(!(ah===(void 0))){ +defineWEProperty(aw,ah,al); +} +} +for(var ar in av){ +if((%_Call(r,av,ar))){ +var al=(void 0); +var az=av[ar]; +if(!(az.property===(void 0))){ +al=ag(az.property,az.type,az.values); +} +if(!(al===(void 0))){ +ay(az.property,az.type,al); +ao+=ax(ar,al); +continue; +} +if((%_Call(r,aq,ar))){ +al=aq[ar]; +if(!(al===(void 0))){ +ay(az.property,az.type,al); +ao+=ax(ar,al); +}else if(az.type==='boolean'){ +ay(az.property,az.type,true); +ao+=ax(ar,true); +} +} +} +} +return ao===''?'':'-u'+ao; +} +function freezeArray(aA){ +var aB=[]; +var aC=aA.length; +for(var ac=0;acbz){ +throw %make_range_error(177,ah); +} +return %math_floor(al); +} +return bA; +} +var bB={ +get(){ +%IncrementUseCounter(15); +return this[t]; +}, +set(al){ +this[t]=al; +} +}; +function CreateNumberFormat(G,H){ +if((H===(void 0))){ +H={}; +} +var ag=getGetOption(H,'numberformat'); +var ad=resolveLocale('numberformat',G,H); +var bn={}; +defineWEProperty(bn,'style',ag( +'style','string',['decimal','percent','currency'],'decimal')); +var bx=ag('currency','string'); +if(!(bx===(void 0))&&!isWellFormedCurrencyCode(bx)){ +throw %make_range_error(158,bx); +} +if(bn.style==='currency'&&(bx===(void 0))){ +throw %make_type_error(28); +} +var bC=ag( +'currencyDisplay','string',['code','symbol','name'],'symbol'); +if(bn.style==='currency'){ +defineWEProperty(bn,'currency',%StringToUpperCase(bx)); +defineWEProperty(bn,'currencyDisplay',bC); +} +var bD=getNumberOption(H,'minimumIntegerDigits',1,21,1); +defineWEProperty(bn,'minimumIntegerDigits',bD); +var bE=H['minimumFractionDigits']; +var bF=H['maximumFractionDigits']; +if(!(bE===(void 0))||bn.style!=='currency'){ +bE=getNumberOption(H,'minimumFractionDigits',0,20,0); +defineWEProperty(bn,'minimumFractionDigits',bE); +} +if(!(bF===(void 0))||bn.style!=='currency'){ +var bG=bn.style==='percent'?0:3; +bE=(bE===(void 0))?0:bE; +var bH=(bE>bG)?bE:bG; +bF=getNumberOption(H,'maximumFractionDigits',bE,20,bH); +defineWEProperty(bn,'maximumFractionDigits',bF); +} +var bI=H['minimumSignificantDigits']; +var bJ=H['maximumSignificantDigits']; +if(!(bI===(void 0))||!(bJ===(void 0))){ +bI=getNumberOption(H,'minimumSignificantDigits',1,21,0); +defineWEProperty(bn,'minimumSignificantDigits',bI); +bJ=getNumberOption(H,'maximumSignificantDigits',bI,21,21); +defineWEProperty(bn,'maximumSignificantDigits',bJ); +} +defineWEProperty(bn,'useGrouping',ag( +'useGrouping','boolean',(void 0),true)); +var aq=parseExtension(ad.extension); +var bK={ +'nu':{'property':(void 0),'type':'string'} +}; +var ao=setOptions(H,aq,bK, +ag,bn); +var bs=ad.locale+ao; +var am=%object_define_properties({},{ +currency:{writable:true}, +currencyDisplay:{writable:true}, +locale:{writable:true}, +maximumFractionDigits:{writable:true}, +minimumFractionDigits:{writable:true}, +minimumIntegerDigits:{writable:true}, +numberingSystem:{writable:true}, +requestedLocale:{value:bs,writable:true}, +style:{value:bn.style,writable:true}, +useGrouping:{writable:true} +}); +if((%_Call(r,bn,'minimumSignificantDigits'))){ +defineWEProperty(am,'minimumSignificantDigits',(void 0)); +} +if((%_Call(r,bn,'maximumSignificantDigits'))){ +defineWEProperty(am,'maximumSignificantDigits',(void 0)); +} +var bL=%CreateNumberFormat(bs,bn, +am); +if(bn.style==='currency'){ +%object_define_property(am,'currencyDisplay', +{value:bC,writable:true}); +} +%MarkAsInitializedIntlObjectOfType(bL,'numberformat'); +bL[u]=am; +return bL; +} +function NumberFormatConstructor(){ +return IntlConstruct(this,h,CreateNumberFormat, +new.target,arguments,true); +} +%SetCode(h,NumberFormatConstructor); +InstallFunction(h.prototype,'resolvedOptions', +function(){ +var bM=Unwrap(this,'numberformat',h, +'resolvedOptions',true); +var ad=getOptimalLanguageTag(bM[u].requestedLocale, +bM[u].locale); +var aK={ +locale:ad, +numberingSystem:bM[u].numberingSystem, +style:bM[u].style, +useGrouping:bM[u].useGrouping, +minimumIntegerDigits:bM[u].minimumIntegerDigits, +minimumFractionDigits:bM[u].minimumFractionDigits, +maximumFractionDigits:bM[u].maximumFractionDigits, +}; +if(aK.style==='currency'){ +defineWECProperty(aK,'currency',bM[u].currency); +defineWECProperty(aK,'currencyDisplay', +bM[u].currencyDisplay); +} +if((%_Call(r,bM[u],'minimumSignificantDigits'))){ +defineWECProperty(aK,'minimumSignificantDigits', +bM[u].minimumSignificantDigits); +} +if((%_Call(r,bM[u],'maximumSignificantDigits'))){ +defineWECProperty(aK,'maximumSignificantDigits', +bM[u].maximumSignificantDigits); +} +return aK; +} +); +InstallFunction(h,'supportedLocalesOf', +function(G){ +return supportedLocalesOf('numberformat',G,arguments[1]); +} +); +function formatNumber(bN,al){ +var bO=(%_ToNumber(al))+0; +return %InternalNumberFormat(bN,bO); +} +AddBoundMethod(h,'format',formatNumber,1, +'numberformat',true); +function toLDMLString(H){ +var ag=getGetOption(H,'dateformat'); +var bP=''; +var bQ=ag('weekday','string',['narrow','short','long']); +bP+=appendToLDMLString( +bQ,{narrow:'EEEEE',short:'EEE',long:'EEEE'}); +bQ=ag('era','string',['narrow','short','long']); +bP+=appendToLDMLString( +bQ,{narrow:'GGGGG',short:'GGG',long:'GGGG'}); +bQ=ag('year','string',['2-digit','numeric']); +bP+=appendToLDMLString(bQ,{'2-digit':'yy','numeric':'y'}); +bQ=ag('month','string', +['2-digit','numeric','narrow','short','long']); +bP+=appendToLDMLString(bQ,{'2-digit':'MM','numeric':'M', +'narrow':'MMMMM','short':'MMM','long':'MMMM'}); +bQ=ag('day','string',['2-digit','numeric']); +bP+=appendToLDMLString( +bQ,{'2-digit':'dd','numeric':'d'}); +var bR=ag('hour12','boolean'); +bQ=ag('hour','string',['2-digit','numeric']); +if((bR===(void 0))){ +bP+=appendToLDMLString(bQ,{'2-digit':'jj','numeric':'j'}); +}else if(bR===true){ +bP+=appendToLDMLString(bQ,{'2-digit':'hh','numeric':'h'}); +}else{ +bP+=appendToLDMLString(bQ,{'2-digit':'HH','numeric':'H'}); +} +bQ=ag('minute','string',['2-digit','numeric']); +bP+=appendToLDMLString(bQ,{'2-digit':'mm','numeric':'m'}); +bQ=ag('second','string',['2-digit','numeric']); +bP+=appendToLDMLString(bQ,{'2-digit':'ss','numeric':'s'}); +bQ=ag('timeZoneName','string',['short','long']); +bP+=appendToLDMLString(bQ,{short:'z',long:'zzzz'}); +return bP; +} +function appendToLDMLString(bQ,bS){ +if(!(bQ===(void 0))){ +return bS[bQ]; +}else{ +return''; +} +} +function fromLDMLString(bP){ +bP=%RegExpInternalReplace(GetQuotedStringRE(),bP,''); +var H={}; +var aJ=%regexp_internal_match(/E{3,5}/,bP); +H=appendToDateTimeObject( +H,'weekday',aJ,{EEEEE:'narrow',EEE:'short',EEEE:'long'}); +aJ=%regexp_internal_match(/G{3,5}/,bP); +H=appendToDateTimeObject( +H,'era',aJ,{GGGGG:'narrow',GGG:'short',GGGG:'long'}); +aJ=%regexp_internal_match(/y{1,2}/,bP); +H=appendToDateTimeObject( +H,'year',aJ,{y:'numeric',yy:'2-digit'}); +aJ=%regexp_internal_match(/M{1,5}/,bP); +H=appendToDateTimeObject(H,'month',aJ,{MM:'2-digit', +M:'numeric',MMMMM:'narrow',MMM:'short',MMMM:'long'}); +aJ=%regexp_internal_match(/L{1,5}/,bP); +H=appendToDateTimeObject(H,'month',aJ,{LL:'2-digit', +L:'numeric',LLLLL:'narrow',LLL:'short',LLLL:'long'}); +aJ=%regexp_internal_match(/d{1,2}/,bP); +H=appendToDateTimeObject( +H,'day',aJ,{d:'numeric',dd:'2-digit'}); +aJ=%regexp_internal_match(/h{1,2}/,bP); +if(aJ!==null){ +H['hour12']=true; +} +H=appendToDateTimeObject( +H,'hour',aJ,{h:'numeric',hh:'2-digit'}); +aJ=%regexp_internal_match(/H{1,2}/,bP); +if(aJ!==null){ +H['hour12']=false; +} +H=appendToDateTimeObject( +H,'hour',aJ,{H:'numeric',HH:'2-digit'}); +aJ=%regexp_internal_match(/m{1,2}/,bP); +H=appendToDateTimeObject( +H,'minute',aJ,{m:'numeric',mm:'2-digit'}); +aJ=%regexp_internal_match(/s{1,2}/,bP); +H=appendToDateTimeObject( +H,'second',aJ,{s:'numeric',ss:'2-digit'}); +aJ=%regexp_internal_match(/z|zzzz/,bP); +H=appendToDateTimeObject( +H,'timeZoneName',aJ,{z:'short',zzzz:'long'}); +return H; +} +function appendToDateTimeObject(H,bQ,aJ,bS){ +if((aJ===null)){ +if(!(%_Call(r,H,bQ))){ +defineWEProperty(H,bQ,(void 0)); +} +return H; +} +var ah=aJ[0]; +defineWEProperty(H,bQ,bS[ah]); +return H; +} +function toDateTimeOptions(H,bT,bU){ +if((H===(void 0))){ +H={}; +}else{ +H=(%_ToObject(H)); +} +H=%object_create(H); +var bV=true; +if((bT==='date'||bT==='any')&& +(!(H.weekday===(void 0))||!(H.year===(void 0))|| +!(H.month===(void 0))||!(H.day===(void 0)))){ +bV=false; +} +if((bT==='time'||bT==='any')&& +(!(H.hour===(void 0))||!(H.minute===(void 0))|| +!(H.second===(void 0)))){ +bV=false; +} +if(bV&&(bU==='date'||bU==='all')){ +%object_define_property(H,'year',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +%object_define_property(H,'month',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +%object_define_property(H,'day',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +} +if(bV&&(bU==='time'||bU==='all')){ +%object_define_property(H,'hour',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +%object_define_property(H,'minute',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +%object_define_property(H,'second',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +} +return H; +} +function CreateDateTimeFormat(G,H){ +if((H===(void 0))){ +H={}; +} +var ad=resolveLocale('dateformat',G,H); +H=toDateTimeOptions(H,'any','date'); +var ag=getGetOption(H,'dateformat'); +var Y=ag('formatMatcher','string', +['basic','best fit'],'best fit'); +var bP=toLDMLString(H); +var bW=canonicalizeTimeZoneID(H.timeZone); +var bn={}; +var aq=parseExtension(ad.extension); +var bX={ +'ca':{'property':(void 0),'type':'string'}, +'nu':{'property':(void 0),'type':'string'} +}; +var ao=setOptions(H,aq,bX, +ag,bn); +var bs=ad.locale+ao; +var am=%object_define_properties({},{ +calendar:{writable:true}, +day:{writable:true}, +era:{writable:true}, +hour12:{writable:true}, +hour:{writable:true}, +locale:{writable:true}, +minute:{writable:true}, +month:{writable:true}, +numberingSystem:{writable:true}, +[t]:{writable:true}, +requestedLocale:{value:bs,writable:true}, +second:{writable:true}, +timeZone:{writable:true}, +timeZoneName:{writable:true}, +tz:{value:bW,writable:true}, +weekday:{writable:true}, +year:{writable:true} +}); +var bY=%CreateDateTimeFormat( +bs,{skeleton:bP,timeZone:bW},am); +if(am.timeZone==="Etc/Unknown"){ +throw %make_range_error(183,bW); +} +%MarkAsInitializedIntlObjectOfType(bY,'dateformat'); +bY[u]=am; +return bY; +} +function DateTimeFormatConstructor(){ +return IntlConstruct(this,g,CreateDateTimeFormat, +new.target,arguments,true); +} +%SetCode(g,DateTimeFormatConstructor); +InstallFunction(g.prototype,'resolvedOptions', +function(){ +var bM=Unwrap(this,'dateformat',g, +'resolvedOptions',true); +var bZ={ +'gregorian':'gregory', +'ethiopic-amete-alem':'ethioaa' +}; +var ca=fromLDMLString(bM[u][t]); +var cb=bZ[bM[u].calendar]; +if((cb===(void 0))){ +cb=bM[u].calendar; +} +var ad=getOptimalLanguageTag(bM[u].requestedLocale, +bM[u].locale); +var aK={ +locale:ad, +numberingSystem:bM[u].numberingSystem, +calendar:cb, +timeZone:bM[u].timeZone +}; +addWECPropertyIfDefined(aK,'timeZoneName',ca.timeZoneName); +addWECPropertyIfDefined(aK,'era',ca.era); +addWECPropertyIfDefined(aK,'year',ca.year); +addWECPropertyIfDefined(aK,'month',ca.month); +addWECPropertyIfDefined(aK,'day',ca.day); +addWECPropertyIfDefined(aK,'weekday',ca.weekday); +addWECPropertyIfDefined(aK,'hour12',ca.hour12); +addWECPropertyIfDefined(aK,'hour',ca.hour); +addWECPropertyIfDefined(aK,'minute',ca.minute); +addWECPropertyIfDefined(aK,'second',ca.second); +return aK; +} +); +InstallFunction(g,'supportedLocalesOf', +function(G){ +return supportedLocalesOf('dateformat',G,arguments[1]); +} +); +function formatDate(bN,cc){ +var cd; +if((cc===(void 0))){ +cd=%DateCurrentTime(); +}else{ +cd=(%_ToNumber(cc)); +} +if(!(%_IsSmi(%IS_VAR(cd))||((cd==cd)&&(cd!=1/0)&&(cd!=-1/0))))throw %make_range_error(149); +return %InternalDateFormat(bN,new e(cd)); +} +function FormatDateToParts(cc){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"Intl.DateTimeFormat.prototype.formatToParts"); +if(!(typeof(this)==='object')){ +throw %make_type_error(15,this); +} +if(!%IsInitializedIntlObjectOfType(this,'dateformat')){ +throw %make_type_error(44, +'Intl.DateTimeFormat.prototype.formatToParts', +this); +} +var cd; +if((cc===(void 0))){ +cd=%DateCurrentTime(); +}else{ +cd=(%_ToNumber(cc)); +} +if(!(%_IsSmi(%IS_VAR(cd))||((cd==cd)&&(cd!=1/0)&&(cd!=-1/0))))throw %make_range_error(149); +return %InternalDateFormatToParts(this,new e(cd)); +} +%FunctionSetLength(FormatDateToParts,0); +AddBoundMethod(g,'format',formatDate,0,'dateformat', +true); +function canonicalizeTimeZoneID(ce){ +if((ce===(void 0))){ +return ce; +} +ce=(%_ToString(ce)); +var cf=%StringToUpperCase(ce); +if(cf==='UTC'||cf==='GMT'|| +cf==='ETC/UTC'||cf==='ETC/GMT'){ +return'UTC'; +} +var aJ=%regexp_internal_match(GetTimezoneNameCheckRE(),ce); +if((aJ===null))throw %make_range_error(150,ce); +var aK=toTitleCaseTimezoneLocation(aJ[1])+'/'+ +toTitleCaseTimezoneLocation(aJ[2]); +if(!(aJ[3]===(void 0))&&30?G[0]:GetDefaultICULocaleJS(); +} +var ae=%StringIndexOf(bj,'-',0); +if(ae!==-1){ +bj=%_Call(x,bj,0,ae); +} +return %StringLocaleConvertCase(cp,cq,bj); +} +s(m.prototype,'localeCompare',function(cr){ +if((this==null)){ +throw %make_type_error(54); +} +var G=arguments[1]; +var H=arguments[2]; +var bt=cachedOrNewService('collator',G,H); +return compare(bt,this,cr); +} +); +s(m.prototype,'normalize',function(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.normalize"); +var cp=(%_ToString(this)); +var cs=arguments[0]; +var ct=(cs===(void 0))?'NFC':(%_ToString(cs)); +var cu=['NFC','NFD','NFKC','NFKD']; +var cv=%ArrayIndexOf(cu,ct,0); +if(cv===-1){ +throw %make_range_error(175, +%_Call(c,cu,', ')); +} +return %StringNormalize(cp,cv); +} +); +function ToLowerCaseI18N(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.toLowerCase"); +return %StringToLowerCaseI18N((%_ToString(this))); +} +function ToUpperCaseI18N(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.toUpperCase"); +return %StringToUpperCaseI18N((%_ToString(this))); +} +function ToLocaleLowerCaseI18N(G){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.toLocaleLowerCase"); +return LocaleConvertCase((%_ToString(this)),G,false); +} +%FunctionSetLength(ToLocaleLowerCaseI18N,0); +function ToLocaleUpperCaseI18N(G){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(16,"String.prototype.toLocaleUpperCase"); +return LocaleConvertCase((%_ToString(this)),G,true); +} +%FunctionSetLength(ToLocaleUpperCaseI18N,0); +%FunctionRemovePrototype(ToLowerCaseI18N); +%FunctionRemovePrototype(ToUpperCaseI18N); +%FunctionRemovePrototype(ToLocaleLowerCaseI18N); +%FunctionRemovePrototype(ToLocaleUpperCaseI18N); +b.Export(function(cw){ +cw.ToLowerCaseI18N=ToLowerCaseI18N; +cw.ToUpperCaseI18N=ToUpperCaseI18N; +cw.ToLocaleLowerCaseI18N=ToLocaleLowerCaseI18N; +cw.ToLocaleUpperCaseI18N=ToLocaleUpperCaseI18N; +}); +s(k.prototype,'toLocaleString',function(){ +if(!(this instanceof k)&&typeof(this)!=='number'){ +throw %make_type_error(55,"Number"); +} +var G=arguments[0]; +var H=arguments[1]; +var bL=cachedOrNewService('numberformat',G,H); +return formatNumber(bL,this); +} +); +function toLocaleDateTime(cx,G,H,bT,bU,X){ +if(!(cx instanceof e)){ +throw %make_type_error(55,"Date"); +} +var cc=(%_ToNumber(cx)); +if((!%_IsSmi(%IS_VAR(cc))&&!(cc==cc)))return'Invalid Date'; +var bn=toDateTimeOptions(H,bT,bU); +var bY= +cachedOrNewService(X,G,H,bn); +return formatDate(bY,cx); +} +s(e.prototype,'toLocaleString',function(){ +var G=arguments[0]; +var H=arguments[1]; +return toLocaleDateTime( +this,G,H,'any','all','dateformatall'); +} +); +s(e.prototype,'toLocaleDateString',function(){ +var G=arguments[0]; +var H=arguments[1]; +return toLocaleDateTime( +this,G,H,'date','date','dateformatdate'); +} +); +s(e.prototype,'toLocaleTimeString',function(){ +var G=arguments[0]; +var H=arguments[1]; +return toLocaleDateTime( +this,G,H,'time','time','dateformattime'); +} +); +%FunctionRemovePrototype(FormatDateToParts); +b.Export(function(cw){ +cw.FormatDateToParts=FormatDateToParts; +}); +}) + +=i){ +throw %make_range_error(155); +} +return k; +} +function AtomicsCompareExchangeJS(l,h,m,n){ +CheckSharedIntegerTypedArray(l); +h=ValidateIndex(h,%_TypedArrayGetLength(l)); +m=(%_ToNumber(m)); +n=(%_ToNumber(n)); +return %_AtomicsCompareExchange(l,h,m,n); +} +function AtomicsAddJS(g,h,o){ +CheckSharedIntegerTypedArray(g); +h=ValidateIndex(h,%_TypedArrayGetLength(g)); +o=(%_ToNumber(o)); +return %_AtomicsAdd(g,h,o); +} +function AtomicsSubJS(g,h,o){ +CheckSharedIntegerTypedArray(g); +h=ValidateIndex(h,%_TypedArrayGetLength(g)); +o=(%_ToNumber(o)); +return %_AtomicsSub(g,h,o); +} +function AtomicsAndJS(g,h,o){ +CheckSharedIntegerTypedArray(g); +h=ValidateIndex(h,%_TypedArrayGetLength(g)); +o=(%_ToNumber(o)); +return %_AtomicsAnd(g,h,o); +} +function AtomicsOrJS(g,h,o){ +CheckSharedIntegerTypedArray(g); +h=ValidateIndex(h,%_TypedArrayGetLength(g)); +o=(%_ToNumber(o)); +return %_AtomicsOr(g,h,o); +} +function AtomicsXorJS(g,h,o){ +CheckSharedIntegerTypedArray(g); +h=ValidateIndex(h,%_TypedArrayGetLength(g)); +o=(%_ToNumber(o)); +return %_AtomicsXor(g,h,o); +} +function AtomicsExchangeJS(g,h,o){ +CheckSharedIntegerTypedArray(g); +h=ValidateIndex(h,%_TypedArrayGetLength(g)); +o=(%_ToNumber(o)); +return %_AtomicsExchange(g,h,o); +} +function AtomicsIsLockFreeJS(p){ +return %_AtomicsIsLockFree(p); +} +function AtomicsWaitJS(g,h,o,q){ +CheckSharedInteger32TypedArray(g); +h=ValidateIndex(h,%_TypedArrayGetLength(g)); +if((q===(void 0))){ +q=(1/0); +}else{ +q=(%_ToNumber(q)); +if((!%_IsSmi(%IS_VAR(q))&&!(q==q))){ +q=(1/0); +}else{ +q=d(0,q); +} +} +return %AtomicsWait(g,h,o,q); +} +function AtomicsWakeJS(g,h,r){ +CheckSharedInteger32TypedArray(g); +h=ValidateIndex(h,%_TypedArrayGetLength(g)); +r=d(0,(%_ToInteger(r))); +return %AtomicsWake(g,h,r); +} +var s=a.Atomics; +%AddNamedProperty(s,e,"Atomics",1|2); +b.InstallFunctions(s,2,[ +"compareExchange",AtomicsCompareExchangeJS, +"add",AtomicsAddJS, +"sub",AtomicsSubJS, +"and",AtomicsAndJS, +"or",AtomicsOrJS, +"xor",AtomicsXorJS, +"exchange",AtomicsExchangeJS, +"isLockFree",AtomicsIsLockFreeJS, +"wait",AtomicsWaitJS, +"wake",AtomicsWakeJS, +]); +}) + +0harmony-simdŽ´ +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.SIMD; +var d=b.ImportNow("to_string_tag_symbol"); +var e=c.Float32x4; + + +var f=c.Int32x4; + +var g=c.Int16x8; + +var h=c.Int8x16; + + +var i=c.Uint32x4; + +var j=c.Uint16x8; + +var k=c.Uint8x16; + + +var l=c.Bool32x4; + +var m=c.Bool16x8; + +var n=c.Bool8x16; + + + +function Float32x4CheckJS(o){ +return %Float32x4Check(o); +} +function Float32x4ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='float32x4'){ +throw %make_type_error(44, +"Float32x4.prototype.toString",this); +} +var q="SIMD.Float32x4("; +q+=%Float32x4ExtractLane(p,0); +for(var r=1;r<4;r++){ +q+=", "+%Float32x4ExtractLane(p,r); +} +return q+")"; +} +function Float32x4ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='float32x4'){ +throw %make_type_error(44, +"Float32x4.prototype.toLocaleString",this); +} +var q="SIMD.Float32x4("; +q+=%Float32x4ExtractLane(p,0).toLocaleString(); +for(var r=1;r<4;r++){ +q+=", "+%Float32x4ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Float32x4ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='float32x4'){ +throw %make_type_error(44, +"Float32x4.prototype.valueOf",this); +} +return p; +} +function Float32x4ExtractLaneJS(s,t){ +return %Float32x4ExtractLane(s,t); +} + + +function Int32x4CheckJS(o){ +return %Int32x4Check(o); +} +function Int32x4ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='int32x4'){ +throw %make_type_error(44, +"Int32x4.prototype.toString",this); +} +var q="SIMD.Int32x4("; +q+=%Int32x4ExtractLane(p,0); +for(var r=1;r<4;r++){ +q+=", "+%Int32x4ExtractLane(p,r); +} +return q+")"; +} +function Int32x4ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='int32x4'){ +throw %make_type_error(44, +"Int32x4.prototype.toLocaleString",this); +} +var q="SIMD.Int32x4("; +q+=%Int32x4ExtractLane(p,0).toLocaleString(); +for(var r=1;r<4;r++){ +q+=", "+%Int32x4ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Int32x4ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='int32x4'){ +throw %make_type_error(44, +"Int32x4.prototype.valueOf",this); +} +return p; +} +function Int32x4ExtractLaneJS(s,t){ +return %Int32x4ExtractLane(s,t); +} + +function Int16x8CheckJS(o){ +return %Int16x8Check(o); +} +function Int16x8ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='int16x8'){ +throw %make_type_error(44, +"Int16x8.prototype.toString",this); +} +var q="SIMD.Int16x8("; +q+=%Int16x8ExtractLane(p,0); +for(var r=1;r<8;r++){ +q+=", "+%Int16x8ExtractLane(p,r); +} +return q+")"; +} +function Int16x8ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='int16x8'){ +throw %make_type_error(44, +"Int16x8.prototype.toLocaleString",this); +} +var q="SIMD.Int16x8("; +q+=%Int16x8ExtractLane(p,0).toLocaleString(); +for(var r=1;r<8;r++){ +q+=", "+%Int16x8ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Int16x8ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='int16x8'){ +throw %make_type_error(44, +"Int16x8.prototype.valueOf",this); +} +return p; +} +function Int16x8ExtractLaneJS(s,t){ +return %Int16x8ExtractLane(s,t); +} + +function Int8x16CheckJS(o){ +return %Int8x16Check(o); +} +function Int8x16ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='int8x16'){ +throw %make_type_error(44, +"Int8x16.prototype.toString",this); +} +var q="SIMD.Int8x16("; +q+=%Int8x16ExtractLane(p,0); +for(var r=1;r<16;r++){ +q+=", "+%Int8x16ExtractLane(p,r); +} +return q+")"; +} +function Int8x16ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='int8x16'){ +throw %make_type_error(44, +"Int8x16.prototype.toLocaleString",this); +} +var q="SIMD.Int8x16("; +q+=%Int8x16ExtractLane(p,0).toLocaleString(); +for(var r=1;r<16;r++){ +q+=", "+%Int8x16ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Int8x16ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='int8x16'){ +throw %make_type_error(44, +"Int8x16.prototype.valueOf",this); +} +return p; +} +function Int8x16ExtractLaneJS(s,t){ +return %Int8x16ExtractLane(s,t); +} + + +function Uint32x4CheckJS(o){ +return %Uint32x4Check(o); +} +function Uint32x4ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint32x4'){ +throw %make_type_error(44, +"Uint32x4.prototype.toString",this); +} +var q="SIMD.Uint32x4("; +q+=%Uint32x4ExtractLane(p,0); +for(var r=1;r<4;r++){ +q+=", "+%Uint32x4ExtractLane(p,r); +} +return q+")"; +} +function Uint32x4ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint32x4'){ +throw %make_type_error(44, +"Uint32x4.prototype.toLocaleString",this); +} +var q="SIMD.Uint32x4("; +q+=%Uint32x4ExtractLane(p,0).toLocaleString(); +for(var r=1;r<4;r++){ +q+=", "+%Uint32x4ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Uint32x4ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint32x4'){ +throw %make_type_error(44, +"Uint32x4.prototype.valueOf",this); +} +return p; +} +function Uint32x4ExtractLaneJS(s,t){ +return %Uint32x4ExtractLane(s,t); +} + +function Uint16x8CheckJS(o){ +return %Uint16x8Check(o); +} +function Uint16x8ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint16x8'){ +throw %make_type_error(44, +"Uint16x8.prototype.toString",this); +} +var q="SIMD.Uint16x8("; +q+=%Uint16x8ExtractLane(p,0); +for(var r=1;r<8;r++){ +q+=", "+%Uint16x8ExtractLane(p,r); +} +return q+")"; +} +function Uint16x8ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint16x8'){ +throw %make_type_error(44, +"Uint16x8.prototype.toLocaleString",this); +} +var q="SIMD.Uint16x8("; +q+=%Uint16x8ExtractLane(p,0).toLocaleString(); +for(var r=1;r<8;r++){ +q+=", "+%Uint16x8ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Uint16x8ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint16x8'){ +throw %make_type_error(44, +"Uint16x8.prototype.valueOf",this); +} +return p; +} +function Uint16x8ExtractLaneJS(s,t){ +return %Uint16x8ExtractLane(s,t); +} + +function Uint8x16CheckJS(o){ +return %Uint8x16Check(o); +} +function Uint8x16ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint8x16'){ +throw %make_type_error(44, +"Uint8x16.prototype.toString",this); +} +var q="SIMD.Uint8x16("; +q+=%Uint8x16ExtractLane(p,0); +for(var r=1;r<16;r++){ +q+=", "+%Uint8x16ExtractLane(p,r); +} +return q+")"; +} +function Uint8x16ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint8x16'){ +throw %make_type_error(44, +"Uint8x16.prototype.toLocaleString",this); +} +var q="SIMD.Uint8x16("; +q+=%Uint8x16ExtractLane(p,0).toLocaleString(); +for(var r=1;r<16;r++){ +q+=", "+%Uint8x16ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Uint8x16ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='uint8x16'){ +throw %make_type_error(44, +"Uint8x16.prototype.valueOf",this); +} +return p; +} +function Uint8x16ExtractLaneJS(s,t){ +return %Uint8x16ExtractLane(s,t); +} + + +function Bool32x4CheckJS(o){ +return %Bool32x4Check(o); +} +function Bool32x4ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool32x4'){ +throw %make_type_error(44, +"Bool32x4.prototype.toString",this); +} +var q="SIMD.Bool32x4("; +q+=%Bool32x4ExtractLane(p,0); +for(var r=1;r<4;r++){ +q+=", "+%Bool32x4ExtractLane(p,r); +} +return q+")"; +} +function Bool32x4ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool32x4'){ +throw %make_type_error(44, +"Bool32x4.prototype.toLocaleString",this); +} +var q="SIMD.Bool32x4("; +q+=%Bool32x4ExtractLane(p,0).toLocaleString(); +for(var r=1;r<4;r++){ +q+=", "+%Bool32x4ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Bool32x4ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool32x4'){ +throw %make_type_error(44, +"Bool32x4.prototype.valueOf",this); +} +return p; +} +function Bool32x4ExtractLaneJS(s,t){ +return %Bool32x4ExtractLane(s,t); +} + +function Bool16x8CheckJS(o){ +return %Bool16x8Check(o); +} +function Bool16x8ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool16x8'){ +throw %make_type_error(44, +"Bool16x8.prototype.toString",this); +} +var q="SIMD.Bool16x8("; +q+=%Bool16x8ExtractLane(p,0); +for(var r=1;r<8;r++){ +q+=", "+%Bool16x8ExtractLane(p,r); +} +return q+")"; +} +function Bool16x8ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool16x8'){ +throw %make_type_error(44, +"Bool16x8.prototype.toLocaleString",this); +} +var q="SIMD.Bool16x8("; +q+=%Bool16x8ExtractLane(p,0).toLocaleString(); +for(var r=1;r<8;r++){ +q+=", "+%Bool16x8ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Bool16x8ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool16x8'){ +throw %make_type_error(44, +"Bool16x8.prototype.valueOf",this); +} +return p; +} +function Bool16x8ExtractLaneJS(s,t){ +return %Bool16x8ExtractLane(s,t); +} + +function Bool8x16CheckJS(o){ +return %Bool8x16Check(o); +} +function Bool8x16ToString(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool8x16'){ +throw %make_type_error(44, +"Bool8x16.prototype.toString",this); +} +var q="SIMD.Bool8x16("; +q+=%Bool8x16ExtractLane(p,0); +for(var r=1;r<16;r++){ +q+=", "+%Bool8x16ExtractLane(p,r); +} +return q+")"; +} +function Bool8x16ToLocaleString(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool8x16'){ +throw %make_type_error(44, +"Bool8x16.prototype.toLocaleString",this); +} +var q="SIMD.Bool8x16("; +q+=%Bool8x16ExtractLane(p,0).toLocaleString(); +for(var r=1;r<16;r++){ +q+=", "+%Bool8x16ExtractLane(p,r).toLocaleString(); +} +return q+")"; +} +function Bool8x16ValueOf(){ +var p=%ValueOf(this); +if(typeof(p)!=='bool8x16'){ +throw %make_type_error(44, +"Bool8x16.prototype.valueOf",this); +} +return p; +} +function Bool8x16ExtractLaneJS(s,t){ +return %Bool8x16ExtractLane(s,t); +} + + + +function Int32x4ShiftLeftByScalarJS(s,u){ +return %Int32x4ShiftLeftByScalar(s,u); +} +function Int32x4ShiftRightByScalarJS(s,u){ +return %Int32x4ShiftRightByScalar(s,u); +} + +function Int16x8ShiftLeftByScalarJS(s,u){ +return %Int16x8ShiftLeftByScalar(s,u); +} +function Int16x8ShiftRightByScalarJS(s,u){ +return %Int16x8ShiftRightByScalar(s,u); +} + +function Int8x16ShiftLeftByScalarJS(s,u){ +return %Int8x16ShiftLeftByScalar(s,u); +} +function Int8x16ShiftRightByScalarJS(s,u){ +return %Int8x16ShiftRightByScalar(s,u); +} + + +function Uint32x4ShiftLeftByScalarJS(s,u){ +return %Uint32x4ShiftLeftByScalar(s,u); +} +function Uint32x4ShiftRightByScalarJS(s,u){ +return %Uint32x4ShiftRightByScalar(s,u); +} + +function Uint16x8ShiftLeftByScalarJS(s,u){ +return %Uint16x8ShiftLeftByScalar(s,u); +} +function Uint16x8ShiftRightByScalarJS(s,u){ +return %Uint16x8ShiftRightByScalar(s,u); +} + +function Uint8x16ShiftLeftByScalarJS(s,u){ +return %Uint8x16ShiftLeftByScalar(s,u); +} +function Uint8x16ShiftRightByScalarJS(s,u){ +return %Uint8x16ShiftRightByScalar(s,u); +} + + +function Int16x8AddSaturateJS(o,v){ +return %Int16x8AddSaturate(o,v); +} +function Int16x8SubSaturateJS(o,v){ +return %Int16x8SubSaturate(o,v); +} + +function Int8x16AddSaturateJS(o,v){ +return %Int8x16AddSaturate(o,v); +} +function Int8x16SubSaturateJS(o,v){ +return %Int8x16SubSaturate(o,v); +} + +function Uint8x16AddSaturateJS(o,v){ +return %Uint8x16AddSaturate(o,v); +} +function Uint8x16SubSaturateJS(o,v){ +return %Uint8x16SubSaturate(o,v); +} + +function Uint16x8AddSaturateJS(o,v){ +return %Uint16x8AddSaturate(o,v); +} +function Uint16x8SubSaturateJS(o,v){ +return %Uint16x8SubSaturate(o,v); +} + + +function Float32x4NegJS(o){ +return %Float32x4Neg(o); +} + + +function Int32x4NegJS(o){ +return %Int32x4Neg(o); +} + +function Int16x8NegJS(o){ +return %Int16x8Neg(o); +} + +function Int8x16NegJS(o){ +return %Int8x16Neg(o); +} + + +function Bool32x4ReplaceLaneJS(s,t,p){ +return %Bool32x4ReplaceLane(s,t,p); +} +function Bool32x4AnyTrueJS(w){ +return %Bool32x4AnyTrue(w); +} +function Bool32x4AllTrueJS(w){ +return %Bool32x4AllTrue(w); +} + +function Bool16x8ReplaceLaneJS(s,t,p){ +return %Bool16x8ReplaceLane(s,t,p); +} +function Bool16x8AnyTrueJS(w){ +return %Bool16x8AnyTrue(w); +} +function Bool16x8AllTrueJS(w){ +return %Bool16x8AllTrue(w); +} + +function Bool8x16ReplaceLaneJS(s,t,p){ +return %Bool8x16ReplaceLane(s,t,p); +} +function Bool8x16AnyTrueJS(w){ +return %Bool8x16AnyTrue(w); +} +function Bool8x16AllTrueJS(w){ +return %Bool8x16AllTrue(w); +} + + +function Float32x4ReplaceLaneJS(s,t,p){ +return %Float32x4ReplaceLane(s,t,(%_ToNumber(p))); +} +function Float32x4SelectJS(x,o,v){ +return %Float32x4Select(x,o,v); +} +function Float32x4AddJS(o,v){ +return %Float32x4Add(o,v); +} +function Float32x4SubJS(o,v){ +return %Float32x4Sub(o,v); +} +function Float32x4MulJS(o,v){ +return %Float32x4Mul(o,v); +} +function Float32x4MinJS(o,v){ +return %Float32x4Min(o,v); +} +function Float32x4MaxJS(o,v){ +return %Float32x4Max(o,v); +} +function Float32x4EqualJS(o,v){ +return %Float32x4Equal(o,v); +} +function Float32x4NotEqualJS(o,v){ +return %Float32x4NotEqual(o,v); +} +function Float32x4LessThanJS(o,v){ +return %Float32x4LessThan(o,v); +} +function Float32x4LessThanOrEqualJS(o,v){ +return %Float32x4LessThanOrEqual(o,v); +} +function Float32x4GreaterThanJS(o,v){ +return %Float32x4GreaterThan(o,v); +} +function Float32x4GreaterThanOrEqualJS(o,v){ +return %Float32x4GreaterThanOrEqual(o,v); +} +function Float32x4LoadJS(y,z){ +return %Float32x4Load(y,z); +} +function Float32x4StoreJS(y,z,o){ +return %Float32x4Store(y,z,o); +} + + +function Int32x4ReplaceLaneJS(s,t,p){ +return %Int32x4ReplaceLane(s,t,(%_ToNumber(p))); +} +function Int32x4SelectJS(x,o,v){ +return %Int32x4Select(x,o,v); +} +function Int32x4AddJS(o,v){ +return %Int32x4Add(o,v); +} +function Int32x4SubJS(o,v){ +return %Int32x4Sub(o,v); +} +function Int32x4MulJS(o,v){ +return %Int32x4Mul(o,v); +} +function Int32x4MinJS(o,v){ +return %Int32x4Min(o,v); +} +function Int32x4MaxJS(o,v){ +return %Int32x4Max(o,v); +} +function Int32x4EqualJS(o,v){ +return %Int32x4Equal(o,v); +} +function Int32x4NotEqualJS(o,v){ +return %Int32x4NotEqual(o,v); +} +function Int32x4LessThanJS(o,v){ +return %Int32x4LessThan(o,v); +} +function Int32x4LessThanOrEqualJS(o,v){ +return %Int32x4LessThanOrEqual(o,v); +} +function Int32x4GreaterThanJS(o,v){ +return %Int32x4GreaterThan(o,v); +} +function Int32x4GreaterThanOrEqualJS(o,v){ +return %Int32x4GreaterThanOrEqual(o,v); +} +function Int32x4LoadJS(y,z){ +return %Int32x4Load(y,z); +} +function Int32x4StoreJS(y,z,o){ +return %Int32x4Store(y,z,o); +} + +function Int16x8ReplaceLaneJS(s,t,p){ +return %Int16x8ReplaceLane(s,t,(%_ToNumber(p))); +} +function Int16x8SelectJS(x,o,v){ +return %Int16x8Select(x,o,v); +} +function Int16x8AddJS(o,v){ +return %Int16x8Add(o,v); +} +function Int16x8SubJS(o,v){ +return %Int16x8Sub(o,v); +} +function Int16x8MulJS(o,v){ +return %Int16x8Mul(o,v); +} +function Int16x8MinJS(o,v){ +return %Int16x8Min(o,v); +} +function Int16x8MaxJS(o,v){ +return %Int16x8Max(o,v); +} +function Int16x8EqualJS(o,v){ +return %Int16x8Equal(o,v); +} +function Int16x8NotEqualJS(o,v){ +return %Int16x8NotEqual(o,v); +} +function Int16x8LessThanJS(o,v){ +return %Int16x8LessThan(o,v); +} +function Int16x8LessThanOrEqualJS(o,v){ +return %Int16x8LessThanOrEqual(o,v); +} +function Int16x8GreaterThanJS(o,v){ +return %Int16x8GreaterThan(o,v); +} +function Int16x8GreaterThanOrEqualJS(o,v){ +return %Int16x8GreaterThanOrEqual(o,v); +} +function Int16x8LoadJS(y,z){ +return %Int16x8Load(y,z); +} +function Int16x8StoreJS(y,z,o){ +return %Int16x8Store(y,z,o); +} + +function Int8x16ReplaceLaneJS(s,t,p){ +return %Int8x16ReplaceLane(s,t,(%_ToNumber(p))); +} +function Int8x16SelectJS(x,o,v){ +return %Int8x16Select(x,o,v); +} +function Int8x16AddJS(o,v){ +return %Int8x16Add(o,v); +} +function Int8x16SubJS(o,v){ +return %Int8x16Sub(o,v); +} +function Int8x16MulJS(o,v){ +return %Int8x16Mul(o,v); +} +function Int8x16MinJS(o,v){ +return %Int8x16Min(o,v); +} +function Int8x16MaxJS(o,v){ +return %Int8x16Max(o,v); +} +function Int8x16EqualJS(o,v){ +return %Int8x16Equal(o,v); +} +function Int8x16NotEqualJS(o,v){ +return %Int8x16NotEqual(o,v); +} +function Int8x16LessThanJS(o,v){ +return %Int8x16LessThan(o,v); +} +function Int8x16LessThanOrEqualJS(o,v){ +return %Int8x16LessThanOrEqual(o,v); +} +function Int8x16GreaterThanJS(o,v){ +return %Int8x16GreaterThan(o,v); +} +function Int8x16GreaterThanOrEqualJS(o,v){ +return %Int8x16GreaterThanOrEqual(o,v); +} +function Int8x16LoadJS(y,z){ +return %Int8x16Load(y,z); +} +function Int8x16StoreJS(y,z,o){ +return %Int8x16Store(y,z,o); +} + + +function Uint32x4ReplaceLaneJS(s,t,p){ +return %Uint32x4ReplaceLane(s,t,(%_ToNumber(p))); +} +function Uint32x4SelectJS(x,o,v){ +return %Uint32x4Select(x,o,v); +} +function Uint32x4AddJS(o,v){ +return %Uint32x4Add(o,v); +} +function Uint32x4SubJS(o,v){ +return %Uint32x4Sub(o,v); +} +function Uint32x4MulJS(o,v){ +return %Uint32x4Mul(o,v); +} +function Uint32x4MinJS(o,v){ +return %Uint32x4Min(o,v); +} +function Uint32x4MaxJS(o,v){ +return %Uint32x4Max(o,v); +} +function Uint32x4EqualJS(o,v){ +return %Uint32x4Equal(o,v); +} +function Uint32x4NotEqualJS(o,v){ +return %Uint32x4NotEqual(o,v); +} +function Uint32x4LessThanJS(o,v){ +return %Uint32x4LessThan(o,v); +} +function Uint32x4LessThanOrEqualJS(o,v){ +return %Uint32x4LessThanOrEqual(o,v); +} +function Uint32x4GreaterThanJS(o,v){ +return %Uint32x4GreaterThan(o,v); +} +function Uint32x4GreaterThanOrEqualJS(o,v){ +return %Uint32x4GreaterThanOrEqual(o,v); +} +function Uint32x4LoadJS(y,z){ +return %Uint32x4Load(y,z); +} +function Uint32x4StoreJS(y,z,o){ +return %Uint32x4Store(y,z,o); +} + +function Uint16x8ReplaceLaneJS(s,t,p){ +return %Uint16x8ReplaceLane(s,t,(%_ToNumber(p))); +} +function Uint16x8SelectJS(x,o,v){ +return %Uint16x8Select(x,o,v); +} +function Uint16x8AddJS(o,v){ +return %Uint16x8Add(o,v); +} +function Uint16x8SubJS(o,v){ +return %Uint16x8Sub(o,v); +} +function Uint16x8MulJS(o,v){ +return %Uint16x8Mul(o,v); +} +function Uint16x8MinJS(o,v){ +return %Uint16x8Min(o,v); +} +function Uint16x8MaxJS(o,v){ +return %Uint16x8Max(o,v); +} +function Uint16x8EqualJS(o,v){ +return %Uint16x8Equal(o,v); +} +function Uint16x8NotEqualJS(o,v){ +return %Uint16x8NotEqual(o,v); +} +function Uint16x8LessThanJS(o,v){ +return %Uint16x8LessThan(o,v); +} +function Uint16x8LessThanOrEqualJS(o,v){ +return %Uint16x8LessThanOrEqual(o,v); +} +function Uint16x8GreaterThanJS(o,v){ +return %Uint16x8GreaterThan(o,v); +} +function Uint16x8GreaterThanOrEqualJS(o,v){ +return %Uint16x8GreaterThanOrEqual(o,v); +} +function Uint16x8LoadJS(y,z){ +return %Uint16x8Load(y,z); +} +function Uint16x8StoreJS(y,z,o){ +return %Uint16x8Store(y,z,o); +} + +function Uint8x16ReplaceLaneJS(s,t,p){ +return %Uint8x16ReplaceLane(s,t,(%_ToNumber(p))); +} +function Uint8x16SelectJS(x,o,v){ +return %Uint8x16Select(x,o,v); +} +function Uint8x16AddJS(o,v){ +return %Uint8x16Add(o,v); +} +function Uint8x16SubJS(o,v){ +return %Uint8x16Sub(o,v); +} +function Uint8x16MulJS(o,v){ +return %Uint8x16Mul(o,v); +} +function Uint8x16MinJS(o,v){ +return %Uint8x16Min(o,v); +} +function Uint8x16MaxJS(o,v){ +return %Uint8x16Max(o,v); +} +function Uint8x16EqualJS(o,v){ +return %Uint8x16Equal(o,v); +} +function Uint8x16NotEqualJS(o,v){ +return %Uint8x16NotEqual(o,v); +} +function Uint8x16LessThanJS(o,v){ +return %Uint8x16LessThan(o,v); +} +function Uint8x16LessThanOrEqualJS(o,v){ +return %Uint8x16LessThanOrEqual(o,v); +} +function Uint8x16GreaterThanJS(o,v){ +return %Uint8x16GreaterThan(o,v); +} +function Uint8x16GreaterThanOrEqualJS(o,v){ +return %Uint8x16GreaterThanOrEqual(o,v); +} +function Uint8x16LoadJS(y,z){ +return %Uint8x16Load(y,z); +} +function Uint8x16StoreJS(y,z,o){ +return %Uint8x16Store(y,z,o); +} + + + +function Int32x4AndJS(o,v){ +return %Int32x4And(o,v); +} +function Int32x4OrJS(o,v){ +return %Int32x4Or(o,v); +} +function Int32x4XorJS(o,v){ +return %Int32x4Xor(o,v); +} +function Int32x4NotJS(o){ +return %Int32x4Not(o); +} + +function Int16x8AndJS(o,v){ +return %Int16x8And(o,v); +} +function Int16x8OrJS(o,v){ +return %Int16x8Or(o,v); +} +function Int16x8XorJS(o,v){ +return %Int16x8Xor(o,v); +} +function Int16x8NotJS(o){ +return %Int16x8Not(o); +} + +function Int8x16AndJS(o,v){ +return %Int8x16And(o,v); +} +function Int8x16OrJS(o,v){ +return %Int8x16Or(o,v); +} +function Int8x16XorJS(o,v){ +return %Int8x16Xor(o,v); +} +function Int8x16NotJS(o){ +return %Int8x16Not(o); +} + + +function Uint32x4AndJS(o,v){ +return %Uint32x4And(o,v); +} +function Uint32x4OrJS(o,v){ +return %Uint32x4Or(o,v); +} +function Uint32x4XorJS(o,v){ +return %Uint32x4Xor(o,v); +} +function Uint32x4NotJS(o){ +return %Uint32x4Not(o); +} + +function Uint16x8AndJS(o,v){ +return %Uint16x8And(o,v); +} +function Uint16x8OrJS(o,v){ +return %Uint16x8Or(o,v); +} +function Uint16x8XorJS(o,v){ +return %Uint16x8Xor(o,v); +} +function Uint16x8NotJS(o){ +return %Uint16x8Not(o); +} + +function Uint8x16AndJS(o,v){ +return %Uint8x16And(o,v); +} +function Uint8x16OrJS(o,v){ +return %Uint8x16Or(o,v); +} +function Uint8x16XorJS(o,v){ +return %Uint8x16Xor(o,v); +} +function Uint8x16NotJS(o){ +return %Uint8x16Not(o); +} + + +function Bool32x4AndJS(o,v){ +return %Bool32x4And(o,v); +} +function Bool32x4OrJS(o,v){ +return %Bool32x4Or(o,v); +} +function Bool32x4XorJS(o,v){ +return %Bool32x4Xor(o,v); +} +function Bool32x4NotJS(o){ +return %Bool32x4Not(o); +} + +function Bool16x8AndJS(o,v){ +return %Bool16x8And(o,v); +} +function Bool16x8OrJS(o,v){ +return %Bool16x8Or(o,v); +} +function Bool16x8XorJS(o,v){ +return %Bool16x8Xor(o,v); +} +function Bool16x8NotJS(o){ +return %Bool16x8Not(o); +} + +function Bool8x16AndJS(o,v){ +return %Bool8x16And(o,v); +} +function Bool8x16OrJS(o,v){ +return %Bool8x16Or(o,v); +} +function Bool8x16XorJS(o,v){ +return %Bool8x16Xor(o,v); +} +function Bool8x16NotJS(o){ +return %Bool8x16Not(o); +} + + + +function Float32x4FromInt32x4JS(o){ +return %Float32x4FromInt32x4(o); +} + +function Float32x4FromUint32x4JS(o){ +return %Float32x4FromUint32x4(o); +} + +function Int32x4FromFloat32x4JS(o){ +return %Int32x4FromFloat32x4(o); +} + +function Int32x4FromUint32x4JS(o){ +return %Int32x4FromUint32x4(o); +} + +function Uint32x4FromFloat32x4JS(o){ +return %Uint32x4FromFloat32x4(o); +} + +function Uint32x4FromInt32x4JS(o){ +return %Uint32x4FromInt32x4(o); +} + +function Int16x8FromUint16x8JS(o){ +return %Int16x8FromUint16x8(o); +} + +function Uint16x8FromInt16x8JS(o){ +return %Uint16x8FromInt16x8(o); +} + +function Int8x16FromUint8x16JS(o){ +return %Int8x16FromUint8x16(o); +} + +function Uint8x16FromInt8x16JS(o){ +return %Uint8x16FromInt8x16(o); +} + + +function Float32x4FromInt32x4BitsJS(o){ +return %Float32x4FromInt32x4Bits(o); +} + +function Float32x4FromUint32x4BitsJS(o){ +return %Float32x4FromUint32x4Bits(o); +} + +function Float32x4FromInt16x8BitsJS(o){ +return %Float32x4FromInt16x8Bits(o); +} + +function Float32x4FromUint16x8BitsJS(o){ +return %Float32x4FromUint16x8Bits(o); +} + +function Float32x4FromInt8x16BitsJS(o){ +return %Float32x4FromInt8x16Bits(o); +} + +function Float32x4FromUint8x16BitsJS(o){ +return %Float32x4FromUint8x16Bits(o); +} + +function Int32x4FromFloat32x4BitsJS(o){ +return %Int32x4FromFloat32x4Bits(o); +} + +function Int32x4FromUint32x4BitsJS(o){ +return %Int32x4FromUint32x4Bits(o); +} + +function Int32x4FromInt16x8BitsJS(o){ +return %Int32x4FromInt16x8Bits(o); +} + +function Int32x4FromUint16x8BitsJS(o){ +return %Int32x4FromUint16x8Bits(o); +} + +function Int32x4FromInt8x16BitsJS(o){ +return %Int32x4FromInt8x16Bits(o); +} + +function Int32x4FromUint8x16BitsJS(o){ +return %Int32x4FromUint8x16Bits(o); +} + +function Uint32x4FromFloat32x4BitsJS(o){ +return %Uint32x4FromFloat32x4Bits(o); +} + +function Uint32x4FromInt32x4BitsJS(o){ +return %Uint32x4FromInt32x4Bits(o); +} + +function Uint32x4FromInt16x8BitsJS(o){ +return %Uint32x4FromInt16x8Bits(o); +} + +function Uint32x4FromUint16x8BitsJS(o){ +return %Uint32x4FromUint16x8Bits(o); +} + +function Uint32x4FromInt8x16BitsJS(o){ +return %Uint32x4FromInt8x16Bits(o); +} + +function Uint32x4FromUint8x16BitsJS(o){ +return %Uint32x4FromUint8x16Bits(o); +} + +function Int16x8FromFloat32x4BitsJS(o){ +return %Int16x8FromFloat32x4Bits(o); +} + +function Int16x8FromInt32x4BitsJS(o){ +return %Int16x8FromInt32x4Bits(o); +} + +function Int16x8FromUint32x4BitsJS(o){ +return %Int16x8FromUint32x4Bits(o); +} + +function Int16x8FromUint16x8BitsJS(o){ +return %Int16x8FromUint16x8Bits(o); +} + +function Int16x8FromInt8x16BitsJS(o){ +return %Int16x8FromInt8x16Bits(o); +} + +function Int16x8FromUint8x16BitsJS(o){ +return %Int16x8FromUint8x16Bits(o); +} + +function Uint16x8FromFloat32x4BitsJS(o){ +return %Uint16x8FromFloat32x4Bits(o); +} + +function Uint16x8FromInt32x4BitsJS(o){ +return %Uint16x8FromInt32x4Bits(o); +} + +function Uint16x8FromUint32x4BitsJS(o){ +return %Uint16x8FromUint32x4Bits(o); +} + +function Uint16x8FromInt16x8BitsJS(o){ +return %Uint16x8FromInt16x8Bits(o); +} + +function Uint16x8FromInt8x16BitsJS(o){ +return %Uint16x8FromInt8x16Bits(o); +} + +function Uint16x8FromUint8x16BitsJS(o){ +return %Uint16x8FromUint8x16Bits(o); +} + +function Int8x16FromFloat32x4BitsJS(o){ +return %Int8x16FromFloat32x4Bits(o); +} + +function Int8x16FromInt32x4BitsJS(o){ +return %Int8x16FromInt32x4Bits(o); +} + +function Int8x16FromUint32x4BitsJS(o){ +return %Int8x16FromUint32x4Bits(o); +} + +function Int8x16FromInt16x8BitsJS(o){ +return %Int8x16FromInt16x8Bits(o); +} + +function Int8x16FromUint16x8BitsJS(o){ +return %Int8x16FromUint16x8Bits(o); +} + +function Int8x16FromUint8x16BitsJS(o){ +return %Int8x16FromUint8x16Bits(o); +} + +function Uint8x16FromFloat32x4BitsJS(o){ +return %Uint8x16FromFloat32x4Bits(o); +} + +function Uint8x16FromInt32x4BitsJS(o){ +return %Uint8x16FromInt32x4Bits(o); +} + +function Uint8x16FromUint32x4BitsJS(o){ +return %Uint8x16FromUint32x4Bits(o); +} + +function Uint8x16FromInt16x8BitsJS(o){ +return %Uint8x16FromInt16x8Bits(o); +} + +function Uint8x16FromUint16x8BitsJS(o){ +return %Uint8x16FromUint16x8Bits(o); +} + +function Uint8x16FromInt8x16BitsJS(o){ +return %Uint8x16FromInt8x16Bits(o); +} + + +function Float32x4Load1JS(y,z){ +return %Float32x4Load1(y,z); +} +function Float32x4Store1JS(y,z,o){ +return %Float32x4Store1(y,z,o); +} + +function Float32x4Load2JS(y,z){ +return %Float32x4Load2(y,z); +} +function Float32x4Store2JS(y,z,o){ +return %Float32x4Store2(y,z,o); +} + +function Float32x4Load3JS(y,z){ +return %Float32x4Load3(y,z); +} +function Float32x4Store3JS(y,z,o){ +return %Float32x4Store3(y,z,o); +} + +function Int32x4Load1JS(y,z){ +return %Int32x4Load1(y,z); +} +function Int32x4Store1JS(y,z,o){ +return %Int32x4Store1(y,z,o); +} + +function Int32x4Load2JS(y,z){ +return %Int32x4Load2(y,z); +} +function Int32x4Store2JS(y,z,o){ +return %Int32x4Store2(y,z,o); +} + +function Int32x4Load3JS(y,z){ +return %Int32x4Load3(y,z); +} +function Int32x4Store3JS(y,z,o){ +return %Int32x4Store3(y,z,o); +} + +function Uint32x4Load1JS(y,z){ +return %Uint32x4Load1(y,z); +} +function Uint32x4Store1JS(y,z,o){ +return %Uint32x4Store1(y,z,o); +} + +function Uint32x4Load2JS(y,z){ +return %Uint32x4Load2(y,z); +} +function Uint32x4Store2JS(y,z,o){ +return %Uint32x4Store2(y,z,o); +} + +function Uint32x4Load3JS(y,z){ +return %Uint32x4Load3(y,z); +} +function Uint32x4Store3JS(y,z,o){ +return %Uint32x4Store3(y,z,o); +} + + +function Float32x4Splat(w){ +return %CreateFloat32x4(w,w,w,w); +} +function Float32x4SwizzleJS(o,A,B,C,D){ +return %Float32x4Swizzle(o,A,B,C,D); +} +function Float32x4ShuffleJS(o,v,A,B,C,D){ +return %Float32x4Shuffle(o,v,A,B,C,D); +} + +function Int32x4Splat(w){ +return %CreateInt32x4(w,w,w,w); +} +function Int32x4SwizzleJS(o,A,B,C,D){ +return %Int32x4Swizzle(o,A,B,C,D); +} +function Int32x4ShuffleJS(o,v,A,B,C,D){ +return %Int32x4Shuffle(o,v,A,B,C,D); +} + +function Uint32x4Splat(w){ +return %CreateUint32x4(w,w,w,w); +} +function Uint32x4SwizzleJS(o,A,B,C,D){ +return %Uint32x4Swizzle(o,A,B,C,D); +} +function Uint32x4ShuffleJS(o,v,A,B,C,D){ +return %Uint32x4Shuffle(o,v,A,B,C,D); +} + +function Bool32x4Splat(w){ +return %CreateBool32x4(w,w,w,w); +} +function Bool32x4SwizzleJS(o,A,B,C,D){ +return %Bool32x4Swizzle(o,A,B,C,D); +} +function Bool32x4ShuffleJS(o,v,A,B,C,D){ +return %Bool32x4Shuffle(o,v,A,B,C,D); +} + + +function Int16x8Splat(w){ +return %CreateInt16x8(w,w,w,w,w,w,w,w); +} +function Int16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ +return %Int16x8Swizzle(o,A,B,C,D,E,F,G,H); +} +function Int16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ +return %Int16x8Shuffle(o,v,A,B,C,D,E,F,G,H); +} + +function Uint16x8Splat(w){ +return %CreateUint16x8(w,w,w,w,w,w,w,w); +} +function Uint16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ +return %Uint16x8Swizzle(o,A,B,C,D,E,F,G,H); +} +function Uint16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ +return %Uint16x8Shuffle(o,v,A,B,C,D,E,F,G,H); +} + +function Bool16x8Splat(w){ +return %CreateBool16x8(w,w,w,w,w,w,w,w); +} +function Bool16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ +return %Bool16x8Swizzle(o,A,B,C,D,E,F,G,H); +} +function Bool16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ +return %Bool16x8Shuffle(o,v,A,B,C,D,E,F,G,H); +} + + +function Int8x16Splat(w){ +return %CreateInt8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); +} +function Int8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15){ +return %Int8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15); +} +function Int8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, +c11,c12,c13,c14,c15){ +return %Int8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, +c11,c12,c13,c14,c15); +} + +function Uint8x16Splat(w){ +return %CreateUint8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); +} +function Uint8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15){ +return %Uint8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15); +} +function Uint8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, +c11,c12,c13,c14,c15){ +return %Uint8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, +c11,c12,c13,c14,c15); +} + +function Bool8x16Splat(w){ +return %CreateBool8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); +} +function Bool8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15){ +return %Bool8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15); +} +function Bool8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, +c11,c12,c13,c14,c15){ +return %Bool8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, +c11,c12,c13,c14,c15); +} + + +function Float32x4Constructor(A,B,C,D){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Float32x4"); +} +return %CreateFloat32x4((%_ToNumber(A)),(%_ToNumber(B)), +(%_ToNumber(C)),(%_ToNumber(D))); +} +function Int32x4Constructor(A,B,C,D){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Int32x4"); +} +return %CreateInt32x4((%_ToNumber(A)),(%_ToNumber(B)), +(%_ToNumber(C)),(%_ToNumber(D))); +} +function Uint32x4Constructor(A,B,C,D){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Uint32x4"); +} +return %CreateUint32x4((%_ToNumber(A)),(%_ToNumber(B)), +(%_ToNumber(C)),(%_ToNumber(D))); +} +function Bool32x4Constructor(A,B,C,D){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Bool32x4"); +} +return %CreateBool32x4(A,B,C,D); +} +function Int16x8Constructor(A,B,C,D,E,F,G,H){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Int16x8"); +} +return %CreateInt16x8((%_ToNumber(A)),(%_ToNumber(B)), +(%_ToNumber(C)),(%_ToNumber(D)), +(%_ToNumber(E)),(%_ToNumber(F)), +(%_ToNumber(G)),(%_ToNumber(H))); +} +function Uint16x8Constructor(A,B,C,D,E,F,G,H){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Uint16x8"); +} +return %CreateUint16x8((%_ToNumber(A)),(%_ToNumber(B)), +(%_ToNumber(C)),(%_ToNumber(D)), +(%_ToNumber(E)),(%_ToNumber(F)), +(%_ToNumber(G)),(%_ToNumber(H))); +} +function Bool16x8Constructor(A,B,C,D,E,F,G,H){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Bool16x8"); +} +return %CreateBool16x8(A,B,C,D,E,F,G,H); +} +function Int8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Int8x16"); +} +return %CreateInt8x16((%_ToNumber(A)),(%_ToNumber(B)), +(%_ToNumber(C)),(%_ToNumber(D)), +(%_ToNumber(E)),(%_ToNumber(F)), +(%_ToNumber(G)),(%_ToNumber(H)), +(%_ToNumber(c8)),(%_ToNumber(c9)), +(%_ToNumber(c10)),(%_ToNumber(c11)), +(%_ToNumber(c12)),(%_ToNumber(c13)), +(%_ToNumber(c14)),(%_ToNumber(c15))); +} +function Uint8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Uint8x16"); +} +return %CreateUint8x16((%_ToNumber(A)),(%_ToNumber(B)), +(%_ToNumber(C)),(%_ToNumber(D)), +(%_ToNumber(E)),(%_ToNumber(F)), +(%_ToNumber(G)),(%_ToNumber(H)), +(%_ToNumber(c8)),(%_ToNumber(c9)), +(%_ToNumber(c10)),(%_ToNumber(c11)), +(%_ToNumber(c12)),(%_ToNumber(c13)), +(%_ToNumber(c14)),(%_ToNumber(c15))); +} +function Bool8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, +c12,c13,c14,c15){ +if(!(new.target===(void 0))){ +throw %make_type_error(66,"Bool8x16"); +} +return %CreateBool8x16(A,B,C,D,E,F,G,H,c8,c9,c10,c11,c12, +c13,c14,c15); +} +function Float32x4AbsJS(o){ +return %Float32x4Abs(o); +} +function Float32x4SqrtJS(o){ +return %Float32x4Sqrt(o); +} +function Float32x4RecipApproxJS(o){ +return %Float32x4RecipApprox(o); +} +function Float32x4RecipSqrtApproxJS(o){ +return %Float32x4RecipSqrtApprox(o); +} +function Float32x4DivJS(o,v){ +return %Float32x4Div(o,v); +} +function Float32x4MinNumJS(o,v){ +return %Float32x4MinNum(o,v); +} +function Float32x4MaxNumJS(o,v){ +return %Float32x4MaxNum(o,v); +} +%AddNamedProperty(c,d,'SIMD',1|2); +%SetCode(e,Float32x4Constructor); +%FunctionSetPrototype(e,{}); +%AddNamedProperty(e.prototype,'constructor',e, +2); +%AddNamedProperty(e.prototype,d,'Float32x4', +2|1); +b.InstallFunctions(e.prototype,2,[ +'toLocaleString',Float32x4ToLocaleString, +'toString',Float32x4ToString, +'valueOf',Float32x4ValueOf, +]); + + +%SetCode(f,Int32x4Constructor); +%FunctionSetPrototype(f,{}); +%AddNamedProperty(f.prototype,'constructor',f, +2); +%AddNamedProperty(f.prototype,d,'Int32x4', +2|1); +b.InstallFunctions(f.prototype,2,[ +'toLocaleString',Int32x4ToLocaleString, +'toString',Int32x4ToString, +'valueOf',Int32x4ValueOf, +]); + +%SetCode(g,Int16x8Constructor); +%FunctionSetPrototype(g,{}); +%AddNamedProperty(g.prototype,'constructor',g, +2); +%AddNamedProperty(g.prototype,d,'Int16x8', +2|1); +b.InstallFunctions(g.prototype,2,[ +'toLocaleString',Int16x8ToLocaleString, +'toString',Int16x8ToString, +'valueOf',Int16x8ValueOf, +]); + +%SetCode(h,Int8x16Constructor); +%FunctionSetPrototype(h,{}); +%AddNamedProperty(h.prototype,'constructor',h, +2); +%AddNamedProperty(h.prototype,d,'Int8x16', +2|1); +b.InstallFunctions(h.prototype,2,[ +'toLocaleString',Int8x16ToLocaleString, +'toString',Int8x16ToString, +'valueOf',Int8x16ValueOf, +]); + + +%SetCode(i,Uint32x4Constructor); +%FunctionSetPrototype(i,{}); +%AddNamedProperty(i.prototype,'constructor',i, +2); +%AddNamedProperty(i.prototype,d,'Uint32x4', +2|1); +b.InstallFunctions(i.prototype,2,[ +'toLocaleString',Uint32x4ToLocaleString, +'toString',Uint32x4ToString, +'valueOf',Uint32x4ValueOf, +]); + +%SetCode(j,Uint16x8Constructor); +%FunctionSetPrototype(j,{}); +%AddNamedProperty(j.prototype,'constructor',j, +2); +%AddNamedProperty(j.prototype,d,'Uint16x8', +2|1); +b.InstallFunctions(j.prototype,2,[ +'toLocaleString',Uint16x8ToLocaleString, +'toString',Uint16x8ToString, +'valueOf',Uint16x8ValueOf, +]); + +%SetCode(k,Uint8x16Constructor); +%FunctionSetPrototype(k,{}); +%AddNamedProperty(k.prototype,'constructor',k, +2); +%AddNamedProperty(k.prototype,d,'Uint8x16', +2|1); +b.InstallFunctions(k.prototype,2,[ +'toLocaleString',Uint8x16ToLocaleString, +'toString',Uint8x16ToString, +'valueOf',Uint8x16ValueOf, +]); + + +%SetCode(l,Bool32x4Constructor); +%FunctionSetPrototype(l,{}); +%AddNamedProperty(l.prototype,'constructor',l, +2); +%AddNamedProperty(l.prototype,d,'Bool32x4', +2|1); +b.InstallFunctions(l.prototype,2,[ +'toLocaleString',Bool32x4ToLocaleString, +'toString',Bool32x4ToString, +'valueOf',Bool32x4ValueOf, +]); + +%SetCode(m,Bool16x8Constructor); +%FunctionSetPrototype(m,{}); +%AddNamedProperty(m.prototype,'constructor',m, +2); +%AddNamedProperty(m.prototype,d,'Bool16x8', +2|1); +b.InstallFunctions(m.prototype,2,[ +'toLocaleString',Bool16x8ToLocaleString, +'toString',Bool16x8ToString, +'valueOf',Bool16x8ValueOf, +]); + +%SetCode(n,Bool8x16Constructor); +%FunctionSetPrototype(n,{}); +%AddNamedProperty(n.prototype,'constructor',n, +2); +%AddNamedProperty(n.prototype,d,'Bool8x16', +2|1); +b.InstallFunctions(n.prototype,2,[ +'toLocaleString',Bool8x16ToLocaleString, +'toString',Bool8x16ToString, +'valueOf',Bool8x16ValueOf, +]); + + + +b.InstallFunctions(e,2,[ +'splat',Float32x4Splat, +'check',Float32x4CheckJS, +'extractLane',Float32x4ExtractLaneJS, +'replaceLane',Float32x4ReplaceLaneJS, +'neg',Float32x4NegJS, +'abs',Float32x4AbsJS, +'sqrt',Float32x4SqrtJS, +'reciprocalApproximation',Float32x4RecipApproxJS, +'reciprocalSqrtApproximation',Float32x4RecipSqrtApproxJS, +'add',Float32x4AddJS, +'sub',Float32x4SubJS, +'mul',Float32x4MulJS, +'div',Float32x4DivJS, +'min',Float32x4MinJS, +'max',Float32x4MaxJS, +'minNum',Float32x4MinNumJS, +'maxNum',Float32x4MaxNumJS, +'lessThan',Float32x4LessThanJS, +'lessThanOrEqual',Float32x4LessThanOrEqualJS, +'greaterThan',Float32x4GreaterThanJS, +'greaterThanOrEqual',Float32x4GreaterThanOrEqualJS, +'equal',Float32x4EqualJS, +'notEqual',Float32x4NotEqualJS, +'select',Float32x4SelectJS, +'swizzle',Float32x4SwizzleJS, +'shuffle',Float32x4ShuffleJS, +'fromInt32x4',Float32x4FromInt32x4JS, +'fromUint32x4',Float32x4FromUint32x4JS, +'fromInt32x4Bits',Float32x4FromInt32x4BitsJS, +'fromUint32x4Bits',Float32x4FromUint32x4BitsJS, +'fromInt16x8Bits',Float32x4FromInt16x8BitsJS, +'fromUint16x8Bits',Float32x4FromUint16x8BitsJS, +'fromInt8x16Bits',Float32x4FromInt8x16BitsJS, +'fromUint8x16Bits',Float32x4FromUint8x16BitsJS, +'load',Float32x4LoadJS, +'load1',Float32x4Load1JS, +'load2',Float32x4Load2JS, +'load3',Float32x4Load3JS, +'store',Float32x4StoreJS, +'store1',Float32x4Store1JS, +'store2',Float32x4Store2JS, +'store3',Float32x4Store3JS, +]); +b.InstallFunctions(f,2,[ +'splat',Int32x4Splat, +'check',Int32x4CheckJS, +'extractLane',Int32x4ExtractLaneJS, +'replaceLane',Int32x4ReplaceLaneJS, +'neg',Int32x4NegJS, +'add',Int32x4AddJS, +'sub',Int32x4SubJS, +'mul',Int32x4MulJS, +'min',Int32x4MinJS, +'max',Int32x4MaxJS, +'and',Int32x4AndJS, +'or',Int32x4OrJS, +'xor',Int32x4XorJS, +'not',Int32x4NotJS, +'shiftLeftByScalar',Int32x4ShiftLeftByScalarJS, +'shiftRightByScalar',Int32x4ShiftRightByScalarJS, +'lessThan',Int32x4LessThanJS, +'lessThanOrEqual',Int32x4LessThanOrEqualJS, +'greaterThan',Int32x4GreaterThanJS, +'greaterThanOrEqual',Int32x4GreaterThanOrEqualJS, +'equal',Int32x4EqualJS, +'notEqual',Int32x4NotEqualJS, +'select',Int32x4SelectJS, +'swizzle',Int32x4SwizzleJS, +'shuffle',Int32x4ShuffleJS, +'fromFloat32x4',Int32x4FromFloat32x4JS, +'fromUint32x4',Int32x4FromUint32x4JS, +'fromFloat32x4Bits',Int32x4FromFloat32x4BitsJS, +'fromUint32x4Bits',Int32x4FromUint32x4BitsJS, +'fromInt16x8Bits',Int32x4FromInt16x8BitsJS, +'fromUint16x8Bits',Int32x4FromUint16x8BitsJS, +'fromInt8x16Bits',Int32x4FromInt8x16BitsJS, +'fromUint8x16Bits',Int32x4FromUint8x16BitsJS, +'load',Int32x4LoadJS, +'load1',Int32x4Load1JS, +'load2',Int32x4Load2JS, +'load3',Int32x4Load3JS, +'store',Int32x4StoreJS, +'store1',Int32x4Store1JS, +'store2',Int32x4Store2JS, +'store3',Int32x4Store3JS, +]); +b.InstallFunctions(i,2,[ +'splat',Uint32x4Splat, +'check',Uint32x4CheckJS, +'extractLane',Uint32x4ExtractLaneJS, +'replaceLane',Uint32x4ReplaceLaneJS, +'add',Uint32x4AddJS, +'sub',Uint32x4SubJS, +'mul',Uint32x4MulJS, +'min',Uint32x4MinJS, +'max',Uint32x4MaxJS, +'and',Uint32x4AndJS, +'or',Uint32x4OrJS, +'xor',Uint32x4XorJS, +'not',Uint32x4NotJS, +'shiftLeftByScalar',Uint32x4ShiftLeftByScalarJS, +'shiftRightByScalar',Uint32x4ShiftRightByScalarJS, +'lessThan',Uint32x4LessThanJS, +'lessThanOrEqual',Uint32x4LessThanOrEqualJS, +'greaterThan',Uint32x4GreaterThanJS, +'greaterThanOrEqual',Uint32x4GreaterThanOrEqualJS, +'equal',Uint32x4EqualJS, +'notEqual',Uint32x4NotEqualJS, +'select',Uint32x4SelectJS, +'swizzle',Uint32x4SwizzleJS, +'shuffle',Uint32x4ShuffleJS, +'fromFloat32x4',Uint32x4FromFloat32x4JS, +'fromInt32x4',Uint32x4FromInt32x4JS, +'fromFloat32x4Bits',Uint32x4FromFloat32x4BitsJS, +'fromInt32x4Bits',Uint32x4FromInt32x4BitsJS, +'fromInt16x8Bits',Uint32x4FromInt16x8BitsJS, +'fromUint16x8Bits',Uint32x4FromUint16x8BitsJS, +'fromInt8x16Bits',Uint32x4FromInt8x16BitsJS, +'fromUint8x16Bits',Uint32x4FromUint8x16BitsJS, +'load',Uint32x4LoadJS, +'load1',Uint32x4Load1JS, +'load2',Uint32x4Load2JS, +'load3',Uint32x4Load3JS, +'store',Uint32x4StoreJS, +'store1',Uint32x4Store1JS, +'store2',Uint32x4Store2JS, +'store3',Uint32x4Store3JS, +]); +b.InstallFunctions(l,2,[ +'splat',Bool32x4Splat, +'check',Bool32x4CheckJS, +'extractLane',Bool32x4ExtractLaneJS, +'replaceLane',Bool32x4ReplaceLaneJS, +'and',Bool32x4AndJS, +'or',Bool32x4OrJS, +'xor',Bool32x4XorJS, +'not',Bool32x4NotJS, +'anyTrue',Bool32x4AnyTrueJS, +'allTrue',Bool32x4AllTrueJS, +'swizzle',Bool32x4SwizzleJS, +'shuffle',Bool32x4ShuffleJS, +]); +b.InstallFunctions(g,2,[ +'splat',Int16x8Splat, +'check',Int16x8CheckJS, +'extractLane',Int16x8ExtractLaneJS, +'replaceLane',Int16x8ReplaceLaneJS, +'neg',Int16x8NegJS, +'add',Int16x8AddJS, +'sub',Int16x8SubJS, +'addSaturate',Int16x8AddSaturateJS, +'subSaturate',Int16x8SubSaturateJS, +'mul',Int16x8MulJS, +'min',Int16x8MinJS, +'max',Int16x8MaxJS, +'and',Int16x8AndJS, +'or',Int16x8OrJS, +'xor',Int16x8XorJS, +'not',Int16x8NotJS, +'shiftLeftByScalar',Int16x8ShiftLeftByScalarJS, +'shiftRightByScalar',Int16x8ShiftRightByScalarJS, +'lessThan',Int16x8LessThanJS, +'lessThanOrEqual',Int16x8LessThanOrEqualJS, +'greaterThan',Int16x8GreaterThanJS, +'greaterThanOrEqual',Int16x8GreaterThanOrEqualJS, +'equal',Int16x8EqualJS, +'notEqual',Int16x8NotEqualJS, +'select',Int16x8SelectJS, +'swizzle',Int16x8SwizzleJS, +'shuffle',Int16x8ShuffleJS, +'fromUint16x8',Int16x8FromUint16x8JS, +'fromFloat32x4Bits',Int16x8FromFloat32x4BitsJS, +'fromInt32x4Bits',Int16x8FromInt32x4BitsJS, +'fromUint32x4Bits',Int16x8FromUint32x4BitsJS, +'fromUint16x8Bits',Int16x8FromUint16x8BitsJS, +'fromInt8x16Bits',Int16x8FromInt8x16BitsJS, +'fromUint8x16Bits',Int16x8FromUint8x16BitsJS, +'load',Int16x8LoadJS, +'store',Int16x8StoreJS, +]); +b.InstallFunctions(j,2,[ +'splat',Uint16x8Splat, +'check',Uint16x8CheckJS, +'extractLane',Uint16x8ExtractLaneJS, +'replaceLane',Uint16x8ReplaceLaneJS, +'add',Uint16x8AddJS, +'sub',Uint16x8SubJS, +'addSaturate',Uint16x8AddSaturateJS, +'subSaturate',Uint16x8SubSaturateJS, +'mul',Uint16x8MulJS, +'min',Uint16x8MinJS, +'max',Uint16x8MaxJS, +'and',Uint16x8AndJS, +'or',Uint16x8OrJS, +'xor',Uint16x8XorJS, +'not',Uint16x8NotJS, +'shiftLeftByScalar',Uint16x8ShiftLeftByScalarJS, +'shiftRightByScalar',Uint16x8ShiftRightByScalarJS, +'lessThan',Uint16x8LessThanJS, +'lessThanOrEqual',Uint16x8LessThanOrEqualJS, +'greaterThan',Uint16x8GreaterThanJS, +'greaterThanOrEqual',Uint16x8GreaterThanOrEqualJS, +'equal',Uint16x8EqualJS, +'notEqual',Uint16x8NotEqualJS, +'select',Uint16x8SelectJS, +'swizzle',Uint16x8SwizzleJS, +'shuffle',Uint16x8ShuffleJS, +'fromInt16x8',Uint16x8FromInt16x8JS, +'fromFloat32x4Bits',Uint16x8FromFloat32x4BitsJS, +'fromInt32x4Bits',Uint16x8FromInt32x4BitsJS, +'fromUint32x4Bits',Uint16x8FromUint32x4BitsJS, +'fromInt16x8Bits',Uint16x8FromInt16x8BitsJS, +'fromInt8x16Bits',Uint16x8FromInt8x16BitsJS, +'fromUint8x16Bits',Uint16x8FromUint8x16BitsJS, +'load',Uint16x8LoadJS, +'store',Uint16x8StoreJS, +]); +b.InstallFunctions(m,2,[ +'splat',Bool16x8Splat, +'check',Bool16x8CheckJS, +'extractLane',Bool16x8ExtractLaneJS, +'replaceLane',Bool16x8ReplaceLaneJS, +'and',Bool16x8AndJS, +'or',Bool16x8OrJS, +'xor',Bool16x8XorJS, +'not',Bool16x8NotJS, +'anyTrue',Bool16x8AnyTrueJS, +'allTrue',Bool16x8AllTrueJS, +'swizzle',Bool16x8SwizzleJS, +'shuffle',Bool16x8ShuffleJS, +]); +b.InstallFunctions(h,2,[ +'splat',Int8x16Splat, +'check',Int8x16CheckJS, +'extractLane',Int8x16ExtractLaneJS, +'replaceLane',Int8x16ReplaceLaneJS, +'neg',Int8x16NegJS, +'add',Int8x16AddJS, +'sub',Int8x16SubJS, +'addSaturate',Int8x16AddSaturateJS, +'subSaturate',Int8x16SubSaturateJS, +'mul',Int8x16MulJS, +'min',Int8x16MinJS, +'max',Int8x16MaxJS, +'and',Int8x16AndJS, +'or',Int8x16OrJS, +'xor',Int8x16XorJS, +'not',Int8x16NotJS, +'shiftLeftByScalar',Int8x16ShiftLeftByScalarJS, +'shiftRightByScalar',Int8x16ShiftRightByScalarJS, +'lessThan',Int8x16LessThanJS, +'lessThanOrEqual',Int8x16LessThanOrEqualJS, +'greaterThan',Int8x16GreaterThanJS, +'greaterThanOrEqual',Int8x16GreaterThanOrEqualJS, +'equal',Int8x16EqualJS, +'notEqual',Int8x16NotEqualJS, +'select',Int8x16SelectJS, +'swizzle',Int8x16SwizzleJS, +'shuffle',Int8x16ShuffleJS, +'fromUint8x16',Int8x16FromUint8x16JS, +'fromFloat32x4Bits',Int8x16FromFloat32x4BitsJS, +'fromInt32x4Bits',Int8x16FromInt32x4BitsJS, +'fromUint32x4Bits',Int8x16FromUint32x4BitsJS, +'fromInt16x8Bits',Int8x16FromInt16x8BitsJS, +'fromUint16x8Bits',Int8x16FromUint16x8BitsJS, +'fromUint8x16Bits',Int8x16FromUint8x16BitsJS, +'load',Int8x16LoadJS, +'store',Int8x16StoreJS, +]); +b.InstallFunctions(k,2,[ +'splat',Uint8x16Splat, +'check',Uint8x16CheckJS, +'extractLane',Uint8x16ExtractLaneJS, +'replaceLane',Uint8x16ReplaceLaneJS, +'add',Uint8x16AddJS, +'sub',Uint8x16SubJS, +'addSaturate',Uint8x16AddSaturateJS, +'subSaturate',Uint8x16SubSaturateJS, +'mul',Uint8x16MulJS, +'min',Uint8x16MinJS, +'max',Uint8x16MaxJS, +'and',Uint8x16AndJS, +'or',Uint8x16OrJS, +'xor',Uint8x16XorJS, +'not',Uint8x16NotJS, +'shiftLeftByScalar',Uint8x16ShiftLeftByScalarJS, +'shiftRightByScalar',Uint8x16ShiftRightByScalarJS, +'lessThan',Uint8x16LessThanJS, +'lessThanOrEqual',Uint8x16LessThanOrEqualJS, +'greaterThan',Uint8x16GreaterThanJS, +'greaterThanOrEqual',Uint8x16GreaterThanOrEqualJS, +'equal',Uint8x16EqualJS, +'notEqual',Uint8x16NotEqualJS, +'select',Uint8x16SelectJS, +'swizzle',Uint8x16SwizzleJS, +'shuffle',Uint8x16ShuffleJS, +'fromInt8x16',Uint8x16FromInt8x16JS, +'fromFloat32x4Bits',Uint8x16FromFloat32x4BitsJS, +'fromInt32x4Bits',Uint8x16FromInt32x4BitsJS, +'fromUint32x4Bits',Uint8x16FromUint32x4BitsJS, +'fromInt16x8Bits',Uint8x16FromInt16x8BitsJS, +'fromUint16x8Bits',Uint8x16FromUint16x8BitsJS, +'fromInt8x16Bits',Uint8x16FromInt8x16BitsJS, +'load',Uint8x16LoadJS, +'store',Uint8x16StoreJS, +]); +b.InstallFunctions(n,2,[ +'splat',Bool8x16Splat, +'check',Bool8x16CheckJS, +'extractLane',Bool8x16ExtractLaneJS, +'replaceLane',Bool8x16ReplaceLaneJS, +'and',Bool8x16AndJS, +'or',Bool8x16OrJS, +'xor',Bool8x16XorJS, +'not',Bool8x16NotJS, +'anyTrue',Bool8x16AnyTrueJS, +'allTrue',Bool8x16AllTrueJS, +'swizzle',Bool8x16SwizzleJS, +'shuffle',Bool8x16ShuffleJS, +]); +}) + +`datetime-format-to-partsé +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.Intl; +var d=b.ImportNow("FormatDateToParts"); +b.InstallFunctions(c.DateTimeFormat.prototype,2,[ +'formatToParts',d +]); +}) + +@icu-case-mapping± +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.String; +var d=b.OverrideFunction; +var e=b.ImportNow("ToLowerCaseI18N"); +var f=b.ImportNow("ToUpperCaseI18N"); +var g=b.ImportNow("ToLocaleLowerCaseI18N"); +var h=b.ImportNow("ToLocaleUpperCaseI18N"); +d(c.prototype,'toLowerCase',e,true); +d(c.prototype,'toUpperCase',f,true); +d(c.prototype,'toLocaleLowerCase', +g,true); +d(c.prototype,'toLocaleUpperCase', +h,true); +}) + +4CommonStringsI +(function(global, binding, v8) { + 'use strict'; + binding.streamErrors = { + illegalInvocation: 'Illegal invocation', + illegalConstructor: 'Illegal constructor', + invalidType: 'Invalid type is specified', + invalidSize: 'The return value of a queuing strategy\'s size function must be a finite, non-NaN, non-negative number', + sizeNotAFunction: 'A queuing strategy\'s size property must be a function', + invalidHWM: 'A queueing strategy\'s highWaterMark property must be a nonnegative, non-NaN number', + }; +}); +dByteLengthQueuingStrategyÑ +(function(global, binding, v8) { + 'use strict'; + const defineProperty = global.Object.defineProperty; + class ByteLengthQueuingStrategy { + constructor(options) { + defineProperty(this, 'highWaterMark', { + value: options.highWaterMark, + enumerable: true, + configurable: true, + writable: true + }); + } + size(chunk) { return chunk.byteLength; } + } + defineProperty(global, 'ByteLengthQueuingStrategy', { + value: ByteLengthQueuingStrategy, + enumerable: false, + configurable: true, + writable: true + }); +}); +PCountQueuingStrategyý +(function(global, binding, v8) { + 'use strict'; + const defineProperty = global.Object.defineProperty; + class CountQueuingStrategy { + constructor(options) { + defineProperty(this, 'highWaterMark', { + value: options.highWaterMark, + enumerable: true, + configurable: true, + writable: true + }); + } + size(chunk) { return 1; } + } + defineProperty(global, 'CountQueuingStrategy', { + value: CountQueuingStrategy, + enumerable: false, + configurable: true, + writable: true + }); + class BuiltInCountQueuingStrategy { + constructor(highWaterMark) { + defineProperty(this, 'highWaterMark', {value: highWaterMark}); + } + size(chunk) { return 1; } + } + binding.createBuiltInCountQueuingStrategy = highWaterMark => + new BuiltInCountQueuingStrategy(highWaterMark); +}); +8ReadableStreamr´ +(function(global, binding, v8) { + 'use strict'; + const _reader = v8.createPrivateSymbol('[[reader]]'); + const _storedError = v8.createPrivateSymbol('[[storedError]]'); + const _controller = v8.createPrivateSymbol('[[controller]]'); + const _closedPromise = v8.createPrivateSymbol('[[closedPromise]]'); + const _ownerReadableStream = + v8.createPrivateSymbol('[[ownerReadableStream]]'); + const _readRequests = v8.createPrivateSymbol('[[readRequests]]'); + const createWithExternalControllerSentinel = + v8.createPrivateSymbol('flag for UA-created ReadableStream to pass'); + const _readableStreamBits = v8.createPrivateSymbol('bit field for [[state]] and [[disturbed]]'); + const DISTURBED = 0b1; + const STATE_MASK = 0b110; + const STATE_BITS_OFFSET = 1; + const STATE_READABLE = 0; + const STATE_CLOSED = 1; + const STATE_ERRORED = 2; + const _underlyingSource = v8.createPrivateSymbol('[[underlyingSource]]'); + const _controlledReadableStream = + v8.createPrivateSymbol('[[controlledReadableStream]]'); + const _queue = v8.createPrivateSymbol('[[queue]]'); + const _totalQueuedSize = v8.createPrivateSymbol('[[totalQueuedSize]]'); + const _strategySize = v8.createPrivateSymbol('[[strategySize]]'); + const _strategyHWM = v8.createPrivateSymbol('[[strategyHWM]]'); + const _readableStreamDefaultControllerBits = v8.createPrivateSymbol( + 'bit field for [[started]], [[closeRequested]], [[pulling]], [[pullAgain]]'); + const STARTED = 0b1; + const CLOSE_REQUESTED = 0b10; + const PULLING = 0b100; + const PULL_AGAIN = 0b1000; + const EXTERNALLY_CONTROLLED = 0b10000; + const undefined = global.undefined; + const Infinity = global.Infinity; + const defineProperty = global.Object.defineProperty; + const hasOwnProperty = v8.uncurryThis(global.Object.hasOwnProperty); + const callFunction = v8.uncurryThis(global.Function.prototype.call); + const TypeError = global.TypeError; + const RangeError = global.RangeError; + const Number = global.Number; + const Number_isNaN = Number.isNaN; + const Number_isFinite = Number.isFinite; + const Promise = global.Promise; + const thenPromise = v8.uncurryThis(Promise.prototype.then); + const Promise_resolve = v8.simpleBind(Promise.resolve, Promise); + const Promise_reject = v8.simpleBind(Promise.reject, Promise); + const streamErrors = binding.streamErrors; + const errCancelLockedStream = + 'Cannot cancel a readable stream that is locked to a reader'; + const errEnqueueCloseRequestedStream = + 'Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed'; + const errCancelReleasedReader = + 'This readable stream reader has been released and cannot be used to cancel its previous owner stream'; + const errReadReleasedReader = + 'This readable stream reader has been released and cannot be used to read from its previous owner stream'; + const errCloseCloseRequestedStream = + 'Cannot close a readable stream that has already been requested to be closed'; + const errEnqueueClosedStream = 'Cannot enqueue a chunk into a closed readable stream'; + const errEnqueueErroredStream = 'Cannot enqueue a chunk into an errored readable stream'; + const errCloseClosedStream = 'Cannot close a closed readable stream'; + const errCloseErroredStream = 'Cannot close an errored readable stream'; + const errErrorClosedStream = 'Cannot error a close readable stream'; + const errErrorErroredStream = + 'Cannot error a readable stream that is already errored'; + const errGetReaderNotByteStream = 'This readable stream does not support BYOB readers'; + const errGetReaderBadMode = 'Invalid reader mode given: expected undefined or "byob"'; + const errReaderConstructorBadArgument = + 'ReadableStreamReader constructor argument is not a readable stream'; + const errReaderConstructorStreamAlreadyLocked = + 'ReadableStreamReader constructor can only accept readable streams that are not yet locked to a reader'; + const errReleaseReaderWithPendingRead = + 'Cannot release a readable stream reader when it still has outstanding read() calls that have not yet settled'; + const errReleasedReaderClosedPromise = + 'This readable stream reader has been released and cannot be used to monitor the stream\'s state'; + const errTmplMustBeFunctionOrUndefined = name => + `${name} must be a function or undefined`; + class ReadableStream { + constructor() { + const underlyingSource = arguments[0] === undefined ? {} : arguments[0]; + const strategy = arguments[1] === undefined ? {} : arguments[1]; + const size = strategy.size; + let highWaterMark = strategy.highWaterMark; + if (highWaterMark === undefined) { + highWaterMark = 1; + } + this[_readableStreamBits] = 0b0; + ReadableStreamSetState(this, STATE_READABLE); + this[_reader] = undefined; + this[_storedError] = undefined; + this[_controller] = undefined; + const type = underlyingSource.type; + const typeString = String(type); + if (typeString === 'bytes') { + throw new RangeError('bytes type is not yet implemented'); + } else if (type !== undefined) { + throw new RangeError(streamErrors.invalidType); + } + this[_controller] = + new ReadableStreamDefaultController(this, underlyingSource, size, highWaterMark, arguments[2] === createWithExternalControllerSentinel); + } + get locked() { + if (IsReadableStream(this) === false) { + throw new TypeError(streamErrors.illegalInvocation); + } + return IsReadableStreamLocked(this); + } + cancel(reason) { + if (IsReadableStream(this) === false) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + if (IsReadableStreamLocked(this) === true) { + return Promise_reject(new TypeError(errCancelLockedStream)); + } + return ReadableStreamCancel(this, reason); + } + getReader({ mode } = {}) { + if (IsReadableStream(this) === false) { + throw new TypeError(streamErrors.illegalInvocation); + } + if (mode === 'byob') { + throw new TypeError(errGetReaderNotByteStream); + } + if (mode === undefined) { + return AcquireReadableStreamDefaultReader(this); + } + throw new RangeError(errGetReaderBadMode); + } + tee() { + if (IsReadableStream(this) === false) { + throw new TypeError(streamErrors.illegalInvocation); + } + return ReadableStreamTee(this); + } + } + class ReadableStreamDefaultController { + constructor(stream, underlyingSource, size, highWaterMark, isExternallyControlled) { + if (IsReadableStream(stream) === false) { + throw new TypeError(streamErrors.illegalConstructor); + } + if (stream[_controller] !== undefined) { + throw new TypeError(streamErrors.illegalConstructor); + } + this[_controlledReadableStream] = stream; + this[_underlyingSource] = underlyingSource; + this[_queue] = new v8.InternalPackedArray(); + this[_totalQueuedSize] = 0; + this[_readableStreamDefaultControllerBits] = 0b0; + if (isExternallyControlled === true) { + this[_readableStreamDefaultControllerBits] |= EXTERNALLY_CONTROLLED; + } + const normalizedStrategy = + ValidateAndNormalizeQueuingStrategy(size, highWaterMark); + this[_strategySize] = normalizedStrategy.size; + this[_strategyHWM] = normalizedStrategy.highWaterMark; + const controller = this; + const startResult = CallOrNoop( + underlyingSource, 'start', this, 'underlyingSource.start'); + thenPromise(Promise_resolve(startResult), + () => { + controller[_readableStreamDefaultControllerBits] |= STARTED; + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + }, + r => { + if (ReadableStreamGetState(stream) === STATE_READABLE) { + ReadableStreamDefaultControllerError(controller, r); + } + }); + } + get desiredSize() { + if (IsReadableStreamDefaultController(this) === false) { + throw new TypeError(streamErrors.illegalInvocation); + } + return ReadableStreamDefaultControllerGetDesiredSize(this); + } + close() { + if (IsReadableStreamDefaultController(this) === false) { + throw new TypeError(streamErrors.illegalInvocation); + } + const stream = this[_controlledReadableStream]; + if (this[_readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { + throw new TypeError(errCloseCloseRequestedStream); + } + const state = ReadableStreamGetState(stream); + if (state === STATE_ERRORED) { + throw new TypeError(errCloseErroredStream); + } + if (state === STATE_CLOSED) { + throw new TypeError(errCloseClosedStream); + } + return ReadableStreamDefaultControllerClose(this); + } + enqueue(chunk) { + if (IsReadableStreamDefaultController(this) === false) { + throw new TypeError(streamErrors.illegalInvocation); + } + const stream = this[_controlledReadableStream]; + if (this[_readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { + throw new TypeError(errEnqueueCloseRequestedStream); + } + const state = ReadableStreamGetState(stream); + if (state === STATE_ERRORED) { + throw new TypeError(errEnqueueErroredStream); + } + if (state === STATE_CLOSED) { + throw new TypeError(errEnqueueClosedStream); + } + return ReadableStreamDefaultControllerEnqueue(this, chunk); + } + error(e) { + if (IsReadableStreamDefaultController(this) === false) { + throw new TypeError(streamErrors.illegalInvocation); + } + const stream = this[_controlledReadableStream]; + const state = ReadableStreamGetState(stream); + if (state === STATE_ERRORED) { + throw new TypeError(errErrorErroredStream); + } + if (state === STATE_CLOSED) { + throw new TypeError(errErrorClosedStream); + } + return ReadableStreamDefaultControllerError(this, e); + } + } + function ReadableStreamDefaultControllerCancel(controller, reason) { + controller[_queue] = new v8.InternalPackedArray(); + const underlyingSource = controller[_underlyingSource]; + return PromiseCallOrNoop(underlyingSource, 'cancel', reason, 'underlyingSource.cancel'); + } + function ReadableStreamDefaultControllerPull(controller) { + const stream = controller[_controlledReadableStream]; + if (controller[_queue].length > 0) { + const chunk = DequeueValue(controller); + if ((controller[_readableStreamDefaultControllerBits] & CLOSE_REQUESTED) && + controller[_queue].length === 0) { + ReadableStreamClose(stream); + } else { + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + return Promise_resolve(CreateIterResultObject(chunk, false)); + } + const pendingPromise = ReadableStreamAddReadRequest(stream); + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + return pendingPromise; + } + function ReadableStreamAddReadRequest(stream) { + const promise = v8.createPromise(); + stream[_reader][_readRequests].push(promise); + return promise; + } + class ReadableStreamDefaultReader { + constructor(stream) { + if (IsReadableStream(stream) === false) { + throw new TypeError(errReaderConstructorBadArgument); + } + if (IsReadableStreamLocked(stream) === true) { + throw new TypeError(errReaderConstructorStreamAlreadyLocked); + } + ReadableStreamReaderGenericInitialize(this, stream); + this[_readRequests] = new v8.InternalPackedArray(); + } + get closed() { + if (IsReadableStreamDefaultReader(this) === false) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + return this[_closedPromise]; + } + cancel(reason) { + if (IsReadableStreamDefaultReader(this) === false) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + const stream = this[_ownerReadableStream]; + if (stream === undefined) { + return Promise_reject(new TypeError(errCancelReleasedReader)); + } + return ReadableStreamReaderGenericCancel(this, reason); + } + read() { + if (IsReadableStreamDefaultReader(this) === false) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + if (this[_ownerReadableStream] === undefined) { + return Promise_reject(new TypeError(errReadReleasedReader)); + } + return ReadableStreamDefaultReaderRead(this); + } + releaseLock() { + if (IsReadableStreamDefaultReader(this) === false) { + throw new TypeError(streamErrors.illegalInvocation); + } + const stream = this[_ownerReadableStream]; + if (stream === undefined) { + return undefined; + } + if (this[_readRequests].length > 0) { + throw new TypeError(errReleaseReaderWithPendingRead); + } + ReadableStreamReaderGenericRelease(this); + } + } + function ReadableStreamReaderGenericCancel(reader, reason) { + return ReadableStreamCancel(reader[_ownerReadableStream], reason); + } + function AcquireReadableStreamDefaultReader(stream) { + return new ReadableStreamDefaultReader(stream); + } + function ReadableStreamCancel(stream, reason) { + stream[_readableStreamBits] |= DISTURBED; + const state = ReadableStreamGetState(stream); + if (state === STATE_CLOSED) { + return Promise_resolve(undefined); + } + if (state === STATE_ERRORED) { + return Promise_reject(stream[_storedError]); + } + ReadableStreamClose(stream); + const sourceCancelPromise = ReadableStreamDefaultControllerCancel(stream[_controller], reason); + return thenPromise(sourceCancelPromise, () => undefined); + } + function ReadableStreamDefaultControllerClose(controller) { + const stream = controller[_controlledReadableStream]; + controller[_readableStreamDefaultControllerBits] |= CLOSE_REQUESTED; + if (controller[_queue].length === 0) { + ReadableStreamClose(stream); + } + } + function ReadableStreamFulfillReadRequest(stream, chunk, done) { + const reader = stream[_reader]; + const readRequest = stream[_reader][_readRequests].shift(); + v8.resolvePromise(readRequest, CreateIterResultObject(chunk, done)); + } + function ReadableStreamDefaultControllerEnqueue(controller, chunk) { + const stream = controller[_controlledReadableStream]; + if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { + ReadableStreamFulfillReadRequest(stream, chunk, false); + } else { + let chunkSize = 1; + const strategySize = controller[_strategySize]; + if (strategySize !== undefined) { + try { + chunkSize = strategySize(chunk); + } catch (chunkSizeE) { + if (ReadableStreamGetState(stream) === STATE_READABLE) { + ReadableStreamDefaultControllerError(controller, chunkSizeE); + } + throw chunkSizeE; + } + } + try { + EnqueueValueWithSize(controller, chunk, chunkSize); + } catch (enqueueE) { + if (ReadableStreamGetState(stream) === STATE_READABLE) { + ReadableStreamDefaultControllerError(controller, enqueueE); + } + throw enqueueE; + } + } + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + function ReadableStreamGetState(stream) { + return (stream[_readableStreamBits] & STATE_MASK) >> STATE_BITS_OFFSET; + } + function ReadableStreamSetState(stream, state) { + stream[_readableStreamBits] = (stream[_readableStreamBits] & ~STATE_MASK) | + (state << STATE_BITS_OFFSET); + } + function ReadableStreamDefaultControllerError(controller, e) { + controller[_queue] = new v8.InternalPackedArray(); + const stream = controller[_controlledReadableStream]; + ReadableStreamError(stream, e); + } + function ReadableStreamError(stream, e) { + stream[_storedError] = e; + ReadableStreamSetState(stream, STATE_ERRORED); + const reader = stream[_reader]; + if (reader === undefined) { + return undefined; + } + if (IsReadableStreamDefaultReader(reader) === true) { + const readRequests = reader[_readRequests]; + for (let i = 0; i < readRequests.length; i++) { + v8.rejectPromise(readRequests[i], e); + } + reader[_readRequests] = new v8.InternalPackedArray(); + } + v8.rejectPromise(reader[_closedPromise], e); + v8.markPromiseAsHandled(reader[_closedPromise]); + } + function ReadableStreamClose(stream) { + ReadableStreamSetState(stream, STATE_CLOSED); + const reader = stream[_reader]; + if (reader === undefined) { + return undefined; + } + if (IsReadableStreamDefaultReader(reader) === true) { + const readRequests = reader[_readRequests]; + for (let i = 0; i < readRequests.length; i++) { + v8.resolvePromise( + readRequests[i], CreateIterResultObject(undefined, true)); + } + reader[_readRequests] = new v8.InternalPackedArray(); + } + v8.resolvePromise(reader[_closedPromise], undefined); + } + function ReadableStreamDefaultControllerGetDesiredSize(controller) { + const queueSize = GetTotalQueueSize(controller); + return controller[_strategyHWM] - queueSize; + } + function IsReadableStream(x) { + return hasOwnProperty(x, _controller); + } + function IsReadableStreamDisturbed(stream) { + return stream[_readableStreamBits] & DISTURBED; + } + function IsReadableStreamLocked(stream) { + return stream[_reader] !== undefined; + } + function IsReadableStreamDefaultController(x) { + return hasOwnProperty(x, _controlledReadableStream); + } + function IsReadableStreamDefaultReader(x) { + return hasOwnProperty(x, _readRequests); + } + function IsReadableStreamReadable(stream) { + return ReadableStreamGetState(stream) === STATE_READABLE; + } + function IsReadableStreamClosed(stream) { + return ReadableStreamGetState(stream) === STATE_CLOSED; + } + function IsReadableStreamErrored(stream) { + return ReadableStreamGetState(stream) === STATE_ERRORED; + } + function ReadableStreamReaderGenericInitialize(reader, stream) { + const controller = stream[_controller]; + if (controller[_readableStreamDefaultControllerBits] & EXTERNALLY_CONTROLLED) { + const underlyingSource = controller[_underlyingSource]; + callFunction(underlyingSource.notifyLockAcquired, underlyingSource); + } + reader[_ownerReadableStream] = stream; + stream[_reader] = reader; + switch (ReadableStreamGetState(stream)) { + case STATE_READABLE: + reader[_closedPromise] = v8.createPromise(); + break; + case STATE_CLOSED: + reader[_closedPromise] = Promise_resolve(undefined); + break; + case STATE_ERRORED: + reader[_closedPromise] = Promise_reject(stream[_storedError]); + v8.markPromiseAsHandled(reader[_closedPromise]); + break; + } + } + function ReadableStreamReaderGenericRelease(reader) { + const controller = reader[_ownerReadableStream][_controller]; + if (controller[_readableStreamDefaultControllerBits] & EXTERNALLY_CONTROLLED) { + const underlyingSource = controller[_underlyingSource]; + callFunction(underlyingSource.notifyLockReleased, underlyingSource); + } + if (ReadableStreamGetState(reader[_ownerReadableStream]) === STATE_READABLE) { + v8.rejectPromise(reader[_closedPromise], new TypeError(errReleasedReaderClosedPromise)); + } else { + reader[_closedPromise] = Promise_reject(new TypeError(errReleasedReaderClosedPromise)); + } + v8.markPromiseAsHandled(reader[_closedPromise]); + reader[_ownerReadableStream][_reader] = undefined; + reader[_ownerReadableStream] = undefined; + } + function ReadableStreamDefaultReaderRead(reader) { + const stream = reader[_ownerReadableStream]; + stream[_readableStreamBits] |= DISTURBED; + if (ReadableStreamGetState(stream) === STATE_CLOSED) { + return Promise_resolve(CreateIterResultObject(undefined, true)); + } + if (ReadableStreamGetState(stream) === STATE_ERRORED) { + return Promise_reject(stream[_storedError]); + } + return ReadableStreamDefaultControllerPull(stream[_controller]); + } + function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { + const shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); + if (shouldPull === false) { + return undefined; + } + if (controller[_readableStreamDefaultControllerBits] & PULLING) { + controller[_readableStreamDefaultControllerBits] |= PULL_AGAIN; + return undefined; + } + controller[_readableStreamDefaultControllerBits] |= PULLING; + const underlyingSource = controller[_underlyingSource]; + const pullPromise = PromiseCallOrNoop( + underlyingSource, 'pull', controller, 'underlyingSource.pull'); + thenPromise(pullPromise, + () => { + controller[_readableStreamDefaultControllerBits] &= ~PULLING; + if (controller[_readableStreamDefaultControllerBits] & PULL_AGAIN) { + controller[_readableStreamDefaultControllerBits] &= ~PULL_AGAIN; + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + }, + e => { + if (ReadableStreamGetState(controller[_controlledReadableStream]) === STATE_READABLE) { + ReadableStreamDefaultControllerError(controller, e); + } + }); + } + function ReadableStreamDefaultControllerShouldCallPull(controller) { + const stream = controller[_controlledReadableStream]; + const state = ReadableStreamGetState(stream); + if (state === STATE_CLOSED || state === STATE_ERRORED) { + return false; + } + if (controller[_readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { + return false; + } + if (!(controller[_readableStreamDefaultControllerBits] & STARTED)) { + return false; + } + if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { + return true; + } + const desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); + if (desiredSize > 0) { + return true; + } + return false; + } + function ReadableStreamGetNumReadRequests(stream) { + const reader = stream[_reader]; + const readRequests = reader[_readRequests]; + return readRequests.length; + } + function ReadableStreamTee(stream) { + const reader = AcquireReadableStreamDefaultReader(stream); + let closedOrErrored = false; + let canceled1 = false; + let canceled2 = false; + let reason1; + let reason2; + let promise = v8.createPromise(); + const branch1Stream = new ReadableStream({pull, cancel: cancel1}); + const branch2Stream = new ReadableStream({pull, cancel: cancel2}); + const branch1 = branch1Stream[_controller]; + const branch2 = branch2Stream[_controller]; + thenPromise( + reader[_closedPromise], undefined, function(r) { + if (closedOrErrored === true) { + return; + } + ReadableStreamDefaultControllerError(branch1, r); + ReadableStreamDefaultControllerError(branch2, r); + closedOrErrored = true; + }); + return [branch1Stream, branch2Stream]; + function pull() { + return thenPromise( + ReadableStreamDefaultReaderRead(reader), function(result) { + const value = result.value; + const done = result.done; + if (done === true && closedOrErrored === false) { + if (canceled1 === false) { + ReadableStreamDefaultControllerClose(branch1); + } + if (canceled2 === false) { + ReadableStreamDefaultControllerClose(branch2); + } + closedOrErrored = true; + } + if (closedOrErrored === true) { + return; + } + if (canceled1 === false) { + ReadableStreamDefaultControllerEnqueue(branch1, value); + } + if (canceled2 === false) { + ReadableStreamDefaultControllerEnqueue(branch2, value); + } + }); + } + function cancel1(reason) { + canceled1 = true; + reason1 = reason; + if (canceled2 === true) { + const compositeReason = [reason1, reason2]; + const cancelResult = ReadableStreamCancel(stream, compositeReason); + v8.resolvePromise(promise, cancelResult); + } + return promise; + } + function cancel2(reason) { + canceled2 = true; + reason2 = reason; + if (canceled1 === true) { + const compositeReason = [reason1, reason2]; + const cancelResult = ReadableStreamCancel(stream, compositeReason); + v8.resolvePromise(promise, cancelResult); + } + return promise; + } + } + function DequeueValue(controller) { + const result = controller[_queue].shift(); + controller[_totalQueuedSize] -= result.size; + return result.value; + } + function EnqueueValueWithSize(controller, value, size) { + size = Number(size); + if (Number_isNaN(size) || size === +Infinity || size < 0) { + throw new RangeError(streamErrors.invalidSize); + } + controller[_totalQueuedSize] += size; + controller[_queue].push({value, size}); + } + function GetTotalQueueSize(controller) { return controller[_totalQueuedSize]; } + function ValidateAndNormalizeQueuingStrategy(size, highWaterMark) { + if (size !== undefined && typeof size !== 'function') { + throw new TypeError(streamErrors.sizeNotAFunction); + } + highWaterMark = Number(highWaterMark); + if (Number_isNaN(highWaterMark)) { + throw new RangeError(streamErrors.errInvalidHWM); + } + if (highWaterMark < 0) { + throw new RangeError(streamErrors.invalidHWM); + } + return {size, highWaterMark}; + } + function CallOrNoop(O, P, arg, nameForError) { + const method = O[P]; + if (method === undefined) { + return undefined; + } + if (typeof method !== 'function') { + throw new TypeError(errTmplMustBeFunctionOrUndefined(nameForError)); + } + return callFunction(method, O, arg); + } + function PromiseCallOrNoop(O, P, arg, nameForError) { + let method; + try { + method = O[P]; + } catch (methodE) { + return Promise_reject(methodE); + } + if (method === undefined) { + return Promise_resolve(undefined); + } + if (typeof method !== 'function') { + return Promise_reject(new TypeError(errTmplMustBeFunctionOrUndefined(nameForError))); + } + try { + return Promise_resolve(callFunction(method, O, arg)); + } catch (e) { + return Promise_reject(e); + } + } + function CreateIterResultObject(value, done) { return {value, done}; } + defineProperty(global, 'ReadableStream', { + value: ReadableStream, + enumerable: false, + configurable: true, + writable: true + }); + binding.AcquireReadableStreamDefaultReader = AcquireReadableStreamDefaultReader; + binding.IsReadableStream = IsReadableStream; + binding.IsReadableStreamDisturbed = IsReadableStreamDisturbed; + binding.IsReadableStreamLocked = IsReadableStreamLocked; + binding.IsReadableStreamReadable = IsReadableStreamReadable; + binding.IsReadableStreamClosed = IsReadableStreamClosed; + binding.IsReadableStreamErrored = IsReadableStreamErrored; + binding.IsReadableStreamDefaultReader = IsReadableStreamDefaultReader; + binding.ReadableStreamDefaultReaderRead = ReadableStreamDefaultReaderRead; + binding.ReadableStreamTee = ReadableStreamTee; + binding.ReadableStreamDefaultControllerClose = ReadableStreamDefaultControllerClose; + binding.ReadableStreamDefaultControllerGetDesiredSize = ReadableStreamDefaultControllerGetDesiredSize; + binding.ReadableStreamDefaultControllerEnqueue = ReadableStreamDefaultControllerEnqueue; + binding.ReadableStreamDefaultControllerError = ReadableStreamDefaultControllerError; + binding.createReadableStreamWithExternalController = + (underlyingSource, strategy) => { + return new ReadableStream( + underlyingSource, strategy, createWithExternalControllerSentinel); + }; +}); +8WritableStream’é +(function(global, binding, v8) { + 'use strict'; + const _pendingWriteRequest = v8.createPrivateSymbol('[[pendingWriteRequest]]'); + const _pendingCloseRequest = v8.createPrivateSymbol('[[pendingCloseRequest]]'); + const _pendingAbortRequest = v8.createPrivateSymbol('[[pendingAbortRequest]]'); + const _state = v8.createPrivateSymbol('[[state]]'); + const _storedError = v8.createPrivateSymbol('[[storedError]]'); + const _writer = v8.createPrivateSymbol('[[writer]]'); + const _writableStreamController = + v8.createPrivateSymbol('[[writableStreamController]]'); + const _writeRequests = v8.createPrivateSymbol('[[writeRequests]]'); + const _closedPromise = v8.createPrivateSymbol('[[closedPromise]]'); + const _ownerWritableStream = + v8.createPrivateSymbol('[[ownerWritableStream]]'); + const _readyPromise = v8.createPrivateSymbol('[[readyPromise]]'); + const _controlledWritableStream = + v8.createPrivateSymbol('[[controlledWritableStream]]'); + const _queue = v8.createPrivateSymbol('[[queue]]'); + const _queueSize = v8.createPrivateSymbol('[[queueSize]]'); + const _strategyHWM = v8.createPrivateSymbol('[[strategyHWM]]'); + const _strategySize = v8.createPrivateSymbol('[[strategySize]]'); + const _underlyingSink = v8.createPrivateSymbol('[[underlyingSink]]'); + const _defaultControllerFlags = + v8.createPrivateSymbol('[[defaultControllerFlags]]'); + const FLAG_STARTED = 0b1; + const FLAG_WRITING = 0b10; + const FLAG_INCLOSE = 0b100; + const WRITABLE = 0; + const CLOSING = 1; + const CLOSED = 2; + const ERRORED = 3; + const undefined = global.undefined; + const defineProperty = global.Object.defineProperty; + const hasOwnProperty = v8.uncurryThis(global.Object.hasOwnProperty); + const Function_apply = v8.uncurryThis(global.Function.prototype.apply); + const TypeError = global.TypeError; + const RangeError = global.RangeError; + const Boolean = global.Boolean; + const Number = global.Number; + const Number_isNaN = Number.isNaN; + const Number_isFinite = Number.isFinite; + const Promise = global.Promise; + const thenPromise = v8.uncurryThis(Promise.prototype.then); + const Promise_resolve = v8.simpleBind(Promise.resolve, Promise); + const Promise_reject = v8.simpleBind(Promise.reject, Promise); + const streamErrors = binding.streamErrors; + const errAbortLockedStream = 'Cannot abort a writable stream that is locked to a writer'; + const errStreamAborted = 'The stream has been aborted'; + const errWriterLockReleasedPrefix = 'This writable stream writer has been released and cannot be '; + const errCloseCloseRequestedStream = + 'Cannot close a writable stream that has already been requested to be closed'; + const errWriteCloseRequestedStream = + 'Cannot write to a writable stream that is due to be closed'; + const templateErrorCannotActionOnStateStream = + (action, state) => `Cannot ${action} a ${state} writable stream`; + const errReleasedWriterClosedPromise = + 'This writable stream writer has been released and cannot be used to monitor the stream\'s state'; + const templateErrorIsNotAFunction = f => `${f} is not a function`; + const verbUsedToGetTheDesiredSize = 'used to get the desiredSize'; + const verbAborted = 'aborted'; + const verbClosed = 'closed'; + const verbWrittenTo = 'written to'; + function createWriterLockReleasedError(verb) { + return new TypeError(errWriterLockReleasedPrefix + verb); + } + const stateNames = {[CLOSED]: 'closed', [ERRORED]: 'errored'}; + function createCannotActionOnStateStreamError(action, state) { + TEMP_ASSERT(stateNames[state] !== undefined, + `name for state ${state} exists in stateNames`); + return new TypeError( + templateErrorCannotActionOnStateStream(action, stateNames[state])); + } + function setDefaultControllerFlag(controller, flag, value) { + let flags = controller[_defaultControllerFlags]; + if (value) { + flags = flags | flag; + } else { + flags = flags & ~flag; + } + controller[_defaultControllerFlags] = flags; + } + function getDefaultControllerStartedFlag(controller) { + return Boolean(controller[_defaultControllerFlags] & FLAG_STARTED); + } + function setDefaultControllerStartedFlag(controller, value) { + setDefaultControllerFlag(controller, FLAG_STARTED, value); + } + function getDefaultControllerWritingFlag(controller) { + return Boolean(controller[_defaultControllerFlags] & FLAG_WRITING); + } + function setDefaultControllerWritingFlag(controller, value) { + setDefaultControllerFlag(controller, FLAG_WRITING, value); + } + function getDefaultControllerInCloseFlag(controller) { + return Boolean(controller[_defaultControllerFlags] & FLAG_INCLOSE); + } + function setDefaultControllerInCloseFlag(controller, value) { + setDefaultControllerFlag(controller, FLAG_INCLOSE, value); + } + function rejectPromises(array, e) { + for (let i = 0; i < array.length; ++i) { + v8.rejectPromise(array[i], e); + } + } + function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; + } + function TEMP_ASSERT(predicate, message) { + if (predicate) { + return; + } + v8.log(`Assertion failed: ${message}\n`); + v8.logStackTrace(); + class WritableStreamInternalError extends Error { + constructor(message) { + super(message); + } + } + throw new WritableStreamInternalError(message); + } + class WritableStream { + constructor(underlyingSink = {}, { size, highWaterMark = 1 } = {}) { + this[_state] = WRITABLE; + this[_storedError] = undefined; + this[_writer] = undefined; + this[_writableStreamController] = undefined; + this[_pendingWriteRequest] = undefined; + this[_pendingCloseRequest] = undefined; + this[_pendingAbortRequest] = undefined; + this[_writeRequests] = new v8.InternalPackedArray(); + const type = underlyingSink.type; + if (type !== undefined) { + throw new RangeError(streamErrors.invalidType); + } + this[_writableStreamController] = + new WritableStreamDefaultController(this, underlyingSink, size, + highWaterMark); + } + get locked() { + if (!IsWritableStream(this)) { + throw new TypeError(streamErrors.illegalInvocation); + } + return IsWritableStreamLocked(this); + } + abort(reason) { + if (!IsWritableStream(this)) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + if (IsWritableStreamLocked(this)) { + return Promise_reject(new TypeError(errAbortLockedStream)); + } + return WritableStreamAbort(this, reason); + } + getWriter() { + if (!IsWritableStream(this)) { + throw new TypeError(streamErrors.illegalInvocation); + } + return AcquireWritableStreamDefaultWriter(this); + } + } + function AcquireWritableStreamDefaultWriter(stream) { + return new WritableStreamDefaultWriter(stream); + } + function IsWritableStream(x) { + return hasOwnProperty(x, _writableStreamController); + } + function IsWritableStreamLocked(stream) { + TEMP_ASSERT(IsWritableStream(stream), + '! IsWritableStream(stream) is true.'); + return stream[_writer] !== undefined; + } + function WritableStreamAbort(stream, reason) { + const state = stream[_state]; + if (state === CLOSED) { + return Promise_resolve(undefined); + } + if (state === ERRORED) { + return Promise_reject(stream[_storedError]); + } + TEMP_ASSERT(state === WRITABLE || state === CLOSING, + 'state is "writable" or "closing".'); + const error = new TypeError(errStreamAborted); + WritableStreamError(stream, error); + const controller = stream[_writableStreamController]; + TEMP_ASSERT(controller !== undefined, + 'controller is not undefined'); + const isWriting = getDefaultControllerWritingFlag(controller); + if (isWriting || getDefaultControllerInCloseFlag(controller)) { + const promise = v8.createPromise(); + stream[_pendingAbortRequest] = promise; + if (isWriting) { + return thenPromise(promise, () => { + return WritableStreamDefaultControllerAbort(controller, reason); + }); + } + return promise; + } + return WritableStreamDefaultControllerAbort(controller, reason); + } + function WritableStreamAddWriteRequest(stream) { + TEMP_ASSERT(IsWritableStreamLocked(stream), + '! IsWritableStreamLocked(writer) is true.'); + TEMP_ASSERT(stream[_state] === WRITABLE, + 'stream.[[state]] is "writable".'); + const promise = v8.createPromise(); + stream[_writeRequests].push(promise); + return promise; + } + function WritableStreamError(stream, e) { + const oldState = stream[_state]; + TEMP_ASSERT(oldState === WRITABLE || oldState === CLOSING, + 'oldState is "writable" or "closing".'); + stream[_state] = ERRORED; + stream[_storedError] = e; + const controller = stream[_writableStreamController]; + if (controller === undefined || + (!getDefaultControllerWritingFlag(controller) && + !getDefaultControllerInCloseFlag(controller))) { + WritableStreamRejectPromisesInReactionToError(stream); + } + const writer = stream[_writer]; + if (writer !== undefined) { + if (oldState === WRITABLE && + WritableStreamDefaultControllerGetBackpressure(controller) === true) { + v8.rejectPromise(writer[_readyPromise], e); + } else { + writer[_readyPromise] = Promise_reject(e); + } + v8.markPromiseAsHandled(writer[_readyPromise]); + } + } + function WritableStreamFinishClose(stream) { + const state = stream[_state]; + TEMP_ASSERT(state === CLOSING || state === ERRORED, + 'state is "closing" or "errored"'); + const writer = stream[_writer]; + if (state === CLOSING) { + if (writer !== undefined) { + v8.resolvePromise(writer[_closedPromise], undefined); + } + stream[_state] = CLOSED; + } else if (writer !== undefined) { + TEMP_ASSERT(state === ERRORED, 'state is "errored"'); + v8.rejectPromise(writer[_closedPromise], stream[_storedError]); + v8.markPromiseAsHandled(writer[_closedPromise]); + } + if (stream[_pendingAbortRequest] !== undefined) { + v8.resolvePromise(stream[_pendingAbortRequest], undefined); + stream[_pendingAbortRequest] = undefined; + } + } + function WritableStreamRejectPromisesInReactionToError(stream) { + TEMP_ASSERT(stream[_state] === ERRORED, 'stream.[[state]] is "errored"'); + TEMP_ASSERT(stream[_pendingWriteRequest] === undefined, + 'stream.[[pendingWriteRequest]] is undefined'); + const storedError = stream[_storedError]; + rejectPromises(stream[_writeRequests], storedError); + stream[_writeRequests] = new v8.InternalPackedArray(); + if (stream[_pendingCloseRequest] !== undefined) { + TEMP_ASSERT( + getDefaultControllerInCloseFlag(stream[_writableStreamController]) === + false, 'stream.[[writableStreamController]].[[inClose]] === false'); + v8.rejectPromise(stream[_pendingCloseRequest], storedError); + stream[_pendingCloseRequest] = undefined; + } + const writer = stream[_writer]; + if (writer !== undefined) { + v8.rejectPromise(writer[_closedPromise], storedError); + v8.markPromiseAsHandled(writer[_closedPromise]); + } + } + function WritableStreamUpdateBackpressure(stream, backpressure) { + TEMP_ASSERT(stream[_state] === WRITABLE, + 'stream.[[state]] is "writable".'); + const writer = stream[_writer]; + if (writer === undefined) { + return; + } + if (backpressure) { + writer[_readyPromise] = v8.createPromise(); + } else { + TEMP_ASSERT(backpressure === false, + 'backpressure is false.'); + v8.resolvePromise(writer[_readyPromise], undefined); + } + } + class WritableStreamDefaultWriter { + constructor(stream) { + if (!IsWritableStream(stream)) { + throw new TypeError(streamErrors.illegalConstructor); + } + if (IsWritableStreamLocked(stream)) { + throw new TypeError(streamErrors.illegalConstructor); + } + this[_ownerWritableStream] = stream; + stream[_writer] = this; + const state = stream[_state]; + if (state === WRITABLE || state === CLOSING) { + this[_closedPromise] = v8.createPromise(); + } else if (state === CLOSED) { + this[_closedPromise] = Promise_resolve(undefined); + } else { + TEMP_ASSERT(state === ERRORED, + 'state is "errored".'); + this[_closedPromise] = Promise_reject(stream[_storedError]); + v8.markPromiseAsHandled(this[_closedPromise]); + } + if (state === WRITABLE && + WritableStreamDefaultControllerGetBackpressure( + stream[_writableStreamController])) { + this[_readyPromise] = v8.createPromise(); + } else { + this[_readyPromise] = Promise_resolve(undefined); + } + } + get closed() { + if (!IsWritableStreamDefaultWriter(this)) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + return this[_closedPromise]; + } + get desiredSize() { + if (!IsWritableStreamDefaultWriter(this)) { + throw new TypeError(streamErrors.illegalInvocation); + } + if (this[_ownerWritableStream] === undefined) { + throw createWriterLockReleasedError(verbUsedToGetTheDesiredSize); + } + return WritableStreamDefaultWriterGetDesiredSize(this); + } + get ready() { + if (!IsWritableStreamDefaultWriter(this)) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + return this[_readyPromise]; + } + abort(reason) { + if (!IsWritableStreamDefaultWriter(this)) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + if (this[_ownerWritableStream] === undefined) { + return Promise_reject(createWriterLockReleasedError(verbAborted)); + } + return WritableStreamDefaultWriterAbort(this, reason); + } + close() { + if (!IsWritableStreamDefaultWriter(this)) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + const stream = this[_ownerWritableStream]; + if (stream === undefined) { + return Promise_reject(createWriterLockReleasedError(verbClosed)); + } + if (stream[_state] === CLOSING) { + return Promise_reject(new TypeError(errCloseCloseRequestedStream)); + } + return WritableStreamDefaultWriterClose(this); + } + releaseLock() { + if (!IsWritableStreamDefaultWriter(this)) { + throw new TypeError(streamErrors.illegalInvocation); + } + const stream = this[_ownerWritableStream]; + if (stream === undefined) { + return; + } + TEMP_ASSERT(stream[_writer] !== undefined, + 'stream.[[writer]] is not undefined.'); + WritableStreamDefaultWriterRelease(this); + } + write(chunk) { + if (!IsWritableStreamDefaultWriter(this)) { + return Promise_reject(new TypeError(streamErrors.illegalInvocation)); + } + const stream = this[_ownerWritableStream]; + if (stream === undefined) { + return Promise_reject(createWriterLockReleasedError(verbWrittenTo)); + } + if (stream[_state] === CLOSING) { + return Promise_reject(new TypeError(errWriteCloseRequestedStream)); + } + return WritableStreamDefaultWriterWrite(this, chunk); + } + } + function IsWritableStreamDefaultWriter(x) { + return hasOwnProperty(x, _ownerWritableStream); + } + function WritableStreamDefaultWriterAbort(writer, reason) { + const stream = writer[_ownerWritableStream]; + TEMP_ASSERT(stream !== undefined, + 'stream is not undefined.'); + return WritableStreamAbort(stream, reason); + } + function WritableStreamDefaultWriterClose(writer) { + const stream = writer[_ownerWritableStream]; + TEMP_ASSERT(stream !== undefined, + 'stream is not undefined.'); + const state = stream[_state]; + if (state === CLOSED || state === ERRORED) { + return Promise_reject( + createCannotActionOnStateStreamError('close', state)); + } + TEMP_ASSERT(state === WRITABLE, + 'state is "writable".'); + stream[_pendingCloseRequest] = v8.createPromise(); + if (WritableStreamDefaultControllerGetBackpressure( + stream[_writableStreamController])) { + v8.resolvePromise(writer[_readyPromise], undefined); + } + stream[_state] = CLOSING; + WritableStreamDefaultControllerClose(stream[_writableStreamController]); + return stream[_pendingCloseRequest]; + } + function WritableStreamDefaultWriterGetDesiredSize(writer) { + const stream = writer[_ownerWritableStream]; + const state = stream[_state]; + if (state === ERRORED) { + return null; + } + if (state === CLOSED) { + return 0; + } + return WritableStreamDefaultControllerGetDesiredSize( + stream[_writableStreamController]); + } + function WritableStreamDefaultWriterRelease(writer) { + const stream = writer[_ownerWritableStream]; + TEMP_ASSERT(stream !== undefined, + 'stream is not undefined.'); + TEMP_ASSERT(stream[_writer] === writer, + 'stream.[[writer]] is writer.'); + const releasedError = new TypeError(errReleasedWriterClosedPromise); + const state = stream[_state]; + if (state === WRITABLE || state === CLOSING || + stream[_pendingAbortRequest] !== undefined) { + v8.rejectPromise(writer[_closedPromise], releasedError); + } else { + writer[_closedPromise] = Promise_reject(releasedError); + } + v8.markPromiseAsHandled(writer[_closedPromise]); + if (state === WRITABLE && + WritableStreamDefaultControllerGetBackpressure( + stream[_writableStreamController])) { + v8.rejectPromise(writer[_readyPromise], releasedError); + } else { + writer[_readyPromise] = Promise_reject(releasedError); + } + v8.markPromiseAsHandled(writer[_readyPromise]); + stream[_writer] = undefined; + writer[_ownerWritableStream] = undefined; + } + function WritableStreamDefaultWriterWrite(writer, chunk) { + const stream = writer[_ownerWritableStream]; + TEMP_ASSERT(stream !== undefined, + 'stream is not undefined.'); + const state = stream[_state]; + if (state === CLOSED || state === ERRORED) { + return Promise_reject( + createCannotActionOnStateStreamError('write to', state)); + } + TEMP_ASSERT(state === WRITABLE, + 'state is "writable".'); + const promise = WritableStreamAddWriteRequest(stream); + WritableStreamDefaultControllerWrite(stream[_writableStreamController], + chunk); + return promise; + } + class WritableStreamDefaultController { + constructor(stream, underlyingSink, size, highWaterMark) { + if (!IsWritableStream(stream)) { + throw new TypeError(streamErrors.illegalConstructor); + } + if (stream[_writableStreamController] !== undefined) { + throw new TypeError(streamErrors.illegalConstructor); + } + this[_controlledWritableStream] = stream; + this[_underlyingSink] = underlyingSink; + this[_queue] = new v8.InternalPackedArray(); + this[_queueSize] = 0; + this[_defaultControllerFlags] = 0; + const normalizedStrategy = + ValidateAndNormalizeQueuingStrategy(size, highWaterMark); + this[_strategySize] = normalizedStrategy.size; + this[_strategyHWM] = normalizedStrategy.highWaterMark; + const backpressure = WritableStreamDefaultControllerGetBackpressure(this); + if (backpressure) { + WritableStreamUpdateBackpressure(stream, backpressure); + } + const controller = this; + const startResult = InvokeOrNoop(underlyingSink, 'start', [this]); + const onFulfilled = () => { + setDefaultControllerStartedFlag(controller, true); + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + }; + const onRejected = r => { + WritableStreamDefaultControllerErrorIfNeeded(controller, r); + }; + thenPromise(Promise_resolve(startResult), onFulfilled, onRejected); + } + error(e) { + if (!IsWritableStreamDefaultController(this)) { + throw new TypeError(streamErrors.illegalInvocation); + } + const state = this[_controlledWritableStream][_state]; + if (state === CLOSED || state === ERRORED) { + throw createCannotActionOnStateStreamError('error', state); + } + WritableStreamDefaultControllerError(this, e); + } + } + function IsWritableStreamDefaultController(x) { + return hasOwnProperty(x, _underlyingSink); + } + function WritableStreamDefaultControllerAbort(controller, reason) { + controller[_queue] = v8.InternalPackedArray(); + controller[_queueSize] = 0; + const sinkAbortPromise = + PromiseInvokeOrNoop(controller[_underlyingSink], 'abort', [reason]); + return thenPromise(sinkAbortPromise, () => undefined); + } + function WritableStreamDefaultControllerClose(controller) { + EnqueueValueWithSizeForController(controller, 'close', 0); + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + } + function WritableStreamDefaultControllerGetDesiredSize(controller) { + const queueSize = GetTotalQueueSizeForController(controller); + return controller[_strategyHWM] - queueSize; + } + function WritableStreamDefaultControllerWrite(controller, chunk) { + const stream = controller[_controlledWritableStream]; + TEMP_ASSERT(stream[_state] === WRITABLE, + 'stream.[[state]] is "writable".'); + let chunkSize = 1; + const strategySize = controller[_strategySize]; + if (strategySize !== undefined) { + try { + chunkSize = strategySize(chunk); + } catch (e) { + WritableStreamDefaultControllerErrorIfNeeded(controller, e); + return; + } + } + const writeRecord = {chunk}; + const lastBackpressure = + WritableStreamDefaultControllerGetBackpressure(controller); + try { + EnqueueValueWithSizeForController(controller, writeRecord, chunkSize); + } catch (e) { + WritableStreamDefaultControllerErrorIfNeeded(controller, e); + return; + } + if (stream[_state] === WRITABLE) { + const backpressure = + WritableStreamDefaultControllerGetBackpressure(controller); + if (lastBackpressure !== backpressure) { + WritableStreamUpdateBackpressure(stream, backpressure); + } + } + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + } + function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) { + const state = controller[_controlledWritableStream][_state]; + if (state === CLOSED || state === ERRORED) { + return; + } + if (!getDefaultControllerStartedFlag(controller)) { + return; + } + if (getDefaultControllerWritingFlag(controller)) { + return; + } + if (controller[_queue].length === 0) { + return; + } + const writeRecord = PeekQueueValue(controller[_queue]); + if (writeRecord === 'close') { + WritableStreamDefaultControllerProcessClose(controller); + } else { + WritableStreamDefaultControllerProcessWrite(controller, + writeRecord.chunk); + } + } + function WritableStreamDefaultControllerErrorIfNeeded(controller, e) { + const state = controller[_controlledWritableStream][_state]; + if (state === WRITABLE || state === CLOSING) { + WritableStreamDefaultControllerError(controller, e); + } + } + function WritableStreamDefaultControllerProcessClose(controller) { + const stream = controller[_controlledWritableStream]; + TEMP_ASSERT(stream[_state] === CLOSING, + 'stream.[[state]] is "closing".'); + DequeueValueForController(controller); + TEMP_ASSERT(controller[_queue].length === 0, + 'controller.[[queue]] is empty.'); + setDefaultControllerInCloseFlag(controller, true); + const sinkClosePromise = PromiseInvokeOrNoop(controller[_underlyingSink], + 'close', [controller]); + thenPromise(sinkClosePromise, + () => { + TEMP_ASSERT(getDefaultControllerInCloseFlag(controller) + === true, + 'controller.[[inClose]] is true'); + setDefaultControllerInCloseFlag(controller, false); + if (stream[_state] !== CLOSING && + stream[_state] !== ERRORED) { + return; + } + TEMP_ASSERT(stream[_pendingCloseRequest] !== undefined); + v8.resolvePromise(stream[_pendingCloseRequest], undefined); + stream[_pendingCloseRequest] = undefined; + WritableStreamFinishClose(stream); + }, + r => { + TEMP_ASSERT(getDefaultControllerInCloseFlag(controller) + === true, + 'controller.[[inClose]] is true'); + setDefaultControllerInCloseFlag(controller, false); + TEMP_ASSERT(stream[_pendingCloseRequest] !== undefined); + v8.rejectPromise(stream[_pendingCloseRequest], r); + stream[_pendingCloseRequest] = undefined; + if (stream[_pendingAbortRequest] !== undefined) { + v8.rejectPromise(stream[_pendingAbortRequest], r); + stream[_pendingAbortRequest] = undefined; + } + WritableStreamDefaultControllerErrorIfNeeded(controller, r); + } + ); + } + function WritableStreamDefaultControllerProcessWrite(controller, chunk) { + setDefaultControllerWritingFlag(controller, true); + const stream = controller[_controlledWritableStream]; + TEMP_ASSERT(stream[_pendingWriteRequest] === undefined, + 'stream.[[pendingWriteRequest]] is undefined'); + TEMP_ASSERT(stream[_writeRequests].length > 0, + 'stream.[[writeRequests]] is not empty'); + stream[_pendingWriteRequest] = stream[_writeRequests].shift(); + const sinkWritePromise = PromiseInvokeOrNoop(controller[_underlyingSink], + 'write', [chunk, controller]); + thenPromise( + sinkWritePromise, + () => { + TEMP_ASSERT(getDefaultControllerWritingFlag(controller) === true, + 'controller.[[writing]] is true'); + setDefaultControllerWritingFlag(controller, false); + TEMP_ASSERT(stream[_pendingWriteRequest] !== undefined, + 'stream.[[pendingWriteRequest]] is not undefined'); + v8.resolvePromise(stream[_pendingWriteRequest], undefined); + stream[_pendingWriteRequest] = undefined; + const state = stream[_state]; + if (state === ERRORED) { + WritableStreamRejectPromisesInReactionToError(stream); + if (stream[_pendingAbortRequest] !== undefined) { + v8.resolvePromise(stream[_pendingAbortRequest], undefined); + stream[_pendingAbortRequest] = undefined; + } + return; + } + const lastBackpressure = + WritableStreamDefaultControllerGetBackpressure(controller); + DequeueValueForController(controller); + if (state !== CLOSING) { + const backpressure = + WritableStreamDefaultControllerGetBackpressure(controller); + if (lastBackpressure !== backpressure) { + WritableStreamUpdateBackpressure( + controller[_controlledWritableStream], backpressure); + } + } + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + }, + r => { + TEMP_ASSERT(getDefaultControllerWritingFlag(controller) === true, + 'controller.[[writing]] is true'); + setDefaultControllerWritingFlag(controller, false); + TEMP_ASSERT(stream[_pendingWriteRequest] !== undefined, + 'stream.[[pendingWriteRequest]] is not undefined'); + v8.rejectPromise(stream[_pendingWriteRequest], r); + stream[_pendingWriteRequest] = undefined; + if (stream[_state] === ERRORED) { + stream[_storedError] = r; + WritableStreamRejectPromisesInReactionToError(stream); + } + if (stream[_pendingAbortRequest] !== undefined) { + v8.rejectPromise(stream[_pendingAbortRequest], r); + stream[_pendingAbortRequest] = undefined; + } + WritableStreamDefaultControllerErrorIfNeeded(controller, r); + } + ); + } + function WritableStreamDefaultControllerGetBackpressure(controller) { + const desiredSize = + WritableStreamDefaultControllerGetDesiredSize(controller); + return desiredSize <= 0; + } + function WritableStreamDefaultControllerError(controller, e) { + const stream = controller[_controlledWritableStream]; + const state = stream[_state]; + TEMP_ASSERT(state === WRITABLE || state === CLOSING, + 'stream.[[state]] is "writable" or "closing".'); + WritableStreamError(stream, e); + controller[_queue] = new v8.InternalPackedArray(); + controller[_queueSize] = 0; + } + function DequeueValueForController(controller) { + TEMP_ASSERT(controller[_queue].length !== 0, + 'queue is not empty.'); + const result = controller[_queue].shift(); + controller[_queueSize] -= result.size; + return result.value; + } + function EnqueueValueWithSizeForController(controller, value, size) { + size = Number(size); + if (!IsFiniteNonNegativeNumber(size)) { + throw new RangeError(streamErrors.invalidSize); + } + controller[_queueSize] += size; + controller[_queue].push({value, size}); + } + function GetTotalQueueSizeForController(controller) { + return controller[_queueSize]; + } + function PeekQueueValue(queue) { + TEMP_ASSERT(queue.length !== 0, + 'queue is not empty.'); + return queue[0].value; + } + function InvokeOrNoop(O, P, args) { + TEMP_ASSERT(IsPropertyKey(P), + 'P is a valid property key.'); + if (args === undefined) { + args = []; + } + const method = O[P]; + if (method === undefined) { + return undefined; + } + if (typeof method !== 'function') { + throw new TypeError(templateErrorIsNotAFunction(P)); + } + return Function_apply(method, O, args); + } + function IsFiniteNonNegativeNumber(v) { + return Number_isFinite(v) && v >= 0; + } + function PromiseInvokeOrNoop(O, P, args) { + try { + return Promise_resolve(InvokeOrNoop(O, P, args)); + } catch (e) { + return Promise_reject(e); + } + } + function ValidateAndNormalizeQueuingStrategy(size, highWaterMark) { + if (size !== undefined && typeof size !== 'function') { + throw new TypeError(streamErrors.sizeNotAFunction); + } + highWaterMark = Number(highWaterMark); + if (Number_isNaN(highWaterMark)) { + throw new RangeError(streamErrors.errInvalidHWM); + } + if (highWaterMark < 0) { + throw new RangeError(streamErrors.invalidHWM); + } + return {size, highWaterMark}; + } + defineProperty(global, 'WritableStream', { + value: WritableStream, + enumerable: false, + configurable: true, + writable: true + }); +}); diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/snapshot_blob.bin b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/snapshot_blob.bin new file mode 100644 index 0000000..75eb706 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/snapshot_blob.bin differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/widevinecdmadapter.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/widevinecdmadapter.dll new file mode 100644 index 0000000..f0001de Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/CefSharp/widevinecdmadapter.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/Plugin.cs b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/Plugin.cs index 2cda52a..5966e2d 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/Plugin.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/Plugin.cs @@ -28,7 +28,9 @@ namespace QuickLook.Plugin.HtmlViewer public void Prepare(string path, ContextObject context) { - context.PreferredSize = new Size(600, 800); + context.PreferredSize = new Size(800, 800); + + context.Focusable = true; } public void View(string path, ContextObject context) @@ -42,6 +44,9 @@ namespace QuickLook.Plugin.HtmlViewer public void Dispose() { + GC.SuppressFinalize(this); + + _panel?.Dispose(); } ~Plugin() diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/QuickLook.Plugin.HtmlViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/QuickLook.Plugin.HtmlViewer.csproj index 50dd934..1d26fd0 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/QuickLook.Plugin.HtmlViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/QuickLook.Plugin.HtmlViewer.csproj @@ -34,8 +34,17 @@ MinimumRecommendedRules.ruleset - - ..\..\packages\AirspaceFixer.1.0.2\lib\AirspaceFixer.dll + + False + References\CefSharp.dll + + + False + References\CefSharp.Core.dll + + + False + References\CefSharp.Wpf.dll @@ -81,7 +90,38 @@ ResXFileCodeGenerator Resources.Designer.cs - + + Always + cef.pak + + + Always + cef_100_percent.pak + + + Always + cef_200_percent.pak + + + Always + cef_extensions.pak + + + Always + icudtl.dat + + + Always + locales\en-US.pak + + + Always + natives_blob.bin + + + Always + snapshot_blob.bin + SettingsSingleFileGenerator Settings.Designer.cs @@ -94,5 +134,39 @@ False + + + Always + CefSharp.BrowserSubprocess.Core.dll + + + Always + CefSharp.BrowserSubprocess.exe + + + Always + chrome_elf.dll + + + Always + d3dcompiler_47.dll + + + Always + libcef.dll + + + Always + libEGL.dll + + + Always + libGLESv2.dll + + + Always + widevinecdmadapter.dll + + \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Core.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Core.dll new file mode 100644 index 0000000..8b19cb7 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Core.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Core.xml b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Core.xml new file mode 100644 index 0000000..0b32d40 --- /dev/null +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Core.xml @@ -0,0 +1,1097 @@ + + + + "CefSharp.Core" + + + + +Creates a detailed expection string from a provided Cef V8 exception. + + The exception which will be used as base for the message + + + +Assigns the provided cef_string_t object from the given .NET string. + + The cef_string_t that should be updated. + The .NET string whose value should be used to update cefStr. + + + +Converts a .NET List of strings to native (unmanaged) format. + + The List of strings that should be converted. + An unmanaged representation of the provided List of strings, or an empty List if the input is a nullptr. + + + +Converts a .NET string to native (unmanaged) format. Note that this method does not allocate a new copy of the + + The string that should be converted. + An unmanaged representation of the provided string, or an empty string if the input string is a nullptr. + + + +Converts an unmanaged vector of strings to a (managed) .NET List of strings. + + The vector of strings that should be converted. + A .NET List of strings. + + + +Converts an unmanaged string to a (managed) .NET string. + + The string that should be converted. + A .NET string. + + + +Converts an unmanaged string to a (managed) .NET string. + + The string that should be converted. + A .NET string. + + + +Class representing popup window features. + + + + +When the WPF/OffScreen browser is created, specify if the background supports +transparency + + + + +The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint +will be called for a windowless browser. The actual fps may be lower if +the browser cannot generate frames at the requested rate. The minimum +value is 1 and the maximum value is 60 (default 30). This value can also be +changed dynamically via IBrowserHost.SetWindowlessFrameRate. + + + + +Comma delimited ordered list of language codes without any whitespace that +will be used in the "Accept-Language" HTTP header. May be overridden on a +per-browser basis using the CefBrowserSettings.AcceptLanguageList value. +If both values are empty then "en-US,en" will be used. Can be overridden +for individual RequestContext instances via the +RequestContextSettings.AcceptLanguageList value. + + + + +Opaque background color used for the browser before a document is loaded +and when no document color is specified. By default the background color +will be the same as CefSettings.BackgroundColor. Only the RGB compontents +of the specified value will be used. The alpha component must greater than +0 to enable use of the background color but will be otherwise ignored. + + + + +Controls whether WebGL can be used. Note that WebGL requires hardware +support and may not work on all systems even when enabled. Also +configurable using the "disable-webgl" command-line switch. + + + + +Controls whether the application cache can be used. Also configurable using +the "disable-application-cache" command-line switch. + + + + +Controls whether databases can be used. Also configurable using the +"disable-databases" command-line switch. + + + + +Controls whether local storage can be used. Also configurable using the +"disable-local-storage" command-line switch. + + + + +Controls whether the tab key can advance focus to links. Also configurable +using the "disable-tab-to-links" command-line switch. + + + + +Controls whether text areas can be resized. Also configurable using the +"disable-text-area-resize" command-line switch. + + + + +Controls whether standalone images will be shrunk to fit the page. Also +configurable using the "image-shrink-standalone-to-fit" command-line +switch. + + + + +Controls whether image URLs will be loaded from the network. A cached image +will still be rendered if requested. Also configurable using the +"disable-image-loading" command-line switch. + + + + +Controls whether web security restrictions (same-origin policy) will be +enforced. Disabling this setting is not recommend as it will allow risky +security behavior such as cross-site scripting (XSS). Also configurable +using the "disable-web-security" command-line switch. + + + + +Controls whether file URLs will have access to other file URLs. Also +configurable using the "allow-access-from-files" command-line switch. + + + + +Controls whether file URLs will have access to all URLs. Also configurable +using the "allow-universal-access-from-files" command-line switch. + + + + +Controls whether any plugins will be loaded. Also configurable using the +"disable-plugins" command-line switch. + + + + +Controls whether DOM pasting is supported in the editor via +execCommand("paste"). The |javascript_access_clipboard| setting must also +be enabled. Also configurable using the "disable-javascript-dom-paste" +command-line switch. + + + + +Controls whether JavaScript can access the clipboard. Also configurable +using the "disable-javascript-access-clipboard" command-line switch. + + + + +Controls whether JavaScript can be used to close windows that were not +opened via JavaScript. JavaScript can still be used to close windows that +were opened via JavaScript. Also configurable using the +"disable-javascript-close-windows" command-line switch. + + + + +Controls whether JavaScript can be used for opening windows. Also +configurable using the "disable-javascript-open-windows" command-line +switch. + + + + +Controls whether JavaScript can be executed. +(Disable javascript) + + + + +Controls the loading of fonts from remote sources. Also configurable using +the "disable-remote-fonts" command-line switch. + + + + +Default encoding for Web content. If empty "ISO-8859-1" will be used. Also +configurable using the "default-encoding" command-line switch. + + + + +MinimumLogicalFontSize + + + + +MinimumFontSize + + + + +DefaultFixedFontSize + + + + +DefaultFontSize + + + + +FantasyFontFamily + + + + +CursiveFontFamily + + + + +SansSerifFontFamily + + + + +SerifFontFamily + + + + +FixedFontFamily + + + + +StandardFontFamily + + + + +Internal Constructor + + + + +Default Constructor + + + + +Browser initialization settings. Specify NULL or 0 to get the recommended +default values. The consequences of using custom values may not be well +tested. Many of these and other settings can also configured using command- +line switches. + + + + +Register the Widevine CDM plugin. + +See for more details. + + is a directory that contains the Widevine CDM files + Returns a Task that can be awaited to receive the response. + + + +Register the Widevine CDM plugin. + +The client application is responsible for downloading an appropriate +platform-specific CDM binary distribution from Google, extracting the +contents, and building the required directory structure on the local machine. +The method class can be used +to implement this functionality in CefSharp. Contact Google via +https://www.widevine.com/contact.html for details on CDM download. + + +path is a directory that must contain the following files: + 1. manifest.json file from the CDM binary distribution (see below). + 2. widevinecdm file from the CDM binary distribution (e.g. + widevinecdm.dll on Windows). + 3. widevidecdmadapter file from the CEF binary distribution (e.g. + widevinecdmadapter.dll on Windows). + +If any of these files are missing or if the manifest file has incorrect +contents the registration will fail and callback will receive an ErrorCode +value of . + +The manifest.json file must contain the following keys: + A. "os": Supported OS (e.g. "mac", "win" or "linux"). + B. "arch": Supported architecture (e.g. "ia32" or "x64"). + C. "x-cdm-module-versions": Module API version (e.g. "4"). + D. "x-cdm-interface-versions": Interface API version (e.g. "8"). + E. "x-cdm-host-versions": Host API version (e.g. "8"). + F. "version": CDM version (e.g. "1.4.8.903"). + G. "x-cdm-codecs": List of supported codecs (e.g. "vp8,vp9.0,avc1"). + +A through E are used to verify compatibility with the current Chromium +version. If the CDM is not compatible the registration will fail and +callback will receive an ErrorCode value of . + +If registration is not supported at the time that Cef.RegisterWidevineCdm() is called then callback +will receive an ErrorCode value of . + + is a directory that contains the Widevine CDM files + optional callback - +will be executed asynchronously once registration is complete + + + +Sets or clears a specific key-value pair from the crash metadata. + + + + +Gets the Global Request Context. Make sure to Dispose of this object when finished. + + Returns the global request context or null. + + + +Returns true if called on the specified CEF thread. + + Returns true if called on the specified thread. + + + +Request a one-time geolocation update. +This function bypasses any user permission checks so should only be +used by code that is allowed to access location information. + + Returns 'best available' location info or, if the location update failed, with error info. + + + +Request a one-time geolocation update. +This function bypasses any user permission checks so should only be +used by code that is allowed to access location information. + + Returns 'best available' location info or, if the location update failed, with error info. + + + +Call during process startup to enable High-DPI support on Windows 7 or newer. +Older versions of Windows should be left DPI-unaware because they do not +support DirectWrite and GDI fonts are kerned very badly. + + + + +Unregister an internal plugin. This may be undone the next time RefreshWebPlugins() is called. + + Path (directory + file). + + + +Cause the plugin list to refresh the next time it is accessed regardless of whether it has already been loaded. + + + + +Async returns a list containing Plugin Information +(Wrapper around CefVisitWebPluginInfo) + + Returns List of structs. + + + +Visit web plugin information. Can be called on any thread in the browser process. + + + + +Clear all registered scheme handler factories. + + Returns false on error. + + + +Shuts down CefSharp and the underlying CEF infrastructure. This method is safe to call multiple times; it will only +shut down CEF on the first call (all subsequent calls will be ignored). +This method should be called on the main application thread to shut down the CEF browser process before the application exits. +If you are Using CefSharp.OffScreen then you must call this explicitly before your application exits or it will hang. +This method must be called on the same thread as Initialize. If you don't call Shutdown explicitly then CefSharp.Wpf and CefSharp.WinForms +versions will do their best to call Shutdown for you, if your application is having trouble closing then call thus explicitly. + + + + +Returns the global cookie manager. + + + + Remove all entries from the cross-origin access whitelist. + +Remove all entries from the cross-origin access whitelist. Returns false if +the whitelist cannot be accessed. + + + + Remove entry from cross-origin whitelist + The origin allowed to be accessed by the target protocol/domain. + The target protocol allowed to access the source origin. + The optional target domain allowed to access the source origin. + If set to true would allow a blah.example.com if the + was set to example.com + + +Remove an entry from the cross-origin access whitelist. Returns false if + is invalid or the whitelist cannot be accessed. + + + + Add an entry to the cross-origin whitelist. + The origin allowed to be accessed by the target protocol/domain. + The target protocol allowed to access the source origin. + The optional target domain allowed to access the source origin. + If set to true would allow a blah.example.com if the + was set to example.com + + +The same-origin policy restricts how scripts hosted from different origins +(scheme + domain + port) can communicate. By default, scripts can only access +resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes +(but no other schemes) can use the "Access-Control-Allow-Origin" header to +allow cross-origin requests. For example, https://source.example.com can make +XMLHttpRequest requests on http://target.example.com if the +http://target.example.com request returns an "Access-Control-Allow-Origin: +https://source.example.com" response header. +Scripts in separate frames or iframes and hosted from the same protocol and +domain suffix can execute cross-origin JavaScript if both pages set the +document.domain value to the same domain suffix. For example, +scheme://foo.example.com and scheme://bar.example.com can communicate using +JavaScript if both domains set document.domain="example.com". +This method is used to allow access to origins that would otherwise violate +the same-origin policy. Scripts hosted underneath the fully qualified + URL (like http://www.example.com) will be allowed access to +all resources hosted on the specified and . +If is non-empty and if false only +exact domain matches will be allowed. If contains a top- +level domain component (like "example.com") and is +true sub-domain matches will be allowed. If is empty and + if true all domains and IP addresses will be +allowed. +This method cannot be used to bypass the restrictions on local or display +isolated schemes. See the comments on for more +information. + +This function may be called on any thread. Returns false if +is invalid or the whitelist cannot be accessed. + + + + +This function should be called from the application entry point function to execute a secondary process. +It can be used to run secondary processes from the browser client executable (default behavior) or +from a separate executable specified by the CefSettings.browser_subprocess_path value. +If called for the browser process (identified by no "type" command-line value) it will return immediately with a value of -1. +If called for a recognized secondary process it will block until the process should exit and then return the process exit code. +The |application| parameter may be empty. The |windows_sandbox_info| parameter is only used on Windows and may be NULL (see cef_sandbox_win.h for details). + + + + +Perform a single iteration of CEF message loop processing.This function is +provided for cases where the CEF message loop must be integrated into an +existing application message loop. Use of this function is not recommended +for most users; use CefSettings.MultiThreadedMessageLoop if possible (the deault). +When using this function care must be taken to balance performance +against excessive CPU usage. It is recommended to enable the +CefSettings.ExternalMessagePump option when using +this function so that IBrowserProcessHandler.OnScheduleMessagePumpWork() +callbacks can facilitate the scheduling process. This function should only be +called on the main application thread and only if Cef.Initialize() is called +with a CefSettings.MultiThreadedMessageLoop value of false. This function +will not block. + + + + +Quit the CEF message loop that was started by calling Cef.RunMessageLoop(). +This function should only be called on the main application thread and only +if Cef.RunMessageLoop() was used. + + + + +Run the CEF message loop. Use this function instead of an application- +provided message loop to get the best balance between performance and CPU +usage. This function should only be called on the main application thread and +only if Cef.Initialize() is called with a +CefSettings.MultiThreadedMessageLoop value of false. This function will +block until a quit message is received by the system. + + + + +Initializes CefSharp with user-provided settings. +It's important to note that Initialize/Shutdown MUST be called on your main +applicaiton thread (Typically the UI thead). If you call them on different +threads, your application will hang. See the documentation for Cef.Shutdown() for more details. + + CefSharp configuration settings. + Check that all relevant dependencies avaliable, throws exception if any are missing + true if successful; otherwise, false. + + + +Initializes CefSharp with user-provided settings. +It's important to note that Initialize and Shutdown MUST be called on your main +applicaiton thread (Typically the UI thead). If you call them on different +threads, your application will hang. See the documentation for Cef.Shutdown() for more details. + + CefSharp configuration settings. + true if successful; otherwise, false. + + + +Initializes CefSharp with the default settings. +This function can only be called once, subsiquent calls will result in an Exception. +It's important to note that Initialize and Shutdown MUST be called on your main +applicaiton thread (Typically the UI thead). If you call them on different +threads, your application will hang. See the documentation for Cef.Shutdown() for more details. + + true if successful; otherwise, false. + + + +Gets a value that indicates the Git Hash for CEF version currently being used. + + The Git Commit Hash + + + Gets a value that indicates the Chromium version currently being used. + The Chromium version. + + + Gets a value that indicates the CEF version currently being used. + The CEF Version + + + Gets a value that indicates the version of CefSharp currently being used. + The CefSharp version. + + + Gets a value that indicates whether CefSharp is initialized. + true if CefSharp is initialized; otherwise, false. + + + +Attempts to resolve origin to a list of associated IP addresses using +cached data. This method must be called on the CEF IO thread. Use +Cef.IOThreadTaskFactory to execute on that thread. + + host name to resolve + list of resolved IP +addresses or empty list if no cached data is available. + Returns on success + + + +Attempts to resolve origin to a list of associated IP addresses. + + host name to resolve + A task that represents the Resoolve Host operation. The value of the TResult parameter contains ResolveCallbackResult. + + + +Clears all active and idle connections that Chromium currently has. +This is only recommended if you have released all other CEF objects but +don't yet want to call Cef.Shutdown(). + + If is non-NULL it will be executed on the CEF UI thread after +completion. This param is optional + + + +Clears all certificate exceptions that were added as part of handling +. If you call this it is +recommended that you also call or you risk not +being prompted again for server certificates if you reconnect quickly. + + If is non-NULL it will be executed on the CEF UI thread after +completion. This param is optional + + + +Set the value associated with preference name. If value is null the +preference will be restored to its default value. If setting the preference +fails then error will be populated with a detailed description of the +problem. This method must be called on the CEF UI thread. +Preferences set via the command-line usually cannot be modified. + + preference key + preference value + out error + Returns true if the value is set successfully and false otherwise. +/// Use Cef.UIThreadTaskFactory to execute this method if required, +Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both +executed on the CEF UI thread, so can be called directly. +When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main +application thread will be the CEF UI thread. + + +Returns true if the preference with the specified name can be modified +using SetPreference. As one example preferences set via the command-line +usually cannot be modified. This method must be called on the CEF UI thread. + + preference key + Returns true if the preference with the specified name can be modified +using SetPreference + Use Cef.UIThreadTaskFactory to execute this method if required, +Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both +executed on the CEF UI thread, so can be called directly. +When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main +application thread will be the CEF UI thread. + + + +Returns all preferences as a dictionary. The returned +object contains a copy of the underlying preference values and +modifications to the returned object will not modify the underlying +preference values. This method must be called on the browser process UI +thread. + + If true then +preferences currently at their default value will be included. + Preferences (dictionary can have sub dictionaries) + + + +Returns the value for the preference with the specified name. Returns +NULL if the preference does not exist. The returned object contains a copy +of the underlying preference value and modifications to the returned object +will not modify the underlying preference value. This method must be called +on the CEF UI thread. + + preference name + Returns the value for the preference with the specified name + Use Cef.UIThreadTaskFactory to execute this method if required, +Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both +executed on the CEF UI thread, so can be called directly. +When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main +application thread will be the CEF UI thread. + + + +Returns true if a preference with the specified name exists. This method +must be called on the CEF UI thread. + + name of preference + bool if the preference exists + Use Cef.UIThreadTaskFactory to execute this method if required, +Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both +executed on the CEF UI thread, so can be called directly. +When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main +application thread will be the CEF UI thread. + + + +Tells all renderer processes associated with this context to throw away +their plugin list cache. If reloadPages is true they will also reload +all pages with plugins. RequestContextHandler.OnBeforePluginLoad may +be called to rebuild the plugin list cache. + + reload any pages with pluginst + + + +Returns the cache path for this object. If empty an "incognito mode" +in-memory cache is being used. + + + + +Clear all registered scheme handler factories. + + Returns false on error. + + + +Register a scheme handler factory for the specified schemeName and optional domainName. +An empty domainName value for a standard scheme will cause the factory to match all domain +names. The domainName value will be ignored for non-standard schemes. If schemeName is +a built-in scheme and no handler is returned by factory then the built-in scheme handler +factory will be called. If schemeName is a custom scheme then you must also implement the +CefApp::OnRegisterCustomSchemes() method in all processes. This function may be called multiple +times to change or remove the factory that matches the specified schemeName and optional +domainName. + + Scheme Name + Optional domain name + Scheme handler factory + Returns false if an error occurs. + + + +Returns true if this object is the global context. The global context is +used by default when creating a browser or URL request with a NULL context +argument. + + + + +Returns the default cookie manager for this object. This will be the global +cookie manager if this object is the global request context. Otherwise, +this will be the default cookie manager used when this request context does +not receive a value via IRequestContextHandler.GetCookieManager(). + + If callback is non-NULL it will be executed asnychronously on the CEF IO thread +after the manager's storage has been initialized. + Returns the default cookie manager for this object + + + +Returns true if this object is sharing the same storage as the specified context. + + context to compare + Returns true if same storage + + + +Returns true if this object is pointing to the same context object. + + context to compare + Returns true if the same + + + +Creates a new context object that shares storage with other and uses an +optional handler. + + shares storage with this RequestContext + optional requestContext handler + Returns a nre RequestContext + + + +A request context provides request handling for a set of related browser objects. +A request context is specified when creating a new browser object via the CefBrowserHost +static factory methods. Browser objects with different request contexts will never be +hosted in the same render process. Browser objects with the same request context may or +may not be hosted in the same render process depending on the process model. +Browser objects created indirectly via the JavaScript window.open function or targeted +links will share the same render process and the same request context as the source browser. +When running in single-process mode there is only a single render process (the main process) +and so all browsers created in single-process mode will share the same request context. +This will be the first request context passed into a CefBrowserHost static factory method +and all other request context objects will be ignored. + + + + +Set to true to ignore errors related to invalid SSL certificates. +Enabling this setting can lead to potential security vulnerabilities like +"man in the middle" attacks. Applications that load content from the +internet should not enable this setting. Can be set globally using the +CefSettings.IgnoreCertificateErrors value. This value will be ignored if +CachePath matches the CefSettings.cache_path value. + + + + +Comma delimited ordered list of language codes without any whitespace that +will be used in the "Accept-Language" HTTP header. Can be set globally +using the CefSettings.accept_language_list value or overridden on a per- +browser basis using the BrowserSettings.AcceptLanguageList value. If +all values are empty then "en-US,en" will be used. This value will be +ignored if CachePath matches the CefSettings.CachePath value. + + + + +The location where cache data will be stored on disk. If empty then +browsers will be created in "incognito mode" where in-memory caches are +used for storage and no data is persisted to disk. HTML5 databases such as +localStorage will only persist across sessions if a cache path is +specified. To share the global browser cache and related configuration set +this value to match the CefSettings.CachePath value. + + + + +To persist user preferences as a JSON file in the cache path directory set +this value to true. Can be set globally using the +CefSettings.PersistUserPreferences value. This value will be ignored if +CachePath is empty or if it matches the CefSettings.CachePath value. + + + + +To persist session cookies (cookies without an expiry date or validity +interval) by default when using the global cookie manager set this value to +true. Session cookies are generally intended to be transient and most +Web browsers do not persist them. Can be set globally using the +CefSettings.PersistSessionCookies value. This value will be ignored if +CachePath is empty or if it matches the CefSettings.CachePath value. + + + + +Default constructor + + + + +RequestContextSettings + + + + +Method that will be called when CDM registration is complete. |result| +will be CEF_CDM_REGISTRATION_ERROR_NONE if registration completed +successfully. Otherwise, |result| and |error_message| will contain +additional information about why registration failed. + + + + +Set command line arguments for best OSR (Offscreen and WPF) Rendering performance +This will disable WebGL, look at the source to determine which flags best suite +your requirements. + + + + +Set command line argument to disable GPU Acceleration, this will disable WebGL. + + + + +Registers an extension with the provided settings. + + The CefExtension that contains the extension code. + + + +Registers a custom scheme using the provided settings. + + The CefCustomScheme which provides the details about the scheme. + + + +If true a message will be sent from the render subprocess to the +browser when a DOM node (or no node) gets focus. The default is +false. + + + + +Comma delimited ordered list of language codes without any whitespace that +will be used in the "Accept-Language" HTTP header. May be set globally +using the CefSettings.AcceptLanguageList value. If both values are +empty then "en-US,en" will be used. + + + + +To persist user preferences as a JSON file in the cache path directory set +this value to true. A CachePath value must also be specified +to enable this feature. Also configurable using the +"persist-user-preferences" command-line switch. Can be overridden for +individual RequestContext instances via the +RequestContextSettings.PersistUserPreferences value. + + + + +To persist session cookies (cookies without an expiry date or validity +interval) by default when using the global cookie manager set this value to +true. Session cookies are generally intended to be transient and most +Web browsers do not persist them. A CachePath value must also be +specified to enable this feature. Also configurable using the +"persist-session-cookies" command-line switch. Can be overridden for +individual RequestContext instances via the +RequestContextSettings.PersistSessionCookies value. + + + + +Set to true (1) to enable windowless (off-screen) rendering support. Do not +enable this value if the application does not use windowless rendering as +it may reduce rendering performance on some systems. + + + + +Value that will be returned as the User-Agent HTTP header. If empty the +default User-Agent string will be used. Also configurable using the +"user-agent" command-line switch. + + + + +The number of stack trace frames to capture for uncaught exceptions. +Specify a positive value to enable the CefRenderProcessHandler:: +OnUncaughtException() callback. Specify 0 (default value) and +OnUncaughtException() will not be called. Also configurable using the +"uncaught-exception-stack-size" command-line switch. + + + + +Set to a value between 1024 and 65535 to enable remote debugging on the +specified port. For example, if 8080 is specified the remote debugging URL +will be http://localhost:8080. CEF can be remotely debugged from any CEF or +Chrome browser window. Also configurable using the "remote-debugging-port" +command-line switch. + + + + +Value that will be inserted as the product portion of the default +User-Agent string. If empty the Chromium product version will be used. If +|userAgent| is specified this value will be ignored. Also configurable +using the "product-version" command-line switch. + + + + +Set to true to disable loading of pack files for resources and locales. +A resource bundle handler must be provided for the browser and render +processes via CefApp::GetResourceBundleHandler() if loading of pack files +is disabled. Also configurable using the "disable-pack-loading" command- +line switch. + + + + +Custom flags that will be used when initializing the V8 JavaScript engine. +The consequences of using custom flags may not be well tested. Also +configurable using the "js-flags" command-line switch. + + + + +The log severity. Only messages of this severity level or higher will be +logged. Also configurable using the "log-severity" command-line switch with +a value of "verbose", "info", "warning", "error", "error-report" or +"disable". + + + + +The directory and file name to use for the debug log. If empty a default +log file name and location will be used. On Windows and Linux a "debug.log" +file will be written in the main executable directory. +Also configurable using the"log-file" command-line switch. + + + + +The fully qualified path for the resources directory. If this value is +empty the cef.pak and/or devtools_resources.pak files must be located in +the module directory. Also configurable using the "resources-dir-path" command-line +switch. + + + + +The fully qualified path for the locales directory. If this value is empty +the locales directory must be located in the module directory. +Also configurable using the "locales-dir-path" command-line switch. + + + + +The locale string that will be passed to WebKit. If empty the default +locale of "en-US" will be used. Also configurable using the "lang" +command-line switch. + + + + +Set to true in order to completely ignore SSL certificate errors. +This is NOT recommended. + + + + +The location where user data such as spell checking dictionary files will +be stored on disk. If empty then the default platform-specific user data +directory will be used ("~/.cef_user_data" directory on Linux, +"~/Library/Application Support/CEF/User Data" directory on Mac OS X, +"Local Settings\Application Data\CEF\User Data" directory under the user +profile directory on Windows). + + + + +The location where cache data will be stored on disk. If empty then +browsers will be created in "incognito mode" where in-memory caches are +used for storage and no data is persisted to disk. HTML5 databases such as +localStorage will only persist across sessions if a cache path is +specified. Can be overridden for individual CefRequestContext instances via +the RequestContextSettings.CachePath value. + + + + +The path to a separate executable that will be launched for sub-processes. +By default the browser process executable is used. See the comments on +Cef.ExecuteProcess() for details. Also configurable using the +"browser-subprocess-path" command-line switch. Default is CefSharp.BrowserSubprocess.exe + + + + +thread. If false than the CefDoMessageLoopWork() function must be +called from your application message loop. This option is only supported on +Windows. The default value is true + + + + +Set to true to control browser process main (UI) thread message pump +scheduling via the IBrowserProcessHandler.OnScheduleMessagePumpWork +callback. This option is recommended for use in combination with the +Cef.DoMessageLoopWork() function in cases where the CEF message loop must be +integrated into an existing application message loop (see additional +comments and warnings on Cef.DoMessageLoopWork). Enabling this option is not +recommended for most users; leave this option disabled and use either +MultiThreadedMessageLoop (the default) if possible. + + + + +Set to true to disable configuration of browser process features using +standard CEF and Chromium command-line arguments. Configuration can still +be specified using CEF data structures or by adding to CefCommandLineArgs + + + + +Add custom command line argumens to this collection, they will be +added in OnBeforeCommandLineProcessing. + + + + +Add CefExtensions to be registered + + + + +Add Customs schemes to this collection + + + + +Default Constructor + + + + +Initialization settings. Many of these and other settings can also configured +using command-line switches. + + + + +Load the request represented by the |request| object. + + + + + + \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Wpf.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Wpf.dll new file mode 100644 index 0000000..225e5fd Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Wpf.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Wpf.xml b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Wpf.xml new file mode 100644 index 0000000..809e899 --- /dev/null +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.Wpf.xml @@ -0,0 +1,1526 @@ + + + + CefSharp.Wpf + + + + + DelegateCommand + + + + + + The command handler + + + + + The can execute handler + + + + + Initializes a new instance of the class. + + The command handler. + The can execute handler. + + + + Defines the method to be called when the command is invoked. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + Defines the method that determines whether the command can execute in its current state. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + true if this command can be executed; otherwise, false. + + + + Raises the can execute changed. + + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Internal WpfExtension methods - unlikely you'd need to use these, + they're left public on the off chance you do. + + + + + Gets the modifiers. + + The instance containing the event data. + CefEventFlags. + + + + Gets the modifiers. + + The instance containing the event data. + CefEventFlags. + + + + Gets the drag data wrapper. + + The instance containing the event data. + CefDragDataWrapper. + + + + Gets the link. + + The data. + System.String. + + + + Reads a URL using a particular text encoding from drag-and-drop data. + + The drag-and-drop data. + The data format name of the URL type. + The text encoding of the URL type. + A URL, or if does not contain a URL + of the correct type. + + + + InteropBitmapInfo. + + + + + + WpfBitmapInfo. + + + + + + Invalidates this instance. + + + + + Creates the bitmap. + + BitmapSource. + + + + The pixel format + + + + + Initializes a new instance of the class. + + + + + Clears the bitmap. + + + + + Invalidates this instance. + + + + + Creates the bitmap. + + BitmapSource. + + + + Gets the bitmap. + + The bitmap. + + + + Gets a value indicating whether [create new bitmap]. + + true if [create new bitmap]; otherwise, false. + + + + WPF specific implementation, has reference to some of the commands + and properties the exposes. + + + + + + Navigates to the previous page in the browser history. Will automatically be enabled/disabled depending on the + browser state. + + The back command. + + + + Navigates to the next page in the browser history. Will automatically be enabled/disabled depending on the + browser state. + + The forward command. + + + + Reloads the content of the current page. Will automatically be enabled/disabled depending on the browser state. + + The reload command. + + + + Prints the current browser contents. + + The print command. + + + + Increases the zoom level. + + The zoom in command. + + + + Decreases the zoom level. + + The zoom out command. + + + + Resets the zoom level to the default. (100%) + + The zoom reset command. + + + + Opens up a new program window (using the default text editor) where the source code of the currently displayed web + page is shown. + + The view source command. + + + + Command which cleans up the Resources used by the ChromiumWebBrowser + + The cleanup command. + + + + Stops loading the current page. + + The stop command. + + + + Cut selected text to the clipboard. + + The cut command. + + + + Copy selected text to the clipboard. + + The copy command. + + + + Paste text from the clipboard. + + The paste command. + + + + Select all text. + + The select all command. + + + + Undo last action. + + The undo command. + + + + Redo last action. + + The redo command. + + + + Gets the associated with this instance. + + The dispatcher. + + + + The zoom level at which the browser control is currently displaying. + Can be set to 0 to clear the zoom level (resets to default zoom level). + + The zoom level. + + + + The increment at which the property will be incremented/decremented. + + The zoom level increment. + + + + The title of the web page being currently displayed. + + The title. + This property is implemented as a Dependency Property and fully supports data binding. + + + + ChromiumWebBrowser is the WPF web browser control + + + + + + + + The source + + + + + The source hook + + + + + The tooltip timer + + + + + The tool tip + + + + + The managed cef browser adapter + + + + + The ignore URI change + + + + + The browser created + + + + + The browser initialized - boolean represented as 0 (false) and 1(true) as we use Interlocker to increment/reset + + + + + The matrix + + + + + The image that represents this browser instances + + + + + The popup image + + + + + The popup + + + + + The browser + + + + + The dispose count + + + + + A flag that indicates whether or not the designer is active + NOTE: Needs to be static for OnApplicationExit + + + + + Initializes static members of the class. + + + + + Initializes a new instance of the class. + + Cef::Initialize() failed + + + + Constructor logic has been moved into this method + Required for designer support - this method cannot be inlined as the designer + will attempt to load libcef.dll and will subsiquently throw an exception. + + + + + Finalizes an instance of the class. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Gets the screen information. + + ScreenInfo. + + + + Gets the view rect. + + ViewRect. + + + + Creates the bitmap information. + + if set to true [is popup]. + BitmapInfo. + BitmapFactory cannot be null + + + + Starts the dragging. + + The drag data. + The mask. + The x. + The y. + true if XXXX, false otherwise. + + + + Invokes the render asynchronous. + + The bitmap information. + + + + Sets the popup size and position. + + The width. + The height. + The x. + The y. + + + + Sets the popup is open. + + if set to true [is open]. + + + + Sets the cursor. + + The handle. + The type. + + + + Sets the address. + + The instance containing the event data. + + + + Sets the loading state change. + + The instance containing the event data. + + + + Sets the title. + + The instance containing the event data. + + + + Sets the tooltip text. + + The tooltip text. + + + + Handles the event. + + The instance containing the event data. + + + + Handles the event. + + The instance containing the event data. + + + + Handles the event. + + The instance containing the event data. + + + + Handles the event. + + The instance containing the event data. + + + + Handles the event. + + The instance containing the event data. + + + + Called when [after browser created]. + + The browser. + + + + The can go back property + + + + + The can go forward property + + + + + The address property + + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Called when [address changed]. + + The old value. + The new value. + + + + The is loading property + + + + + The is browser initialized property + + + + + Handles the event. + + The d. + The instance containing the event data. + + + + Called when [is browser initialized changed]. + + if set to true [old value]. + if set to true [new value]. + + + + The title property + + + + + Handles the event. + + The d. + The instance containing the event data. + + + + The zoom level property + + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Called when [zoom level changed]. + + The old value. + The new value. + + + + The zoom level increment property + + + + + The cleanup element property + + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Called when [cleanup element changed]. + + The old value. + The new value. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + The tooltip text property + + + + + Called when [tooltip text changed]. + + + + + The WebBrowser property + + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Converts .NET drag drop effects to CEF Drag Operations + + The drag drop effects. + DragOperationsMask. + s + + + + Gets the drag effects. + + The mask. + DragDropEffects. + + + + PresentationSource changed handler. + + The sender. + The instance containing the event data. + + + + Removes the source hook. + + + + + Create the underlying Browser instance, can be overriden to defer control creation + The browser will only be created when size > Size(0,0). If you specify a positive + size then the browser will be created, if the ActualWidth and ActualHeight + properties are in reality still 0 then you'll likely end up with a browser that + won't render. + + size of the current control, must be greater than Size(0, 0) + bool to indicate if browser was created. If the browser has already been created then this will return false. + + + + Runs the specific Action on the Dispatcher in an async fashion + + The action. + The priority. + + + + Runs the specific Action on the Dispatcher in an sync fashion + + The action. + The priority. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Required for designer support - this method cannot be inlined as the designer + will attempt to load libcef.dll and will subsiquently throw an exception. + + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Creates the image. + + Image. + + + + Creates the popup. + + Popup. + + + + WindowProc callback interceptor. Handles Windows messages intended for the source hWnd, and passes them to the + contained browser as needed. + + The source handle. + The message. + Additional message info. + Even more message info. + if set to true, the event has already been handled by someone else. + IntPtr. + + + + Converts a .NET Drag event to a CefSharp MouseEvent + + The instance containing the event data. + MouseEvent. + + + + Sets the popup size and position implementation. + + The width. + The height. + The x. + The y. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Updates the tooltip. + + The text. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Handles the event. + + The sender. + The instance containing the event data. + + + + Invoked when an unhandled  attached event reaches an + element in its route that is derived from this class. Implement this method to add class handling for this event. + + The that contains the event data. + + + + Invoked when an unhandled  attached event reaches an + element in its route that is derived from this class. Implement this method to add class handling for this event. + + The that contains the event data. + + + + Handles the event. + + The instance containing the event data. + + + + Invoked when an unhandled  attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. + + The that contains the event data. + + + + Invoked when an unhandled  attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. + + The that contains the event data. + + + + Captures the mouse when the popup is opened. + + The sender. + The instance containing the event data. + + + + Releases mouse capture when the popup is closed. + + The sender. + The instance containing the event data. + + + + Invoked when an unhandled  attached event reaches an + element in its route that is derived from this class. Implement this method to add class handling for this event. + + The that contains the event data. + This event data reports details about the mouse button that was pressed and the handled state. + + + + Invoked when an unhandled  routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. + + The that contains the event data. The event data reports that the mouse button was released. + + + + Invoked when an unhandled  attached event is raised on this element. Implement this method to add class handling for this event. + + The that contains the event data. + + + + Handles the event. + + The instance containing the event data. + + + + Loads the specified URL. + + The URL to be loaded. + + + + Zooms the browser in. + + + + + Zooms the browser out. + + + + + Reset the browser's zoom level to default. + + + + + Registers a Javascript object in this specific browser instance. + + The name of the object. (e.g. "foo", if you want the object to be accessible as window.foo). + The object to be made accessible to Javascript. + binding options - camelCaseJavascriptNames default to true + Browser is already initialized. RegisterJsObject must be + + called before the underlying CEF browser is created. + + + + Asynchronously registers a Javascript object in this specific browser instance. + Only methods of the object will be availabe. + + The name of the object. (e.g. "foo", if you want the object to be accessible as window.foo). + The object to be made accessible to Javascript. + binding options - camelCaseJavascriptNames default to true + Browser is already initialized. RegisterJsObject must be + + called before the underlying CEF browser is created. + The registered methods can only be called in an async way, they will all return immeditaly and the resulting + object will be a standard javascript Promise object which is usable to wait for completion or failure. + + + + Raises Rendering event + + The sender. + The bitmap information. + + + + Returns the current IBrowser Instance + + browser instance or null + + + + Check is browserisinitialized + + true if browser is initialized + + + + Gets or sets the browser settings. + + The browser settings. + + + + Gets or sets the request context. + + The request context. + + + + Implement and assign to handle dialog events. + + The dialog handler. + + + + Implement and assign to handle events related to JavaScript Dialogs. + + The js dialog handler. + + + + Implement and assign to handle events related to key press. + + The keyboard handler. + + + + Implement and assign to handle events related to browser requests. + + The request handler. + + + + Implement and assign to handle events related to downloading files. + + The download handler. + + + + Implement and assign to handle events related to browser load status. + + The load handler. + + + + Implement and assign to handle events related to popups. + + The life span handler. + + + + Implement and assign to handle events related to browser display state. + + The display handler. + + + + Implement and assign to handle events related to the browser context menu + + The menu handler. + + + + Implement and assign to handle events related to the browser component's focus + + The focus handler. + + + + Implement and assign to handle events related to dragging. + + The drag handler. + + + + Implement and control the loading of resources + + The resource handler factory. + + + + Implement and assign to handle requests for permission to use geolocation. + + The geolocation handler. + + + + Gets or sets the bitmap factory. + + The bitmap factory. + + + + Implement and assign to handle messages from the render process. + + The render process message handler. + + + + Implement to handle events related to find results. + + The find handler. + + + + Event handler for receiving Javascript console messages being sent from web pages. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + (The exception to this is when your running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread). + + + + + Event handler for changes to the status message. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + (The exception to this is when your running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread). + + + + + Event handler that will get called when the browser begins loading a frame. Multiple frames may be loading at the same + time. Sub-frames may start or continue loading after the main frame load has ended. This method may not be called for a + particular frame if the load request for that frame fails. For notification of overall browser load status use + OnLoadingStateChange instead. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + + Whilst this may seem like a logical place to execute js, it's called before the DOM has been loaded, implement + as it's called when the underlying V8Context is created + (Only called for the main frame at this stage) + + + + Event handler that will get called when the browser is done loading a frame. Multiple frames may be loading at the same + time. Sub-frames may start or continue loading after the main frame load has ended. This method will always be called + for all frames irrespective of whether the request completes successfully. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + + + + + Event handler that will get called when the resource load for a navigation fails or is canceled. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + + + + + Event handler that will get called when the Loading state has changed. + This event will be fired twice. Once when loading is initiated either programmatically or + by user action, and once when loading is terminated due to completion, cancellation of failure. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + + + + + Raised before each render cycle, and allows you to adjust the bitmap before it's rendered/applied + + + + + Navigates to the previous page in the browser history. Will automatically be enabled/disabled depending on the + browser state. + + The back command. + + + + Navigates to the next page in the browser history. Will automatically be enabled/disabled depending on the + browser state. + + The forward command. + + + + Reloads the content of the current page. Will automatically be enabled/disabled depending on the browser state. + + The reload command. + + + + Prints the current browser contents. + + The print command. + + + + Increases the zoom level. + + The zoom in command. + + + + Decreases the zoom level. + + The zoom out command. + + + + Resets the zoom level to the default. (100%) + + The zoom reset command. + + + + Opens up a new program window (using the default text editor) where the source code of the currently displayed web + page is shown. + + The view source command. + + + + Command which cleans up the Resources used by the ChromiumWebBrowser + + The cleanup command. + + + + Stops loading the current page. + + The stop command. + + + + Cut selected text to the clipboard. + + The cut command. + + + + Copy selected text to the clipboard. + + The copy command. + + + + Paste text from the clipboard. + + The paste command. + + + + Select all text. + + The select all command. + + + + Undo last action. + + The undo command. + + + + Redo last action. + + The redo command. + + + + A flag that indicates if you can execute javascript in the main frame. + Flag is set to true in IRenderProcessMessageHandler.OnContextCreated. + and false in IRenderProcessMessageHandler.OnContextReleased + + + + + Gets the browser adapter. + + The browser adapter. + + + + Gets or sets a value indicating whether this instance has parent. + + true if this instance has parent; otherwise, false. + + + + A flag that indicates whether the state of the control current supports the GoBack action (true) or not (false). + + true if this instance can go back; otherwise, false. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + A flag that indicates whether the state of the control currently supports the GoForward action (true) or not (false). + + true if this instance can go forward; otherwise, false. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + The address (URL) which the browser control is currently displaying. + Will automatically be updated as the user navigates to another page (e.g. by clicking on a link). + + The address. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + A flag that indicates whether the control is currently loading one or more web pages (true) or not (false). + + true if this instance is loading; otherwise, false. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + A flag that indicates whether the WebBrowser is initialized (true) or not (false). + + true if this instance is browser initialized; otherwise, false. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + Event handler that will get called when the browser has finished initializing + + + + + The title of the web page being currently displayed. + + The title. + This property is implemented as a Dependency Property and fully supports data binding. + + + + Event handler that will get called when the browser title changes + + + + + The zoom level at which the browser control is currently displaying. + Can be set to 0 to clear the zoom level (resets to default zoom level). + + The zoom level. + + + + Specifies the amount used to increase/decrease to ZoomLevel by + By Default this value is 0.10 + + The zoom level increment. + + + + The CleanupElement Controls when the BrowserResources will be cleaned up. + The ChromiumWebBrowser will register on Unloaded of the provided Element and dispose all resources when that handler is called. + By default the cleanup element is the Window that contains the ChromiumWebBrowser. + if you want cleanup to happen earlier provide another FrameworkElement. + Be aware that this Control is not usable anymore after cleanup is done. + + The cleanup element. + + + + The text that will be displayed as a ToolTip + + The tooltip text. + + + + Gets or sets the WebBrowser. + + The WebBrowser. + + + + Gets a value indicating whether this instance is disposed. + + true if this instance is disposed; otherwise, false. + + + + Event arguments to the Rendering event handler set up in IWebBrowser. + + + + + + Initializes a new instance of the class. + + The bitmap information. + + + + The bitmap info being rendered. + + The bitmap information. + + + + BitmapFactory. + + + + + + The default dpi + + + + + Create an instance of BitmapInfo based on the params + + create bitmap info for a popup (typically just a bool flag used internally) + DPI scale + newly created BitmapInfo + + + + The WM_KEYDOWN message is posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem + key is a key that is pressed when the ALT key is not pressed. + + + + + The WM_KEYUP message is posted to the window with the keyboard focus when a nonsystem key is released. A nonsystem + key is a key that is pressed when the ALT key is not pressed, or a keyboard key that is pressed when a window has the + keyboard focus. + + + + + The WM_CHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the + TranslateMessage function. The WM_CHAR message contains the character code of the key that was pressed. + + + + + The WM_SYSKEYDOWN message is posted to the window with the keyboard focus when the user presses the F10 key (which + activates the menu bar) or holds down the ALT key and then presses another key. It also occurs when no window + currently has the keyboard focus; in this case, the WM_SYSKEYDOWN message is sent to the active window. The window + that receives the message can distinguish between these two contexts by checking the context code in the lParam + parameter. + + + + + The WM_SYSKEYUP message is posted to the window with the keyboard focus when the user releases a key that was pressed + while the ALT key was held down. It also occurs when no window currently has the keyboard focus; in this case, the + WM_SYSKEYUP message is sent to the active window. The window that receives the message can distinguish between these + two contexts by checking the context code in the lParam parameter. + + + + + The WM_SYSCHAR message is posted to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by + the TranslateMessage function. It specifies the character code of a system character key — that is, a character key + that is pressed while the ALT key is down. + + + + + Sent to an application when the IME gets a character of the conversion result. A window receives this message through + its WindowProc function. + + + + + Uses WriteableBitmap to create a bitmap from the backbuffer + + + + + + The pixel format + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The dpi x. + The dpi y. + + + + Clears the bitmap. + + + + + Invalidates this instance. + + + + + Creates the bitmap. + + BitmapSource. + + + + Gets the bitmap. + + The bitmap. + + + + Gets the dpi x. + + The dpi x. + + + + Gets the dpi y. + + The dpi y. + + + + Gets a value indicating whether [create new bitmap]. + + true if [create new bitmap]; otherwise, false. + + + diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.dll b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.dll new file mode 100644 index 0000000..755af26 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.xml b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.xml new file mode 100644 index 0000000..cf2097d --- /dev/null +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/References/CefSharp.xml @@ -0,0 +1,7720 @@ + + + + CefSharp + + + + + Deletes all cookies that matches all the provided parameters asynchronously. + If both and are empty, all cookies will be deleted. + + The cookie URL. If an empty string is provided, any URL will be matched. + The name of the cookie. If an empty string is provided, any URL will be matched. + Returns null if a non-empty invalid URL is specified, or if cookies cannot be accessed; + otherwise, a task that represents the delete operation. The value of the TResult will be the number of cookies that were deleted or -1 if unknown. + + + + Sets a cookie given a valid URL and explicit user-provided cookie attributes. + This function expects each attribute to be well-formed. It will check for disallowed + characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting + + cookie manager + The cookie URL. If an empty string is provided, any URL will be matched. + the cookie to be set + returns null if the cookie cannot be set (e.g. if illegal charecters such as ';' are used); + otherwise task that represents the set operation. The value of the TResult parameter contains a bool to indicate success. + + + + Visits all cookies. The returned cookies are sorted by longest path, then by earliest creation date. + + A task that represents the VisitAllCookies operation. The value of the TResult parameter contains a List of cookies. + + + + Visits a subset of the cookies. The results are filtered by the given url scheme, host, domain and path. + If is true, HTTP-only cookies will also be included in the results. The returned cookies + are sorted by longest path, then by earliest creation date. + + The URL to use for filtering a subset of the cookies available. + A flag that determines whether HTTP-only cookies will be shown in results. + A task that represents the VisitUrlCookies operation. The value of the TResult parameter contains a List of cookies. + + + + Flush the backing store (if any) to disk. + + cookieManager instance + A task that represents the FlushStore operation. Result indicates if the flush completed successfully. + Will return null if the cookikes cannot be accessed. + + + + Javascript binding options + + + + + Set of options with the default binding + + + + + camel case the javascript names of properties/methods, defaults to true + + + + + model binder used for passing complex classes as params to methods + + + + + Callback interface used for asynchronous continuation of authentication requests. + + + + + Continue the authentication request. + + requested username + requested password + + + + Cancel the authentication request. + + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Callback interface used to asynchronously continue a download. + + + + + Call to continue the download. + + full file path for the download including the file name + or leave blank to use the suggested name and the default temp directory + Set to true if you do wish to show the default "Save As" dialog + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Generic callback interface used for asynchronous continuation. + + + + + Continue processing. + + + + + Cancel processing. + + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Generic callback interface used for asynchronous completion. + + + + + Method that will be called once the task is complete. + + + + + Interface to implement to be notified of asynchronous completion via ICookieManager.DeleteCookies(). + It will be executed asnychronously on the CEF IO thread after the cookie has been deleted + + + + + Method that will be called upon completion. + + will be the number of cookies that were deleted or -1 if unknown. + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Callback interface used to asynchronously cancel a download. + + + + + Call to cancel the download. + + + + + Call to pause the download. + + + + + Call to resume the download. + + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Callback interface for asynchronous continuation of file dialog requests. + + + + + Continue the file selection. + + should be the 0-based index of the value selected from the accept filters + array passed to + should be a single value or a list of values depending on the dialog mode. + An empty value is treated the same as calling Cancel(). + + + + Cancel the file selection. + + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Callback interface used for asynchronous continuation of geolocation permission requests. + + + + + Call to allow or deny geolocation access. + + true to allow + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Implement this interface to receive geolocation updates. The methods of this + class will be called on the CEF UI thread. + + + + + Called with the 'best available' location information or, + if the location update failed, with error information. + + geo position + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Callback Id + + + + + Check to see if the underlying resource are still available to execute the callback + + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Continue the Javascript dialog request. + + Set to true if the OK button was pressed. + value should be specified for prompt dialogs. + + + + Continue the Javascript dialog request. + + Set to true if the OK button was pressed. + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Callback interface for . The methods of this interface + will be called on the CEF UI thread. + + + + + Method that will be executed when the PDF printing has completed. + + The output path. + Will be true if the printing completed + successfully or false otherwise. + + + + Content Decryption Module (CDM) registration callback used for asynchronous completion. + + + + + Method that will be called once CDM registration is complete + + The result of the CDM registration process + + + + Continue the url request. + + If is true the request will be continued, otherwise, the request will be canceled. + + + + Cancel the url request. + + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Called after the ResolveHost request has completed. + + The result code + will be the list of resolved IP addresses or + empty if the resolution failed. + + + + Complete context menu display by selecting the specified commandId and eventFlags; + + the command Id + the event flags + + + + Cancel context menu display. + + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Callback interface used to select a client certificate for authentication. + + + + + Callback interface used to select a client certificate for authentication. + + selected certificate + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Interface to implement to be notified of asynchronous completion via ICookieManager.SetCookie(). + It will be executed asnychronously on the CEF IO thread after the cookie has been set + + + + + Method that will be called upon completion. + + success will be true if the cookie was set successfully. + + + + Gets a value indicating whether the callback has been disposed of. + + + + + Provides a callback implementation of for use with geo positioning + + + + + Provides a callback implementation of . + + + + + Provides a callback implementation of . + + + + + Provides a callback implementation of for use with asynchronous Widevine CDM registration. + + + + + Represents the response to an attempt to register the Widevine Content Decryption Module (CDM) + + + + + If CDM registration succeeded then value will be , for other values see the enumeration . + + + + + Contains an error message containing additional information if is not . + + + + + X coordinate + + + + + Y coordinate + + + + + Width + + + + + Height + + + + + Represents a new V8 extension to be registered. + + + + + Creates a new CwefExtension instance with a given name. + + Name of the CefExtension + The javascript extension code. + + + + Gets the name of the extension. + + + + + Gets the javascript extension code + + + + + CefLibraryHandle is a SafeHandle that Loads libcef.dll and relesases it when disposed/finalized + Calls LoadLibraryEx with LoadLibraryFlags.LOAD_WITH_ALTERED_SEARCH_PATH + Make sure to set settings.BrowserSubprocessPath and settings.LocalesDirPath + + Adapted from http://www.pinvoke.net/default.aspx/kernel32.loadlibraryex + + + + In general not a fan of having inline classes/enums + In this case it's not something that I'd like to see exposed + as it's just a helper and outside the scope of the project + + + + + Represents an IME composition underline. + + + + + Underline character range. + + + + + Text color. 32-bit ARGB color value, not premultiplied. The color components are always + in a known order. Equivalent to the SkColor type. + + + + + Background color. 32-bit ARGB color value, not premultiplied. The color components are always + in a known order. Equivalent to the SkColor type. + + + + + true for thickunderline + + + + + Represents a node in the browser's DOM. + + + + + Represents the tag name and attribute data belonging to a node in the + browser's DOM. + + + + + Determine if the DomNode has the requested attribute. + + + The name of the attribute value. + + + True if the attribute exists in the DomNode, false if it does not. + + + + + Get the value of an attribute. + + + The name of the attribute value to get. + + + The attribute value if the name exists in the DomNode's attributes. + Null if the name does not exist. + + + + + The name of the HTML element. + + + + + Get a read only list of the attribute names. + + + + + Representing a draggable region. + + + + + Creates a new DraggableRegion + + width + height + x coordinate + y coordinate + is draggable? + + + + Width + + + + + Height + + + + + X coordinate + + + + + Y coordinate + + + + + Is this region draggable + + + + + Lists the errors that can be reported during Widevine Content Decryption Module (CDM) registration. + + + + + No error. Registration completed successfully. + + + + + Required files or manifest contents are missing. + + + + + The CDM is incompatible with the current Chromium version. + + + + + CDM registration is not supported at this time. + + + + + Cursor type values. + + + + + Lists some of the error codes that can be reported by CEF. + + For a complete up-to-date list, see the CEF source code + (cef_errorcode_t in include/internal/cef_types.h) + and the Chromium source code (net/base/net_error_list.h). + + + + + No error occurred. + + + + + An asynchronous IO operation is not yet complete. This usually does not + indicate a fatal error. Typically this error will be generated as a + notification to wait for some external notification that the IO operation + finally completed. + + + + + A generic failure occurred. + + + + + A request was aborted, possibly by the user. + + + + + An argument to the function is incorrect. + + + + + The handle or file descriptor is invalid. + + + + + The file or directory cannot be found. + + + + + An operation timed out. + + + + + The file is too large. + + + + + An unexpected error. This may be caused by a programming mistake or an invalid assumption + + + + + Permission to access a resource, other than the network, was denied. + + + + + The operation failed because of unimplemented functionality. + + + + + There were not enough resources to complete the operation. + + + + + Memory allocation failed. + + + + + The file upload failed because the file's modification time was different + from the expectation. + + + + + The socket is not connected. + + + + + The file already exists. + + + + + The path or file name is too long. + + + + + Not enough room left on the disk. + + + + + The file has a virus. + + + + + The client chose to block the request. + + + + + The network changed. + + + + + The request was blocked by the URL blacklist configured by the domain + administrator. + + + + + The socket is already connected. + + + + + The request was blocked because the forced reenrollment check is still + pending. This error can only occur on ChromeOS. + The error can be emitted by code in chrome/browser/policy/policy_helpers.cc. + + + + + A connection was closed (corresponding to a TCP FIN). + + + + + A connection was reset (corresponding to a TCP RST). + + + + + A connection attempt was refused. + + + + + A connection timed out as a result of not receiving an ACK for data sent. + This can include a FIN packet that did not get ACK'd. + + + + + A connection attempt failed. + + + + + The host name could not be resolved. + + + + + The Internet connection has been lost. + + + + + An SSL protocol error occurred. + + + + + The IP address or port number is invalid (e.g., cannot connect to the IP address 0 or the port 0). + + + + + The IP address is unreachable. This usually means that there is no route to the specified host or network. + + + + + The server requested a client certificate for SSL client authentication. + + + + + A tunnel connection through the proxy could not be established. + + + + + No SSL protocol versions are enabled. + + + + + The client and server don't support a common SSL protocol version or cipher suite. + + + + + The server requested a renegotiation (rehandshake). + + + + + The proxy requested authentication (for tunnel establishment) with an + unsupported method. + + + + + During SSL renegotiation (rehandshake), the server sent a certificate with + an error. + + Note: this error is not in the -2xx range so that it won't be handled as a + certificate error. + + + + + The SSL handshake failed because of a bad or missing client certificate. + + + + + A connection attempt timed out. + + + + + There are too many pending DNS resolves, so a request in the queue was + aborted. + + + + + Failed establishing a connection to the SOCKS proxy server for a target host. + + + + + The SOCKS proxy server failed establishing connection to the target host + because that host is unreachable. + + + + + The request to negotiate an alternate protocol failed. + + + + + The peer sent an SSL no_renegotiation alert message. + + + + + Winsock sometimes reports more data written than passed. This is probably + due to a broken LSP. + + + + + An SSL peer sent us a fatal decompression_failure alert. This typically + occurs when a peer selects DEFLATE compression in the mistaken belief that + it supports it. + + + + + An SSL peer sent us a fatal bad_record_mac alert. This has been observed + from servers with buggy DEFLATE support. + + + + + The proxy requested authentication (for tunnel establishment). + + + + + A known TLS strict server didn't offer the renegotiation extension. + + + + + The SSL server attempted to use a weak ephemeral Diffie-Hellman key. + + + + + Could not create a connection to the proxy server. An error occurred + either in resolving its name, or in connecting a socket to it. + Note that this does NOT include failures during the actual "CONNECT" method + of an HTTP proxy. + + + + + A mandatory proxy configuration could not be used. Currently this means + that a mandatory PAC script could not be fetched, parsed or executed. + + + + + We've hit the max socket limit for the socket pool while preconnecting. We + don't bother trying to preconnect more sockets. + + + + + The permission to use the SSL client certificate's private key was denied. + + + + + The SSL client certificate has no private key. + + + + + The certificate presented by the HTTPS Proxy was invalid. + + + + + An error occurred when trying to do a name resolution (DNS). + + + + + Permission to access the network was denied. This is used to distinguish + errors that were most likely caused by a firewall from other access denied + errors. See also ERR_ACCESS_DENIED. + + + + + The request throttler module cancelled this request to avoid DDOS. + + + + + A request to create an SSL tunnel connection through the HTTPS proxy + received a non-200 (OK) and non-407 (Proxy Auth) response. The response + body might include a description of why the request failed. + + + + + We were unable to sign the CertificateVerify data of an SSL client auth + handshake with the client certificate's private key. + + Possible causes for this include the user implicitly or explicitly + denying access to the private key, the private key may not be valid for + signing, the key may be relying on a cached handle which is no longer + valid, or the CSP won't allow arbitrary data to be signed. + + + + + The message was too large for the transport. (for example a UDP message + which exceeds size threshold). + + + + + A SPDY session already exists, and should be used instead of this connection. + + + + + Websocket protocol error. Indicates that we are terminating the connection + due to a malformed frame or other protocol violation. + + + + + Connection was aborted for switching to another ptotocol. + WebSocket abort SocketStream connection when alternate protocol is found. + + + + + Returned when attempting to bind an address that is already in use. + + + + + An operation failed because the SSL handshake has not completed. + + + + + SSL peer's public key is invalid. + + + + + The certificate didn't match the built-in public key pins for the host name. + The pins are set in net/http/transport_security_state.cc and require that + one of a set of public keys exist on the path from the leaf to the root. + + + + + Server request for client certificate did not contain any types we support. + + + + + Server requested one type of cert, then requested a different type while the + first was still being generated. + + + + + An SSL peer sent us a fatal decrypt_error alert. This typically occurs when + a peer could not correctly verify a signature (in CertificateVerify or + ServerKeyExchange) or validate a Finished message. + + + + + There are too many pending WebSocketJob instances, so the new job was not + pushed to the queue. + + + + + There are too many active SocketStream instances, so the new connect request + was rejected. + + + + + The SSL server certificate changed in a renegotiation. + + + + + The SSL server indicated that an unnecessary TLS version fallback was + performed. + + + + + Certificate Transparency: All Signed Certificate Timestamps failed to verify. + + + + + The SSL server sent us a fatal unrecognized_name alert. + + + + + Failed to set the socket's receive buffer size as requested. + + + + + Failed to set the socket's send buffer size as requested. + + + + + Failed to set the socket's receive buffer size as requested, despite success + return code from setsockopt. + + + + + Failed to set the socket's send buffer size as requested, despite success + return code from setsockopt. + + + + + Failed to import a client certificate from the platform store into the SSL + library. + + + + + The server responded with a certificate whose common name did not match the host name. + This could mean: + 1. An attacker has redirected our traffic to his server and is presenting a certificate + for which he knows the private key. + 2. The server is misconfigured and responding with the wrong cert. + 3. The user is on a wireless network and is being redirected to the network's login page. + 4. The OS has used a DNS search suffix and the server doesn't have a certificate for the + abbreviated name in the address bar. + + + + + The server responded with a certificate that, by our clock, appears to either not yet be valid or to have expired. + This could mean: + 1. An attacker is presenting an old certificate for which he has managed to obtain the private key + 2. The server is misconfigured and is not presenting a valid cert. + 3. Our clock is wrong. + + + + + The server responded with a certificate that is signed by an authority we don't trust. + The could mean: + 1. An attacker has substituted the real certificate for a cert that + contains his public key and is signed by his cousin. + 2. The server operator has a legitimate certificate from a CA we don't know about, but should trust. + 3. The server is presenting a self-signed certificate, providing no defense against active attackers (but foiling passive attackers). + + + + + The server responded with a certificate that contains errors. This error is not recoverable. + MSDN describes this error as follows: + "The SSL certificate contains errors." + NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency, + use that code instead of this one from now on. + + + + + The certificate has no mechanism for determining if it is revoked. In effect, this certificate cannot be revoked. + + + + + Revocation information for the security certificate for this site is not available. + This could mean: + 1. An attacker has compromised the private key in the certificate and is blocking our attempt to + find out that the cert was revoked. + 2. The certificate is unrevoked, but the revocation server is busy or unavailable. + + + + + The server responded with a certificate has been revoked. + We have the capability to ignore this error, but it is probably not the thing to do. + + + + + The server responded with a certificate that is invalid. This error is not recoverable. + + + + + The server responded with a certificate that is signed using a weak + signature algorithm. + + + + + The host name specified in the certificate is not unique. + + + + + The server responded with a certificate that contains a weak key (e.g. + a too-small RSA key). + + + + + The certificate claimed DNS names that are in violation of name constraints. + + + + + Add new certificate error codes here. + + Update the value of CERT_END whenever you add a new certificate error + code. + + The value immediately past the last certificate error code. + + + + + The URL is invalid. + + + + + The scheme of the URL is disallowed. + + + + + The scheme of the URL is unknown. + + + + + Attempting to load an URL resulted in too many redirects. + + + + + Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect to file:// is considered unsafe). + + + + + Attempting to load an URL with an unsafe port number. These are port + numbers that correspond to services, which are not robust to spurious input + that may be constructed as a result of an allowed web construct (e.g., HTTP + looks a lot like SMTP, so form submission to port 25 is denied). + + + + + The server's response was invalid. + + + + + Error in chunked transfer encoding. + + + + + The server did not support the request method. + + + + + The response was 407 (Proxy Authentication Required), yet we did not send the request to a proxy. + + + + + The server closed the connection without sending any data. + + + + + The headers section of the response is too large. + + + + + The PAC requested by HTTP did not have a valid status code (non-200). + + + + + The evaluation of the PAC script failed. + + + + + The response was 416 (Requested range not satisfiable) and the server cannot + satisfy the range requested. + + + + + The identity used for authentication is invalid. + + + + + Content decoding of the response body failed. + + + + + An operation could not be completed because all network IO + is suspended. + + + + + FLIP data received without receiving a SYN_REPLY on the stream. + + + + + Converting the response to target encoding failed. + + + + + The server sent an FTP directory listing in a format we do not understand. + + + + + Attempted use of an unknown SPDY stream id. + + + + + There are no supported proxies in the provided list. + + + + + There is a SPDY protocol error. + + + + + Credentials could not be established during HTTP Authentication. + + + + + An HTTP Authentication scheme was tried which is not supported on this + machine. + + + + + Detecting the encoding of the response failed. + + + + + (GSSAPI) No Kerberos credentials were available during HTTP Authentication. + + + + + An unexpected, but documented, SSPI or GSSAPI status code was returned. + + + + + The environment was not set up correctly for authentication (for + example, no KDC could be found or the principal is unknown. + + + + + An undocumented SSPI or GSSAPI status code was returned. + + + + + The HTTP response was too big to drain. + + + + + The HTTP response contained multiple distinct Content-Length headers. + + + + + SPDY Headers have been received, but not all of them - status or version + headers are missing, so we're expecting additional frames to complete them. + + + + + No PAC URL configuration could be retrieved from DHCP. This can indicate + either a failure to retrieve the DHCP configuration, or that there was no + PAC URL configured in DHCP. + + + + + The HTTP response contained multiple Content-Disposition headers. + + + + + The HTTP response contained multiple Location headers. + + + + + SPDY server refused the stream. Client should retry. This should never be a + user-visible error. + + + + + SPDY server didn't respond to the PING message. + + + + + The HTTP response body transferred fewer bytes than were advertised by the + Content-Length header when the connection is closed. + + + + + The HTTP response body is transferred with Chunked-Encoding, but the + terminating zero-length chunk was never sent when the connection is closed. + + + + + There is a QUIC protocol error. + + + + + The HTTP headers were truncated by an EOF. + + + + + The QUIC crytpo handshake failed. This means that the server was unable + to read any requests sent, so they may be resent. + + + + + An https resource was requested over an insecure QUIC connection. + + + + + Transport security is inadequate for the SPDY version. + + + + + The peer violated SPDY flow control. + + + + + The peer sent an improperly sized SPDY frame. + + + + + Decoding or encoding of compressed SPDY headers failed. + + + + + Proxy Auth Requested without a valid Client Socket Handle. + + + + + The cache does not have the requested entry. + + + + + Unable to read from the disk cache. + + + + + Unable to write to the disk cache. + + + + + The operation is not supported for this entry. + + + + + The disk cache is unable to open this entry. + + + + + The disk cache is unable to create this entry. + + + + + Multiple transactions are racing to create disk cache entries. This is an + internal error returned from the HttpCache to the HttpCacheTransaction that + tells the transaction to restart the entry-creation logic because the state + of the cache has changed. + + + + + The cache was unable to read a checksum record on an entry. This can be + returned from attempts to read from the cache. It is an internal error, + returned by the SimpleCache backend, but not by any URLRequest methods + or members. + + + + + The cache found an entry with an invalid checksum. This can be returned from + attempts to read from the cache. It is an internal error, returned by the + SimpleCache backend, but not by any URLRequest methods or members. + + + + + Internal error code for the HTTP cache. The cache lock timeout has fired. + + + + + The server's response was insecure (e.g. there was a cert error). + + + + + The server responded to a <keygen> with a generated client cert that we + don't have the matching private key for. + + + + + An error adding to the OS certificate database (e.g. OS X Keychain). + + + + + A generic error for failed FTP control connection command. + If possible, please use or add a more specific error code. + + + + + The server cannot fulfill the request at this point. This is a temporary + error. + FTP response code 421. + + + + + The server has aborted the transfer. + FTP response code 426. + + + + + The file is busy, or some other temporary error condition on opening + the file. + FTP response code 450. + + + + + Server rejected our command because of syntax errors. + FTP response codes 500, 501. + + + + + Server does not support the command we issued. + FTP response codes 502, 504. + + + + + Server rejected our command because we didn't issue the commands in right + order. + FTP response code 503. + + + + + PKCS #12 import failed due to incorrect password. + + + + + PKCS #12 import failed due to other error. + + + + + CA import failed - not a CA cert. + + + + + Import failed - certificate already exists in database. + Note it's a little weird this is an error but reimporting a PKCS12 is ok + (no-op). That's how Mozilla does it, though. + + + + + CA import failed due to some other error. + + + + + Server certificate import failed due to some internal error. + + + + + PKCS #12 import failed due to invalid MAC. + + + + + PKCS #12 import failed due to invalid/corrupt file. + + + + + PKCS #12 import failed due to unsupported features. + + + + + Key generation failed. + + + + + Server-bound certificate generation failed. + + + + + Failure to export private key. + + + + + Self-signed certificate generation failed. + + + + + The certificate database changed in some way. + + + + + Failure to import Channel ID. + + + + + DNS resolver received a malformed response. + + + + + DNS server requires TCP + + + + + DNS server failed. This error is returned for all of the following + error conditions: + 1 - Format error - The name server was unable to interpret the query. + 2 - Server failure - The name server was unable to process this query + due to a problem with the name server. + 4 - Not Implemented - The name server does not support the requested + kind of query. + 5 - Refused - The name server refuses to perform the specified + operation for policy reasons. + + + + + DNS transaction timed out. + + + + + The entry was not found in cache, for cache-only lookups. + + + + + Suffix search list rules prevent resolution of the given host name. + + + + + Failed to sort addresses according to RFC3484. + + + + + Supported event bit flags. + + + + + Mac OS-X command key. + + + + + CefFileDialogMode (Based on cef_file_dialog_mode_t) + + + + + Requires that the file exists before allowing the user to pick it. + + + + + Like Open, but allows picking multiple files to open. + + + + + Like Open, but selects a folder to open. + + + + + Allows picking a nonexistent file, and prompts to overwrite if the file already exists. + + + + + General mask defining the bits used for the type values. + + + + + Prompt to overwrite if the user selects an existing file with the Save dialog. + + + + + Do not display read-only files. + + + + + Focus Source + + + + + The source is explicit navigation via the API (LoadURL(), etc). + + + + + The source is a system-generated focus event. + + + + + Geoposition error codes. + + + + + Supported JavaScript dialog types. + + + + + Custom menu items originating from the renderer process. For example, plugin placeholder menu items or Flash menu items. + This is the first entry + + + + + Custom menu items originating from the renderer process. For example, plugin placeholder menu items or Flash menu items. + This is the last entry + + + + + Margin type for PDF printing. + + + + + Default margins. + + + + + No margins. + + + + + Minimum margins + + + + + Custom margins. + + + + + Return value types. + + + + + Cancel immediately. + + + + + Continue immediately. + + + + + Continue asynchronously (usually via a callback). + + + + + Represents the state of a setting. + + + + + Use the default state for the setting. + + + + + Enable or allow the setting. + + + + + Disable or disallow the setting. + + + + + Process termination status values. + + + + + Non-zero exit status. + + + + + SIGKILL or task manager kill. + + + + + Segmentation fault. + + + + + Managed enum for cef_thread_id_t/CefThreadId + + + + + The CEF UI thread in the browser. In CefSharp this is ALWAYS + separate from the application's main thread (and thus the main + WinForm UI thread). + + + + + Used to interact with the database. + + + + + Used to interact with the file system. + + + + + Used for file system operations that block user interactions. + Responsiveness of this thread affects users. + + + + + Used to launch and terminate browser processes. + + + + + Used to handle slow HTTP cache operations. + + + + + Used to process IPC and network messages. + + + + + The main thread in the renderer. Used for all WebKit and V8 interaction. + + + + + + Supported certificate status code values. See net\cert\cert_status_flags.h + for more information. CERT_STATUS_NONE is new in CEF because we use an + enum while cert_status_flags.h uses a typedef and static const variables. + + + + + Supported context menu edit state bit flags. + + + + + Supported context menu media state bit flags. + + + + + Supported context menu media types. + + + + + No special node is in context. + + + + + An image node is selected. + + + + + A video node is selected. + + + + + An audio node is selected. + + + + + A file node is selected. + + + + + A plugin node is selected. + + + + + No node is selected. + + + + + The top page is selected. + + + + + A subframe page is selected. + + + + + A link is selected. + + + + + A media node is selected. + + + + + There is a textual or mixed selection that is selected. + + + + + An editable element is selected. + + + + + "Verb" of a drag-and-drop operation as negotiated between the source and destination. + + + + + Return values for IResponseFilter + + + + + Some or all of the pre-filter data was read successfully but more data is + needed in order to continue filtering (filtered output is pending). + + + + + Some or all of the pre-filter data was read successfully and all available filtered output has been written. + + + + + An error occurred during filtering. + + + + + Notification that a key transitioned from "up" to "down". + + + + + Notification that a key was pressed. This does not necessarily correspond + to a character depending on the key and language. Use KEYEVENT_CHAR for + character input. + + + + + Notification that a key was released. + + + + + Notification that a character was typed. Use this for text input. Key + down events may generate 0, 1, or more than one character event depending + on the key, locale, and operating system. + + + + + Default logging (currently Info logging) + + + + + Verbose logging. + + + + + Info logging + + + + + Warning logging + + + + + Error logging + + + + + Completely disable logging + + + + + Paint element types. + + + + + Plugin policies supported by IPluginHandler.OnBeforePluginLoad. + + + + + Allow the content + + + + + Allow important content and block unimportant content based on heuristics. The user can manually load blocked content. + + + + + Block the content. The user can manually load blocked content. + + + + + Disable the content. The user cannot load disabled content. + + + + + Post data elements may represent either bytes or files. + + + + + Always send the complete Referrer value. + + + + + Use the default policy. This is OriginWhenCrossOrigin + when the `--reduced-referrer-granularity` command-line flag is specified + and NoReferrerWhenDowngrade otherwise. + + + + + When navigating from HTTPS to HTTP do not send the Referrer value. + Otherwise, send the complete Referrer value. + + + + + Never send the Referrer value. + + + + + Only send the origin component of the Referrer value. + + + + + When navigating cross-origin only send the origin component of the Referrer value. Otherwise, send the complete Referrer value. + + + + + Resource is read from a Stream (Default) + + + + + Resource is read from a file on disk + + + + + Resource type for a request. + + + + + Top level page. + + + + + Frame or iframe. + + + + + CSS stylesheet. + + + + + External script. + + + + + Image (jpg/gif/png/etc). + + + + + Font. + + + + + Some other subresource. This is the default type if the actual type is unknown. + + + + + Object (or embed) tag for a plugin, or a resource that a plugin requested. + + + + + Media resource. + + + + + Main resource of a dedicated worker. + + + + + Main resource of a shared worker. + + + + + Explicitly requested prefetch. + + + + + Favicon. + + + + + XMLHttpRequest. + + + + + A request for a ping + + + + + Main resource of a service worker. + + + + + A report of Content Security Policy violations. + + + + + A resource that a plugin requested. + + + + + Supported SSL content status flags. See content/public/common/ssl_status.h + for more information. + + + + + Supported SSL version values. See net/ssl/ssl_connection_status_flags.h + for more information. + + + + + Transition type for a request. Made up of one source value and 0 or more qualifiers. + + + + + Source is a link click or the JavaScript window.open function. This is + also the default value for requests like sub-resource loads that are not navigations. + + + + + Source is some other "explicit" navigation action such as creating a new + browser or using the LoadURL function. This is also the default value + for navigations where the actual type is unknown. + + + + + Source is a subframe navigation. This is any content that is automatically + loaded in a non-toplevel frame. For example, if a page consists of several + frames containing ads, those ad URLs will have this transition type. + The user may not even realize the content in these pages is a separate + frame, so may not care about the URL. + + + + + Source is a subframe navigation explicitly requested by the user that will + generate new navigation entries in the back/forward list. These are + probably more important than frames that were automatically loaded in + the background because the user probably cares about the fact that this + link was loaded. + + + + + Source is a form submission by the user. NOTE: In some situations + submitting a form does not result in this transition type. This can happen + if the form uses a script to submit the contents. + + + + + Source is a "reload" of the page via the Reload function or by re-visiting + the same URL. NOTE: This is distinct from the concept of whether a + particular load uses "reload semantics" (i.e. bypasses cached data). + + + + + General mask defining the bits used for the source values. + + + + + Attempted to visit a URL but was blocked. + + + + + Used the Forward or Back function to navigate among browsing history. + + + + + The beginning of a navigation chain. + + + + + The last transition in a redirect chain. + + + + + Redirects caused by JavaScript or a meta refresh tag on the page. + + + + + Redirects sent from the server by HTTP headers. + + + + + Used to test whether a transition involves a redirect. + + + + + General mask defining the bits used for the qualifiers. + + + + + Flags that represent CefURLRequest status. + + + + + Unknown status. + + + + + Request succeeded. + + + + + An IO request is pending, and the caller will be informed when it is completed. + + + + + Request was canceled programatically. + + + + + Request failed for some reason. + + + + + The manner in which a link click should be opened. + + + + + Event arguments for the AddressChanged event handler. + + + + + Creates a new AddressChangedEventArgs event argument. + + the browser object + the address + + + + Access to the underlying object + + + + + The new address + + + + + Event arguments to the ConsoleMessage event handler set up in IWebBrowser. + + + + + Creates a new ConsoleMessageEventArgs event argument. + + message + source + line number + + + + The message text of the console message. + + + + + The source of the console message. + + + + + The line number that generated the console message. + + + + + Event arguments to the FrameLoadEnd event handler set up in IWebBrowser. + + + + + Creates a new FrameLoadEnd event args + + browser + frame + http statusCode + + + + The browser that contains the frame that finished loading. + + + + + The frame that finished loading. + + + + + The URL that was loaded. + + + + + Http Status Code + + + + + Event arguments to the FrameLoadStart event handler set up in IWebBrowser. + + + + + Creates a new FrameLoadStart event args + + browser + frame + + + + The browser object + + + + + The frame that just started loading. + + + + + The URL that was loaded. + + + + + TransitionType provides information about the source of the navigation. + + + + + Event arguments to the IsBrowserInitializedChanged event handler. + + + + + Event arguments to the LoadError event handler set up in IWebBrowser. + + + + + The browser object + + + + + The frame that failed to load. + + + + + The URL that failed to load. + + + + + The error code. + + + + + The error text. + + + + + Event arguments to the LoadingStateChanged event handler set up in IWebBrowser. + + + + + Event arguments to the StatusMessage event handler set up in IWebBrowser. + + + + + The browser object + + + + + The value of the status message. + + + + + Event arguments to the TitleChanged event handler. + + + + + Creates a new TitleChanged event arg + + the new title + + + + The new title + + + + + Structure representing geoposition information. The properties of this + structure correspond to those of the JavaScript Position object although + their types may differ. + + + + + Latitude in decimal degrees north (WGS84 coordinate frame). + + + + + Longitude in decimal degrees west (WGS84 coordinate frame). + + + + + Altitude in meters (above WGS84 datum). + + + + + Accuracy of altitude in meters. + + + + + Heading in decimal degrees clockwise from true north. + + + + + Horizontal component of device velocity in meters per second. + + + + + Time of position measurement in miliseconds since Epoch in UTC time. This + is taken from the host computer's system clock. + + + + + Error code, see enum above. + + + + + Human-readable error message. + + + + + Implement this interface to handle events related to browser process callbacks. + The methods of this class will be called on the CEF UI thread unless otherwise indicated. . + + + + + Called on the CEF UI thread immediately after the CEF context has been initialized. + You can now access the Global RequestContext through Cef.GetGlobalRequestContext() - this is the + first place you can set Preferences (e.g. proxy settings, spell check dictionaries). + + + + + Called from any thread when work has been scheduled for the browser process + main (UI) thread. This callback is used in combination with CefSettings. + ExternalMessagePump and Cef.DoMessageLoopWork() in cases where the CEF + message loop must be integrated into an existing application message loop + (see additional comments and warnings on Cef.DoMessageLoopWork). This + callback should schedule a Cef.DoMessageLoopWork() call to happen on the + main (UI) thread. + + is the requested delay in milliseconds. If + delay is less than or equal to 0 then the call should happen reasonably soon. If + delay is greater than 0 then the call should be scheduled to happen after the + specified delay and any currently pending scheduled call should be + cancelled. + + + + Implement this interface to handle context menu events. + + + + + Called before a context menu is displayed. The model can be cleared to show no context menu or + modified to show a custom menu. + + the ChromiumWebBrowser control + the browser object + The frame the request is coming from + provides information about the context menu state + initially contains the default context menu + + + + Called to execute a command selected from the context menu. See + cef_menu_id_t for the command ids that have default implementations. All + user-defined command ids should be between MENU_ID_USER_FIRST and + MENU_ID_USER_LAST. + + the ChromiumWebBrowser control + the browser object + The frame the request is coming from + will have the same values as what was passed to + menu command id + event flags + Return true if the command was handled or false for the default implementation. + + + + Called when the context menu is dismissed irregardless of whether the menu + was empty or a command was selected. + + the ChromiumWebBrowser control + the browser object + The frame the request is coming from + + + + Called to allow custom display of the context menu. + For custom display return true and execute callback either synchronously or asynchronously with the selected command Id. + For default display return false. Do not keep references to parameters or model outside of this callback. + + the ChromiumWebBrowser control + the browser object + The frame the request is coming from + provides information about the context menu state + contains the context menu model resulting from OnBeforeContextMenu + the callback to execute for custom display + For custom display return true and execute callback either synchronously or asynchronously with the selected command ID. + + + + Implement this interface to handle dialog events. The methods of this class will be called on the CEF UI thread. + + + + + Runs a file chooser dialog. + + + To test assign something like TempFileDialogHandler (from CefSharp.Example) to DialogHandler e.g. + + browser.DialogHandler = new TempFileDialogHandler(); + + Example URL to use for file browsing http://www.cs.tut.fi/~jkorpela/forms/file.html#example + Simply click browse, the space next to the browse button should be populated with a randomly generated filename. + + the browser control + the browser object + represents the type of dialog to display + the title to be used for the dialog. It may be empty to show the default title ("Open" or "Save" + depending on the mode). + is the path with optional directory and/or file name component that + should be initially selected in the dialog. + are used to restrict the selectable file types and may any combination of + (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), + (b) individual file extensions (e.g. ".txt" or ".png"), + (c) combined description and file extension delimited using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). + is the 0-based index of the filter that should be selected by default. + Callback interface for asynchronous continuation of file dialog requests. + To display a custom dialog return true. To display the default dialog return false. + + + + Handle events related to browser display state. + + + + + Called when a frame's address has changed. + + The control this popup is related to. + args + + + + Called when the page title changes. + + The control this popup is related to. + args + + + + Called when the page icon changes. + + The ChromiumWebBrowser control + the browser object + list of urls where the favicons can be downloaded + + + + Called when web content in the page has toggled fullscreen mode. The client is + responsible for resizing the browser if desired. + + The ChromiumWebBrowser control + the browser object + If true the content will automatically be sized to fill the browser content area. + If false the content will automatically return to its original size and position. + + + + Called when the browser is about to display a tooltip. text contains the + text that will be displayed in the tooltip. You can optionally modify text + and then return false to allow the browser to display the tooltip. + When window rendering is disabled the application is responsible for + drawing tooltips and the return value is ignored. + + The ChromiumWebBrowser control + the text that will be displayed in the tooltip + To handle the display of the tooltip yourself return true otherwise return false + to allow the browser to display the tooltip. + Option to modify tooltip is not currently implemented. + + + + Called when the browser receives a status message. + + The control this popup is related to. + args + + + + Called to display a console message. + + The ChromiumWebBrowser control + args + Return true to stop the message from being output to the console. + + + + Class used to handle file downloads. + The methods of this class will called on the CEF UI thread. + + + + + Called before a download begins. + + The browser instance + Represents the file being downloaded. + Callback interface used to asynchronously continue a download. + + + + Called when a download's status or progress information has been updated. This may be called multiple times before and after . + + The browser instance + Represents the file being downloaded. + The callback used to Cancel/Pause/Resume the process + + + + Implement this interface to handle events related to dragging. + The methods of this class will be called on the UI thread. + + + + + Called when an external drag event enters the browser window. + + the ChromiumWebBrowser control + the browser object + contains the drag event data + represents the type of drag operation + Return false for default drag handling behavior or true to cancel the drag event. + + + + Called whenever draggable regions for the browser window change. + These can be specified using the '-webkit-app-region: drag/no-drag' CSS-property. + If draggable regions are never defined in a document this method will also never be called. + If the last draggable region is removed from a document this method will be called with an empty IList. + + the ChromiumWebBrowser control + the browser object + List of objects or null if last region was removed. + + + + Implement this interface to handle events related to find results. + The methods of this class will be called on the CEF UI thread. + + + + + Called to report find results returned by + + the browser control + the browser object + is the identifier passed to Find() + is the number of matches currently identified + is the location of where the match was found (in window coordinates) + is the current position in the search results + is true if this is the last find notification. + + + + Implement this interface to handle events related to focus. + The methods of this class will be called on the CEF UI thread. + + + + + Called when the browser component has received focus. + + + + + Called when the browser component is requesting focus. + + Indicates where the focus request is originating from. + Return false to allow the focus to be set or true to cancel setting the focus. + + + + Called when the browser component is about to lose focus. + For instance, if focus was on the last HTML element and the user pressed the TAB key. + + Will be true if the browser is giving focus to the next component + and false if the browser is giving focus to the previous component. + + + + Implement this interface to handle events related to geolocation permission requests. + The methods of this class will be called on the CEF UI thread. + + + + + Called when a page requests permission to access geolocation information. + + the browser control + the browser object + the URL requesting permission + the unique ID for the permission request + Callback interface used for asynchronous continuation of geolocation permission requests. + Return true and call IGeolocationCallback.Continue() either in this method or at a later time to continue or cancel the request. Return false to cancel the request immediately. + + + + Called when a geolocation access request is canceled. + + the browser control + the browser object + the unique ID for the permission request, as seen in + + + + Implement this interface to handle events related to JavaScript dialogs. + The methods of this class will be called on the CEF UI thread. + + + + + Called to run a JavaScript dialog. + + the browser control + the browser object + originating url + Dialog Type + Message Text + value will be specified for prompt dialogs only + Callback can be executed inline or in an async fashion + Set suppressMessage to true and return false to suppress the message (suppressing messages is preferable to immediately executing the callback as this is used to detect presumably malicious behavior like spamming alert messages in onbeforeunload). Set suppressMessage to false and return false to use the default implementation (the default implementation will show one modal dialog at a time and suppress any additional dialog requests until the displayed dialog is dismissed). + Return true if the application will use a custom dialog or if the callback has been executed immediately. Custom dialogs may be either modal or modeless. If a custom dialog is used the application must execute |callback| once the custom dialog is dismissed. + + + + When leaving the page a Javascript dialog is displayed asking for user confirmation. + Returning True allows you to implement a custom dialog or programatically handle. + To cancel the unload return True and set allowUnload to False. + + the browser control + the browser object + message (optional) + indicates a page reload + Callback can be executed inline or in an async fashion + Return false to use the default dialog implementation otherwise return true to handle + + + + Called to cancel any pending dialogs and reset any saved dialog state. Will + be called due to events like page navigation irregardless of whether any + dialogs are currently pending. + + the browser control + the browser object + + + + Called when the default implementation dialog is closed. + + the browser control + the browser object + + + + Implement this interface to handle events related to keyboard input. + + + + + Called before a keyboard event is sent to the renderer. + Return true if the event was handled or false + otherwise. If the event will be handled in as a keyboard + shortcut set isKeyboardShortcut to true and return false. + + The control this request is for. + The browser instance. + Whether this was a key up/down/raw/etc... + + The Windows key code for the key event. This value is used by the DOM + specification. Sometimes it comes directly from the event (i.e. on + Windows) and sometimes it's determined using a mapping function. See + WebCore/platform/chromium/KeyboardCodes.h for the list of values. + + The native key code. On Windows this appears to be in the format of WM_KEYDOWN/WM_KEYUP/etc... lParam data. + What other modifier keys are currently down: Shift/Control/Alt/OS X Command/etc... + + Indicates whether the event is considered a "system key" event (see + http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). + + See the summary for an explanation of when to set this to true. + Returns true if the event was handled or false otherwise. + + + + Called after the renderer and JavaScript in the page has had a chance to + handle the event. Return true if the keyboard event was handled or false otherwise. + + The control this request is for. + The browser instance. + Whether this was a key up/down/raw/etc... + + The Windows key code for the key event. This value is used by the DOM + specification. Sometimes it comes directly from the event (i.e. on + Windows) and sometimes it's determined using a mapping function. See + WebCore/platform/chromium/KeyboardCodes.h for the list of values. + + The native key code. On Windows this appears to be in the format of WM_KEYDOWN/WM_KEYUP/etc... lParam data. + What other modifier keys are currently down: Shift/Control/Alt/OS X Command/etc... + + Indicates whether the event is considered a "system key" event (see + http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). + + Return true if the keyboard event was handled or false otherwise. + + + + Implement this interface to handle events related to browser life span. + The methods of this class will be called on the CEF UI thread unless otherwise indicated. + + + + + Called before a popup window is created. + + The control this request is for. + The browser instance that launched this popup. + The HTML frame that launched this popup. + The URL of the popup content. (This may be empty/null) + The name of the popup. (This may be empty/null) + The value indicates where the user intended to + open the popup (e.g. current tab, new tab, etc) + The value will be true if the popup was opened via explicit user gesture + (e.g. clicking a link) or false if the popup opened automatically (e.g. via the DomContentLoaded event). + structure contains additional information about the requested popup window + window information + browser settings, defaults to source browsers + value indicates whether the new browser window should be scriptable + and in the same process as the source browser. + EXPERIMENTAL - A newly created browser that will host the popup. Set to null + for default behaviour. + To cancel creation of the popup window return true otherwise return false. + + CEF documentation: + + Called on the IO thread before a new popup window is created. The |browser| + and |frame| parameters represent the source of the popup request. The + |target_url| and |target_frame_name| values may be empty if none were + specified with the request. The |popupFeatures| structure contains + information about the requested popup window. To allow creation of the + popup window optionally modify |windowInfo|, |client|, |settings| and + |no_javascript_access| and return false. To cancel creation of the popup + window return true. The |client| and |settings| values will default to the + source browser's values. The |no_javascript_access| value indicates whether + the new browser window should be scriptable and in the same process as the + source browser. + + + + + Called after a new browser is created. + + The control that is realted to the window is closing. + The browser instance + + + + Called when a browser has recieved a request to close. This may result + directly from a call to CefBrowserHost::CloseBrowser() or indirectly if the + browser is a top-level OS window created by CEF and the user attempts to + close the window. This method will be called after the JavaScript + 'onunload' event has been fired. It will not be called for browsers after + the associated OS window has been destroyed (for those browsers it is no + longer possible to cancel the close). + + If CEF created an OS window for the browser returning false will send an OS + close notification to the browser window's top-level owner (e.g. WM_CLOSE + on Windows, performClose: on OS-X and "delete_event" on Linux). If no OS + window exists (window rendering disabled) returning false will cause the + browser object to be destroyed immediately. Return true if the browser is + parented to another window and that other window needs to receive close + notification via some non-standard technique. + + If an application provides its own top-level window it should handle OS + close notifications by calling CefBrowserHost::CloseBrowser(false) instead + of immediately closing (see the example below). This gives CEF an + opportunity to process the 'onbeforeunload' event and optionally cancel the + close before DoClose() is called. + + The CefLifeSpanHandler::OnBeforeClose() method will be called immediately + before the browser object is destroyed. The application should only exit + after OnBeforeClose() has been called for all existing browsers. + + If the browser represents a modal window and a custom modal loop + implementation was provided in CefLifeSpanHandler::RunModal() this callback + should be used to restore the opener window to a usable state. + + By way of example consider what should happen during window close when the + browser is parented to an application-provided top-level OS window. + 1. User clicks the window close button which sends an OS close + notification (e.g. WM_CLOSE on Windows, performClose: on OS-X and + "delete_event" on Linux). + 2. Application's top-level window receives the close notification and: + A. Calls CefBrowserHost::CloseBrowser(false). + B. Cancels the window close. + 3. JavaScript 'onbeforeunload' handler executes and shows the close + confirmation dialog (which can be overridden via + CefJSDialogHandler::OnBeforeUnloadDialog()). + 4. User approves the close. + 5. JavaScript 'onunload' handler executes. + 6. Application's DoClose() handler is called. Application will: + A. Set a flag to indicate that the next close attempt will be allowed. + B. Return false. + 7. CEF sends an OS close notification. + 8. Application's top-level window receives the OS close notification and + allows the window to close based on the flag from #6B. + 9. Browser OS window is destroyed. + 10. Application's CefLifeSpanHandler::OnBeforeClose() handler is called and + the browser object is destroyed. + 11. Application exits by calling CefQuitMessageLoop() if no other browsers + exist. + + The control that is realted to the window is closing. + The browser instance - check if IsDisposed as it's possible when the browser is disposing + For default behaviour return false + + + + Called before a CefBrowser window (either the main browser for , + or one of its children) + + The control that is realted to the window is closing. + The browser instance + + + + Implement this interface to handle events related to browser load status. + The methods of this interface will be called on the CEF UI thread. Blocking in these methods + will likely cause your UI to become unresponsive and/or hang. + + + + + Called when the loading state has changed. This callback will be executed twice + once when loading is initiated either programmatically or by user action, + and once when loading is terminated due to completion, cancellation of failure. + This method will be called on the CEF UI thread. + Blocking this thread will likely cause your UI to become unresponsive and/or hang. + + The control this popup is related to. + args + + + + Called when the browser begins loading a frame. + The value will never be empty + Check the method to see if this frame is the main frame. + Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. + This method may not be called for a particular frame if the load request for that frame fails. + For notification of overall browser load status use instead. + This method will be called on the CEF UI thread. + Blocking this thread will likely cause your UI to become unresponsive and/or hang. + + The control this popup is related to. + args + Whilst thist may seem like a logical place to execute js, it's called before the DOM has been loaded, implement + as it's called when the underlying V8Context is created + (Only called for the main frame at this stage) + + + + Called when the browser is done loading a frame. + The value will never be empty + Check the method to see if this frame is the main frame. + Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. + This method will always be called for all frames irrespective of whether the request completes successfully. + This method will be called on the CEF UI thread. + Blocking this thread will likely cause your UI to become unresponsive and/or hang. + + The control this popup is related to. + args + + + + Called when the resource load for a navigation fails or is canceled. + is the error code number, is the error text and + is the URL that failed to load. See net\base\net_error_list.h + for complete descriptions of the error codes. + This method will be called on the CEF UI thread. + Blocking this thread will likely cause your UI to become unresponsive and/or hang. + + The control this popup is related to. + args + + + + Messages sent by the render process can be handled by implementing this + interface. + + + + + OnContextCreated is called in the Render process immediately after a CefV8Context is created. + An IPC message is immediately sent to notify the context has been created + (should be safe to execute javascript). If the page has no javascript then on context will be created + and as a result this method will not be called. Currently only called for the Main frame + + The ChromiumWebBrowser control + the browser object + The frame. + + + + OnContextReleased is called in the Render process immediately before the CefV8Context is released. + An IPC message is immediately sent to notify the context has been released + (cannot execute javascript this point). If the page had no javascript then the context would not have been created + and as a result this method will not be called. Currently only called for the Main frame + + The ChromiumWebBrowser control + the browser object + The frame. + + + + Invoked when an element in the UI gains focus (or possibly no + element gains focus; i.e. an element lost focus). + + The ChromiumWebBrowser control + the browser object + The frame object + An object with information about the node (if any) that has focus. + + + + Implement this interface to provide handler implementations. The handler + instance will not be released until all objects related to the context have + been destroyed. Implement this interface to cancel loading of specific plugins + + + + + Called on the browser process IO thread to retrieve the cookie manager. If + this method returns NULL the default cookie manager retrievable via + IRequestContext.GetDefaultCookieManager() will be used. + + If + this method returns null the default cookie manager retrievable via + IRequestContext.GetDefaultCookieManager() will be used.. + + + + Called on the CEF IO thread before a plugin instance is loaded. + The default plugin policy can be set at runtime using the `--plugin-policy=[allow|detect|block]` command-line flag. + + is the mime type of the plugin that will be loaded + is the content URL that the plugin will load and may be empty + will be true if the plugin is being loaded in the main (top-level) frame + is the URL for the top-level frame that contains the plugin + includes additional information about the plugin that will be loaded + Modify and return true to change the policy. + Return false to use the recommended policy. Modify and return true to change the policy. + + + + Implement this interface to handle events related to browser requests. + The methods of this class will be called on the thread indicated. + + + + + Called before browser navigation. + If the navigation is allowed and + will be called. If the navigation is canceled will be called with an ErrorCode + value of . + + the ChromiumWebBrowser control + the browser object + The frame the request is coming from + the request object - cannot be modified in this callback + has the request been redirected + Return true to cancel the navigation or false to allow the navigation to proceed. + + + + Called on the UI thread before OnBeforeBrowse in certain limited cases + where navigating a new or different browser might be desirable. This + includes user-initiated navigation that might open in a special way (e.g. + links clicked via middle-click or ctrl + left-click) and certain types of + cross-origin navigation initiated from the renderer process (e.g. + navigating the top-level frame to/from a file URL). + + the ChromiumWebBrowser control + the browser object + The frame object + target url + The value indicates where the user intended to navigate the browser based + on standard Chromium behaviors (e.g. current tab, new tab, etc). + The value will be true if the browser navigated via explicit user gesture + (e.g. clicking a link) or false if it navigated automatically (e.g. via the DomContentLoaded event). + Return true to cancel the navigation or false to allow the navigation + to proceed in the source browser's top-level frame. + + + + Called to handle requests for URLs with an invalid SSL certificate. + Return true and call either + in this method or at a later time to continue or cancel the request. + If is set all invalid certificates + will be accepted without calling this method. + + the ChromiumWebBrowser control + the browser object + the error code for this invalid certificate + the url of the request for the invalid certificate + ssl certificate information + Callback interface used for asynchronous continuation of url requests. + If empty the error cannot be recovered from and the request will be canceled automatically. + Return false to cancel the request immediately. Return true and use to + execute in an async fashion. + + + + Called when a plugin has crashed + + the ChromiumWebBrowser control + the browser object + path of the plugin that crashed + + + + Called before a resource request is loaded. For async processing return + and execute or + + The ChromiumWebBrowser control + the browser object + The frame object + the request object - can be modified in this callback. + Callback interface used for asynchronous continuation of url requests. + To cancel loading of the resource return + or to allow the resource to load normally. For async + return + + + + Called when the browser needs credentials from the user. + + The ChromiumWebBrowser control + the browser object + The frame object that needs credentials (This will contain the URL that is being requested.) + indicates whether the host is a proxy server + hostname + port number + realm + scheme + Callback interface used for asynchronous continuation of authentication requests. + Return true to continue the request and call CefAuthCallback::Continue() when the authentication information is available. Return false to cancel the request. + + + + Called when the browser needs user to select Client Certificate for authentication requests (eg. PKI authentication). + + The ChromiumWebBrowser control + the browser object + indicates whether the host is a proxy server + hostname + port number + List of Client certificates for selection + Callback interface used for asynchronous continuation of client certificate selection for authentication requests. + Return true to continue the request and call ISelectClientCertificateCallback.Select() with the selected certificate for authentication. + Return false to use the default behavior where the browser selects the first certificate from the list. + + + + Called when the render process terminates unexpectedly. + + The ChromiumWebBrowser control + the browser object + indicates how the process terminated. + + + + Called when JavaScript requests a specific storage quota size via the webkitStorageInfo.requestQuota function. + For async processing return true and execute at a later time to + grant or deny the request or to cancel. + + The ChromiumWebBrowser control + the browser object + the origin of the page making the request + is the requested quota size in bytes + Callback interface used for asynchronous continuation of url requests. + Return false to cancel the request immediately. Return true to continue the request + and call either in this method or at a later time to + grant or deny the request. + + + + Called on the IO thread when a resource load is redirected. The + parameter will contain the old URL and other request-related information. + + The ChromiumWebBrowser control + the browser object + The frame that is being redirected. + the request object - cannot be modified in this callback + the response object + the new URL and can be changed if desired + + + + Called on the UI thread to handle requests for URLs with an unknown protocol component. + SECURITY WARNING: YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION. + + The ChromiumWebBrowser control + the browser object + the request url + return to true to attempt execution via the registered OS protocol handler, if any. Otherwise return false. + + + + Called on the CEF UI thread when the render view associated + with browser is ready to receive/handle IPC messages in the render + process. + + The ChromiumWebBrowser control + the browser object + + + + Called on the CEF IO thread when a resource response is received. + To allow the resource to load normally return false. + To redirect or retry the resource modify request (url, headers or post body) and return true. + The response object cannot be modified in this callback. + + The ChromiumWebBrowser control + the browser object + The frame that is being redirected. + the request object + the response object - cannot be modified in this callback + + To allow the resource to load normally return false. + To redirect or retry the resource modify request (url, headers or post body) and return true. + + + + + Called on the CEF IO thread to optionally filter resource response content. + + The ChromiumWebBrowser control + the browser object + The frame that is being redirected. + the request object - cannot be modified in this callback + the response object - cannot be modified in this callback + Return an IResponseFilter to intercept this response, otherwise return null + + + + Called on the CEF IO thread when a resource load has completed. + + The ChromiumWebBrowser control + the browser object + The frame that is being redirected. + the request object - cannot be modified in this callback + the response object - cannot be modified in this callback + indicates the load completion status + is the number of response bytes actually read. + + + + Class used to implement a custom resource handler. The methods of this class will always be called on the CEF IO thread. + Blocking the CEF IO thread will adversely affect browser performance. We suggest you execute your code in a Task (or similar). + To implement async handling, spawn a new Task (or similar), keep a reference to the callback. When you have a + fully populated stream, execute the callback. Once the callback Executes, GetResponseHeaders will be called where you + can modify the response including headers, or even redirect to a new Url. Set your responseLength and headers + Populate the dataOut stream in ReadResponse. For those looking for a sample implementation or upgrading from + a previous version . For those upgrading, inherit from ResourceHandler instead of IResourceHandler + add the override keywoard to existing methods e.g. ProcessRequestAsync. + + + + + Begin processing the request. + + The request object. + The callback used to Continue or Cancel the request (async). + To handle the request return true and call + once the response header information is available + can also be called from inside this method if + header information is available immediately). + To cancel the request return false. + + + + Retrieve response header information. If the response length is not known + set responseLength to -1 and ReadResponse() will be called until it + returns false. If the response length is known set responseLength + to a positive value and ReadResponse() will be called until it returns + false or the specified number of bytes have been read. + If an error occured while setting up the request you can set + to indicate the error condition. + + Use the response object to set the mime type, http status code and other optional header values. + If the response length is not known set responseLength to -1 + To redirect the request to a new URL set redirectUrl to the new Url. + + + + Read response data. If data is available immediately copy to + dataOut, set bytesRead to the number of bytes copied, and return true. + To read the data at a later time set bytesRead to 0, return true and call ICallback.Continue() when the + data is available. To indicate response completion return false. + + Stream to write to + Number of bytes copied to the stream + The callback used to Continue or Cancel the request (async). + If data is available immediately copy to dataOut, set bytesRead to the number of bytes copied, + and return true.To indicate response completion return false. + Depending on this size of your response this method may be called multiple times + + + + Return true if the specified cookie can be sent with the request or false + otherwise. If false is returned for any cookie then no cookies will be sent + with the request. + + cookie + Return true if the specified cookie can be sent with the request or false + otherwise. If false is returned for any cookie then no cookies will be sent + with the request. + + + + Return true if the specified cookie returned with the response can be set or false otherwise. + + cookie + Return true if the specified cookie returned with the response can be set or false otherwise. + + + + Request processing has been canceled. + + + + + Interface representing browser initialization settings. + + + + + StandardFontFamily + + + + + FixedFontFamily + + + + + SerifFontFamily + + + + + SansSerifFontFamily + + + + + CursiveFontFamily + + + + + FantasyFontFamily + + + + + DefaultFontSize + + + + + DefaultFixedFontSize + + + + + MinimumFontSize + + + + + MinimumLogicalFontSize + + + + + Default encoding for Web content. If empty "ISO-8859-1" will be used. Also + configurable using the "default-encoding" command-line switch. + + + + + Controls the loading of fonts from remote sources. Also configurable using + the "disable-remote-fonts" command-line switch. + + + + + Controls whether JavaScript can be executed. + (Disable javascript) + + + + + Controls whether JavaScript can be used for opening windows. Also + configurable using the "disable-javascript-open-windows" command-line + switch. + + + + + Controls whether JavaScript can be used to close windows that were not + opened via JavaScript. JavaScript can still be used to close windows that + were opened via JavaScript. Also configurable using the + "disable-javascript-close-windows" command-line switch. + + + + + Controls whether JavaScript can access the clipboard. Also configurable + using the "disable-javascript-access-clipboard" command-line switch. + + + + + Controls whether DOM pasting is supported in the editor via + execCommand("paste"). The |javascript_access_clipboard| setting must also + be enabled. Also configurable using the "disable-javascript-dom-paste" + command-line switch. + + + + + Controls whether any plugins will be loaded. Also configurable using the + "disable-plugins" command-line switch. + + + + + Controls whether file URLs will have access to all URLs. Also configurable + using the "allow-universal-access-from-files" command-line switch. + + + + + Controls whether file URLs will have access to other file URLs. Also + configurable using the "allow-access-from-files" command-line switch. + + + + + Controls whether web security restrictions (same-origin policy) will be + enforced. Disabling this setting is not recommend as it will allow risky + security behavior such as cross-site scripting (XSS). Also configurable + using the "disable-web-security" command-line switch. + + + + + Controls whether image URLs will be loaded from the network. A cached image + will still be rendered if requested. Also configurable using the + "disable-image-loading" command-line switch. + + + + + Controls whether standalone images will be shrunk to fit the page. Also + configurable using the "image-shrink-standalone-to-fit" command-line + switch. + + + + + Controls whether text areas can be resized. Also configurable using the + "disable-text-area-resize" command-line switch. + + + + + Controls whether the tab key can advance focus to links. Also configurable + using the "disable-tab-to-links" command-line switch. + + + + + Controls whether local storage can be used. Also configurable using the + "disable-local-storage" command-line switch. + + + + + Controls whether databases can be used. Also configurable using the + "disable-databases" command-line switch. + + + + + Controls whether the application cache can be used. Also configurable using + the "disable-application-cache" command-line switch. + + + + + Controls whether WebGL can be used. Note that WebGL requires hardware + support and may not work on all systems even when enabled. Also + configurable using the "disable-webgl" command-line switch. + + + + + Opaque background color used for the browser before a document is loaded + and when no document color is specified. By default the background color + will be the same as CefSettings.BackgroundColor. Only the RGB compontents + of the specified value will be used. The alpha component must greater than + 0 to enable use of the background color but will be otherwise ignored. + + + + + Comma delimited ordered list of language codes without any whitespace that + will be used in the "Accept-Language" HTTP header. May be overridden on a + per-browser basis using the CefBrowserSettings.AcceptLanguageList value. + If both values are empty then "en-US,en" will be used. Can be overridden + for individual RequestContext instances via the + RequestContextSettings.AcceptLanguageList value. + + + + + The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint + will be called for a windowless browser. The actual fps may be lower if + the browser cannot generate frames at the requested rate. The minimum + value is 1 and the maximum value is 60 (default 30). This value can also be + changed dynamically via IBrowserHost.SetWindowlessFrameRate. + + + + + Simple helper class used for checking/parsing command line arguments + + + + + A request context provides request handling for a set of related browser or URL request objects. + A request context can be specified when creating a new browser by setting the + property (Passing in via the constructor for the OffScreen + control is preferred). + Browser objects with different request contexts will never be hosted in the same render process. + Browser objects with the same request context may or may not be hosted in the same render process + depending on the process model.Browser objects created indirectly via the JavaScript window.open + function or targeted links will share the same render process and the same request context as + the source browser. + + + + + Returns true if this object is pointing to the same context object. + + context to compare + Returns true if the same + + + + Returns true if this object is sharing the same storage as the specified context. + + context to compare + Returns true if same storage + + + + Returns the default cookie manager for this object. This will be the global + cookie manager if this object is the global request context. Otherwise, + this will be the default cookie manager used when this request context does + not receive a value via IRequestContextHandler.GetCookieManager(). + + If callback is non-NULL it will be executed asnychronously on the CEF IO thread + after the manager's storage has been initialized. + Returns the default cookie manager for this object + + + + Register a scheme handler factory for the specified schemeName and optional domainName. + An empty domainName value for a standard scheme will cause the factory to match all domain + names. The domainName value will be ignored for non-standard schemes. If schemeName is + a built-in scheme and no handler is returned by factory then the built-in scheme handler + factory will be called. If schemeName is a custom scheme then you must also implement the + CefApp::OnRegisterCustomSchemes() method in all processes. This function may be called multiple + times to change or remove the factory that matches the specified schemeName and optional + domainName. + + Scheme Name + Optional domain name + Scheme handler factory + Returns false if an error occurs. + + + + Clear all registered scheme handler factories. + + Returns false on error. + + + + Tells all renderer processes associated with this context to throw away + their plugin list cache. If reloadPages is true they will also reload + all pages with plugins. RequestContextHandler.OnBeforePluginLoad may + be called to rebuild the plugin list cache. + + reload any pages with pluginst + + + + Returns true if a preference with the specified name exists. This method + must be called on the CEF UI thread. + + name of preference + bool if the preference exists + Use Cef.UIThreadTaskFactory to execute this method if required, + Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both + executed on the CEF UI thread, so can be called directly. + When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main + application thread will be the CEF UI thread. + + + + Returns the value for the preference with the specified name. Returns + NULL if the preference does not exist. The returned object contains a copy + of the underlying preference value and modifications to the returned object + will not modify the underlying preference value. This method must be called + on the CEF UI thread. + + preference name + Returns the value for the preference with the specified name + Use Cef.UIThreadTaskFactory to execute this method if required, + Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both + executed on the CEF UI thread, so can be called directly. + When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main + application thread will be the CEF UI thread. + + + + Returns all preferences as a dictionary. The returned + object contains a copy of the underlying preference values and + modifications to the returned object will not modify the underlying + preference values. This method must be called on the browser process UI + thread. + + If true then + preferences currently at their default value will be included. + Preferences (dictionary can have sub dictionaries) + + + + Returns true if the preference with the specified name can be modified + using SetPreference. As one example preferences set via the command-line + usually cannot be modified. This method must be called on the CEF UI thread. + + preference key + Returns true if the preference with the specified name can be modified + using SetPreference + Use Cef.UIThreadTaskFactory to execute this method if required, + Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both + executed on the CEF UI thread, so can be called directly. + When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main + application thread will be the CEF UI thread. + + + + Set the value associated with preference name. If value is null the + preference will be restored to its default value. If setting the preference + fails then error will be populated with a detailed description of the + problem. This method must be called on the CEF UI thread. + Preferences set via the command-line usually cannot be modified. + + preference key + preference value + out error + Returns true if the value is set successfully and false otherwise. + /// Use Cef.UIThreadTaskFactory to execute this method if required, + Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both + executed on the CEF UI thread, so can be called directly. + When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main + application thread will be the CEF UI thread. + + + + Clears all certificate exceptions that were added as part of handling + . If you call this it is + recommended that you also call or you risk not + being prompted again for server certificates if you reconnect quickly. + + If is non-NULL it will be executed on the CEF UI thread after + completion. This param is optional + + + + Clears all active and idle connections that Chromium currently has. + This is only recommended if you have released all other CEF objects but + don't yet want to call Cef.Shutdown(). + + If is non-NULL it will be executed on the CEF UI thread after + completion. This param is optional + + + + Attempts to resolve origin to a list of associated IP addresses. + + host name to resolve + A task that represents the Resoolve Host operation. The value of the TResult parameter contains ResolveCallbackResult. + + + + Attempts to resolve origin to a list of associated IP addresses using + cached data. This method must be called on the CEF IO thread. Use + Cef.IOThreadTaskFactory to execute on that thread. + + host name to resolve + list of resolved IP + addresses or empty list if no cached data is available. + Returns on success + + + + Returns true if this object is the global context. The global context is + used by default when creating a browser or URL request with a NULL context + argument. + + + + + Returns the cache path for this object. If empty an "incognito mode" + in-memory cache is being used. + + + + + Initialize the response filter. Will only be called a single time. + The filter will not be installed if this method returns false. + + The filter will not be installed if this method returns false. + + + + Called to filter a chunk of data. + This method will be called repeatedly until there is no more data to filter (resource response is complete), + dataInRead matches dataIn.Length (all available pre-filter bytes have been read), and the method + returns FilterStatus.Done or FilterStatus.Error. + + is a Stream wrapping the underlying input buffer containing pre-filter data. Can be null. + Set to the number of bytes that were read from dataIn + is a Stream wrapping the underlying output buffer that can accept filtered output data. + Check dataOut.Length for maximum buffer size + Set to the number of bytes that were written into dataOut + If some or all of the pre-filter data was read successfully but more data is needed in order + to continue filtering (filtered output is pending) return FilterStatus.NeedMoreData. If some or all of the pre-filter + data was read successfully and all available filtered output has been written return FilterStatus.Done. If an error + occurs during filtering return FilterStatus.Error. + Do not keep a reference to the buffers(Streams) passed to this method. + + + + Model binding context object + + + + + Binding destination type + + + + + The generic type of a collection is only used when DestinationType is a enumerable. + + + + + The current model object (or null for body deserialization) + + + + + DestinationType properties that are not black listed + + + + + The incoming data fields + + + + + Represents a bindable member of a type, which can be a property or a field. + + + + + Constructs a BindingMemberInfo instance for a property. + + The bindable property to represent. + + + + Constructs a BindingMemberInfo instance for a field. + + The bindable field to represent. + + + + Sets the value from a specified object associated with the property or field represented by this BindingMemberInfo. + + The object whose property or field should be assigned. + The value to assign in the specified object to this BindingMemberInfo's property or field. + + + + + + + Compares two BindingMemberInfo's with eachother on their respective values rather then their reference + + the other BindingMemberInfo + true when they are equal and false otherwise + + + + + + + Returns an enumerable sequence of bindable properties for the specified type. + + The type to enumerate. + Bindable properties. + + + + Returns an enumerable sequence of bindable properties for the specified type. + + The type to enumerate. + Bindable properties. + + + + Gets a reference to the MemberInfo that this BindingMemberInfo represents. This can be a property or a field. + + + + + Gets the name of the property or field represented by this BindingMemberInfo. + + + + + Gets the data type of the property or field represented by this BindingMemberInfo. + + + + + Default binder - used as a fallback when a specific modelbinder + is not available. + + + + + Binds incoming request data to a model type + + + + + Bind to the given model type + + object to be converted into a model + Model type to bind to + Bound model + + + + DefaultBinder constructor + + used to convert field names to property names + + + + Bind to the given model type + + object to be converted into a model + Model type to bind to + Bound model + + + + List of property names to be ignored + + + + + Default field name converter + Converts camel case to pascal case + + + + + Provides the capability to supply a convention to + convert form field names to property names if required. + + + + + Converts a field name to a property name + + Field name + Property name + + + + Initializes a new instance of the class. + + + + + Converts a field name to a property name + + Field name + Property name + + + + Containing extensions for the object. + + + + + Creates an instance of and cast it to . + + The type to create an instance of. + if a non-public constructor can be used, otherwise . + + + + Creates an instance of . + + The type to create an instance of. + if a non-public constructor can be used, otherwise . + + + + returns the assembly that the type belongs to + + + The assembly that contains the type + + + + Checks if a type is an array or not + + The type to check. + if the type is an array, otherwise . + + + + Is the type a collection, array or enumerable + + source type + return if collection, array or enumerable + + + + Determines whether the is assignable from + taking into account generic definitions + + + Borrowed from: http://tmont.com/blargh/2011/3/determining-if-an-open-generic-type-isassignablefrom-a-type + + + + + Checks if a type is an collection or not + + The type to check. + if the type is an collection, otherwise . + + + + Checks if a type is enumerable or not + + The type to check. + if the type is an enumerable, otherwise . + + + + Determines if a type is numeric. Nullable numeric types are considered numeric. + + + Boolean is not considered numeric. + + + + + Filters our all types not assignable to . + + The type that all resulting should be assignable to. + An of instances that should be filtered. + An of instances. + + + + Represents an entry in navigation history. + + + + + NavigationEntry + + completionTime + displayUrl + httpStatusCode + originalUrl + title + transitionType + url + hasPostData + isValid + is the current entry + the ssl status + + + + Returns the time for the last known successful navigation completion. + + + + + Returns a display-friendly version of the URL. + + + + + Returns the HTTP status code for the last known successful navigation response. + + + + + Returns the original URL that was entered by the user before any redirects. + + + + + Returns the title set by the page. + + + + + Returns the transition type which indicates what the user did to move to this page from the previous page. + + + + + Returns the actual URL of the page. + + + + + Returns true if this navigation includes post data. + + + + + Returns true if this object is valid. + + + + + If true if this entry is the currently loaded navigation entry + + + + + Returns the SSL information for this navigation entry. + + + + + Print to Pdf Settings + + + + + Page title to display in the header. Only used if + is set to true. + + + + + URL to display in the footer. Only used if is set + to true. + + + + + Output page size in microns. If either of these values is less than or + equal to zero then the default paper size (A4) will be used. + + + + + Output page size in microns. If either of these values is less than or + equal to zero then the default paper size (A4) will be used. + + + + + Margin in millimeters. Only used if MarginType is set to Custom. + + + + + Margin in millimeters. Only used if MarginType is set to Custom. + + + + + Margin in millimeters. Only used if MarginType is set to Custom. + + + + + Margin in millimeters. Only used if MarginType is set to Custom. + + + + + Margin type. + + + + + Set to true to print headers and footers or false to not print + headers and footers. + + + + + Set to true to print the selection only or false to print all. + + + + + Set to true for landscape mode or false for portrait mode. + + + + + Set to true to print background graphics or false to not print + background graphics. + + + + + Used for managing cookies. The methods may be called on any thread unless otherwise indicated. + + + + + Deletes all cookies that matches all the provided parameters. If both and are empty, all cookies will be deleted. + Must be run on the CEF IO Thread + + The cookie URL. If an empty string is provided, any URL will be matched. + The name of the cookie. If an empty string is provided, any URL will be matched. + If non-NULL it will be executed asnychronously on the CEF IO thread after the cookies have been deleted. + Returns false if a non-empty invalid URL is specified, or if cookies cannot be accessed; otherwise, true. + + + + Sets a cookie given a valid URL and explicit user-provided cookie attributes. This function expects each attribute to be well-formed. It will check for disallowed + characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting + the cookie if such characters are found. + + The cookie URL + The cookie + If non-NULL it will be executed asnychronously on the CEF IO thread after the cookie has been set. + returns false if the cookie cannot be set (e.g. if illegal charecters such as ';' are used); otherwise true. + + + + Sets the directory path that will be used for storing cookie data. If is empty data will be stored in + memory only. Otherwise, data will be stored at the specified path. To persist session cookies (cookies without an expiry + date or validity interval) set to true. Session cookies are generally intended to be transient and + most Web browsers do not persist them. + + The file path to write cookies to. + A flag that determines whether session cookies will be persisted or not. + If non-NULL it will be executed asnychronously on the CEF IO thread after the + manager's storage has been initialized + Returns false if cookies cannot be accessed + + + + Set the schemes supported by this manager. By default only "http" and "https" schemes are supported. Must be called before any cookies are accessed. + + The list of supported schemes. + If non-NULL it will be executed asnychronously on the CEF IO thread after the change has been applied. + + + + Visits all cookies using the provided Cookie Visitor. The returned cookies are sorted by longest path, then by earliest creation date. + + A user-provided Cookie Visitor implementation. + Returns false if cookies cannot be accessed; otherwise, true. + + + + Visits a subset of the cookies. The results are filtered by the given url scheme, host, domain and path. + If is true, HTTP-only cookies will also be included in the results. The returned cookies + are sorted by longest path, then by earliest creation date. + + The URL to use for filtering a subset of the cookies available. + A flag that determines whether HTTP-only cookies will be shown in results. + A user-provided Cookie Visitor implementation. + Returns false if cookies cannot be accessed; otherwise, true. + + + + Flush the backing store (if any) to disk + + If non-NULL it willbe executed asnychronously on the CEF IO thread after the flush is complete. + Returns false if cookies cannot be accessed. + + + + Returns true if disposed + + + + + Remove all menu items. Can be used to disable the context menu. Returns true on success. + + Returns true on success + + + + Returns the label at the specified index or empty if not found due to + invalid range or the index being a separator. + + specified index + Label or empty if not found due to invalid range or the index being a separator. + + + + Returns the command id at the specified index or -1 if not found due to invalid range or the index being a separator. + + the index + Command or -1 if not found due to invalid range or the index being a separator. + + + + Removes the item with the specified commandId. + + the command Id + Returns true on success + + + + Add an item to the menu. + + the command Id + the label of the item + Returns true on success. + + + + Add a separator to the menu. + + Returns true on success. + + + + Add a check item to the menu. + + the command Id + the label of the item + Returns true on success. + + + + Add a radio item to the menu. Only a single item with the specified groupId can be checked at a time. + + the command Id + the label of the item + the group id + Returns true on success. + + + + Add a sub-menu to the menu. The new sub-menu is returned. + + the command Id + the label of the item + Returns the newly created . + + + + Insert a separator in the menu at the specified index. + + index + Returns true on success. + + + + Insert an item in the menu at the specified index. + + index + the command Id + the label of the item + Returns true on success. + + + + Insert a check item in the menu at the specified index. + + index + the command Id + the label of the item + Returns true on success. + + + + Insert a radio item in the menu at the specified index. + Only a single item with the specified groupId can be checked at a time. + + index + the command Id + the label of the item + the group id + Returns true on success. + + + + Insert a sub-menu in the menu at the specified index. + + index + the command Id + the label of the item + Returns the newly created . + + + + Removes the item at the specified index. + + index + Returns true on success. + + + + Returns the index associated with the specified commandId or -1 if not found due to the command id not existing in the menu. + + the command Id + Returns the index associated with the specified commandId or -1 if not found due to the command id not existing in the menu. + + + + Sets the command id at the specified index. + + index + the command Id + Returns true on success. + + + + Returns the label for the specified commandId or empty if not found. + + the command Id + Returns the label for the specified commandId or empty if not found. + + + + Sets the label for the specified commandId. + + the command Id + the label + Returns true on success. + + + + Set the label at the specified index. + + index + the label + Returns true on success. + + + + Returns the item type for the specified commandId. + + the command Id + Returns the item type for the specified commandId. + + + + Returns the item type at the specified index. + + index + Returns the item type at the specified index. + + + + Returns the group id for the specified commandId or -1 if invalid. + + the command Id + Returns the group id for the specified commandId or -1 if invalid. + + + + Returns the group id at the specified index or -1 if invalid. + + index + Returns the group id at the specified index or -1 if invalid. + + + + Sets the group id for the specified commandId. + + the command Id + the group id + Returns true on success. + + + + Sets the group id at the specified index. + + index + the group id + Returns true on success. + + + + Returns the for the specified commandId or null if invalid. + + the command Id + Returns the for the specified commandId or null if invalid. + + + + Returns the at the specified index or empty if invalid. + + index + Returns the for the specified commandId or null if invalid. + + + + Returns true if the specified commandId is visible. + + the command Id + Returns true if the specified commandId is visible. + + + + Returns true if the specified index is visible. + + index + Returns true if the specified index is visible. + + + + Change the visibility of the specified commandId. + + the command Id + visible + Returns true on success. + + + + Change the visibility at the specified index. + + index + visible + Returns true on success. + + + + Returns true if the specified commandId is enabled. + + the command Id + Returns true if the specified commandId is enabled. + + + + Returns true if the specified index is enabled. + + index + Returns true if the specified index is enabled. + + + + Change the enabled status of the specified commandId. + + the command Id + is enabled + Returns true on success. + + + + Change the enabled status at the specified index. + + index + is enabled + Returns true on success. + + + + Returns true if the specified commandId is checked. Only applies to check and radio items. + + the command Id + Returns true if the specified commandId is checked. Only applies to check and radio items. + + + + Returns true if the specified index is checked. Only applies to check and radio items. + + index + Returns true if the specified index is checked. Only applies to check and radio items. + + + + Check the specified commandId. Only applies to check and radio items. + + the command Id + set checked + Returns true on success. + + + + Check the specified index. Only applies to check and radio items. + + index + set checked + Returns true on success. + + + + Returns true if the specified commandId has a keyboard accelerator assigned. + + the command Id + Returns true if the specified commandId has a keyboard accelerator assigned. + + + + Returns true if the specified index has a keyboard accelerator assigned. + + index + Returns true if the specified index has a keyboard accelerator assigned. + + + + Set the keyboard accelerator for the specified commandId. + + the command Id + keyCode can be any key or character value. + shift key pressed + ctrl key pressed + alt key pressed + Returns true on success. + + + + Set the keyboard accelerator at the specified index. keyCode can be any key or character value. + + index + keyCode can be any key or character value. + shift key pressed + ctrl key pressed + alt key pressed + Returns true on success. + + + + Remove the keyboard accelerator for the specified commandId. + + the command Id + Returns true on success. + + + + Remove the keyboard accelerator at the specified index. + + index + Returns true on success. + + + + Retrieves the keyboard accelerator for the specified commandId. + + the command Id + keyCode can be any key or character value. + shift key pressed + ctrl key pressed + alt key pressed + Returns true on success. + + + + Retrieves the keyboard accelerator for the specified index. + + index + keyCode can be any key or character value. + shift key pressed + ctrl key pressed + alt key pressed + Returns true on success. + + + + Returns the number of items in this menu. + + + + + Returns a bitmask containing any and all problems verifying the server + certificate. + + + + + Returns the X.509 certificate. + + + + + Class representing a a keyboard event. + + + + + The type of keyboard event. + + + + + Bit flags describing any pressed modifier keys. See + cef_event_flags_t for values. + + + + + The Windows key code for the key event. This value is used by the DOM + specification. Sometimes it comes directly from the event (i.e. on + Windows) and sometimes it's determined using a mapping function. See + WebCore/platform/chromium/KeyboardCodes.h for the list of values. + + + + + The actual key code genenerated by the platform. + + + + + Indicates whether the event is considered a "system key" event (see + http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). + This value will always be false on non-Windows platforms. + + + + + True if the focus is currently on an editable field on the page. This is useful for determining if standard key events should be intercepted. + + + + + Add the specified . + + element to be added. + Returns true if the add succeeds. + + + + Remove the specified . + + element to be removed. + Returns true if the add succeeds. + + + + Remove all existing post data elements. + + + + + Create a new instance + + + + + + Retrieve the post data elements. + + + + + Returns true if this object is read-only. + + + + + Gets a value indicating whether the object has been disposed of. + + + + + Returns true if the underlying POST data includes elements that are not + represented by this IPostData object (for example, multi-part file upload + data). Modifying IPostData objects with excluded elements may result in + the request failing. + + + + + Remove all contents from the post data element. + + + + + Gets or sets the file name. + + + + + Gets if the object is read-only. + + + + + Gets the type of this . + + + + + Gets or sets the bytes of this . + + + + + Use this static class to configure some CefSharp specific settings like WcfTimeout + + + + + Set default values for CefSharpSettings + + + + + WCF is used by JavascriptBinding + Disabling effectively disables both of these features. + Defaults to true + + + + + Change the Close timeout for the WCF channel used by the sync JSB binding. + The default value is currently 2 seconds. Chaning this to + will result on Abort() being called on the WCF Channel Host + + + + + For the WinForms and WPF instances of ChromiumWebBrowser the relevant Application Exit event + is hooked and Cef.Shutdown() called by default. Set this to false to disable this behaviour. + This value needs to be set before the first instance of ChromiumWebBrowser is created as + the event handlers are hooked in the static constructor for the ChromiumWebBrowser class + + + + + Class used to Represent a cookie the built in .Net Cookie + class isn't used as some of it's properties have internal setters + + + + + Default implementation of it's used + internally for the LoadHtml implementation - basically a resource handler is + registered for a specific Url. + + + + + Class that creates instances for handling custom requests. + The methods of this class will always be called on the CEF IO thread. This interface + maps to the CefRequestHandler::GetResourceHandler method. It was split out to allow for + the implementation that provides support + for the LoadHtml extension method. + + + + + Called before a resource is loaded. To specify a handler for the resource return a object + + The browser UI control + the browser object + the frame object + the request object - cannot be modified in this callback + To allow the resource to load normally return NULL otherwise return an instance of ResourceHandler with a valid stream + + + + Are there any 's registered? + + + + + Create a new instance of DefaultResourceHandlerFactory + + string equality comparer + + + + Register handler with the specified Url + + url + handler + returns true if the Url was successfully parsed into a Uri otherwise false + + + + Unregister a handler for the specified Url + + Url + returns true if successfully removed + + + + Called before a resource is loaded. To specify a handler for the resource return a object + + The browser UI control + the browser object + the frame object + the request object - cannot be modified in this callback + To allow the resource to load normally return NULL otherwise return an instance of ResourceHandler with a valid stream + + + + Resource handler thread safe dictionary + + + + + Are there any 's registered? + + + + + DependencyChecker provides a known list of Cef/CefSharp dependencies and + provides helper methods to check for their existance. + + + + + en-US Locales pak file location + + + + + List of Cef Dependencies + + + + + List of Cef Resources (pack files) + + + + + List of CefSharp Dependencies + + + + + List of CefSharp.BrowserSubprocess.exe dependencies. + + + + + CheckDependencies iterates through the list of Cef and CefSharp dependencines + relative to the path provided and returns a list of missing ones + + check to see if optional dependencies are present + Is loading of pack files disabled? + path to check for dependencies + The path to the resources directory, if empty the Executing Assembly path is used. + The path to a separate executable that will be launched for sub-processes. + The locale pack file e.g. + List of missing dependencies, if all present an empty List will be returned + + + + Loop through dependencies and add to the returned missing dependency list if not found. + + The directory of the dependencies, or the current directory if null. + The dependencies to check. + List of missing dependencies, if all present an empty List will be returned + + + + Checks if all Cef and CefSharp dependencies were found relative to the Executing Assembly. + Shortcut method that calls , throws an Exception if not files are missing. + + The locale, if empty then en-US will be used. + The path to the locales directory, if empty locales\ will be used. + The path to the resources directory, if empty the Executing Assembly path is used. + Is loading of pack files disabled? + The path to a separate executable that will be launched for sub-processes. + Throw when not all dependencies are present + + + + CefSharp interface for CefBrowser. + + + + + Returns the browser host object. This method can only be called in the browser process. + + the browser host object + + + + Navigate backwards. + + + + + Navigate forwards. + + + + + Request that the browser close. The JavaScript 'onbeforeunload' event will + be fired. If |forceClose| is false the event handler, if any, will be + allowed to prompt the user and the user can optionally cancel the close. + If |force_close| is true the prompt will not be displayed and the close + will proceed. Results in a call to CefLifeSpanHandler::DoClose() if the + event handler allows the close or if |force_close| is true. See + CefLifeSpanHandler::DoClose() documentation for additional usage + information. + + + + + Reload the current page. + + + true a reload is performed ignoring browser cache; false a reload is + performed using files from the browser cache, if available. + + + + + Stop loading the page. + + + + + Returns true if this object is pointing to the same handle as that object. + + compare browser instances + returns true if the same instance + + + + Returns the frame with the specified identifier, or NULL if not found. + + identifier + frame or null + + + + Returns the frame with the specified name, or NULL if not found. + + name of frame + frame or null + + + + Returns the number of frames that currently exist. + + the number of frames + + + + Returns the identifiers of all existing frames. + + list of frame identifiers + + + + Returns the names of all existing frames. + + frame names + + + + Returns true if the browser can navigate backwards. + + + + + Returns true if the browser can navigate forwards. + + + + + Returns true if the browser is currently loading. + + + + + Returns the globally unique identifier for this browser. + + + + + Returns true if the window is a popup window. + + + + + Returns true if a document has been loaded in the browser. + + + + + Returns the main (top-level) frame for the browser window. + + + + + Returns the focused frame for the browser window. + + + + + Gets a value indicating whether the browser has been disposed of. + + + + + Interface used to represent the browser process aspects of a browser window. + They may be called on any thread in that process unless otherwise indicated in the comments. + + + + + Add the specified word to the spelling dictionary. + + + + + + Request that the browser close. The JavaScript 'onbeforeunload' event will be fired. + + + If forceClose is false the event handler, if any, will be allowed to prompt the user and the + user can optionally cancel the close. If forceClose is true the prompt will not be displayed + and the close will proceed. Results in a call to if + the event handler allows the close or if forceClose is true + See documentation for additional usage information. + + + + + Explicitly close the developer tools window if one exists for this browser instance. + + + + + Call this method when the user drags the mouse into the web view (before calling //). + + + + + Call this method each time the mouse is moved across the web view during a drag operation (after calling and before calling /). + This method is only used when window rendering is disabled. + + + + + Call this method when the user completes the drag operation by dropping the object onto the web view (after calling ). + The object being dropped is , given as an argument to the previous call. + This method is only used when window rendering is disabled. + + + + + Call this method when the drag operation started by a call has ended either in a drop or by being cancelled. + If the web view is both the drag source and the drag target then all DragTarget* methods should be called before DragSource* methods. + This method is only used when window rendering is disabled. + + x mouse coordinate relative to the upper-left corner of the view. + y mouse coordinate relative to the upper-left corner of the view. + Drag Operations mask + + + + Call this method when the user drags the mouse out of the web view (after calling ). + This method is only used when window rendering is disabled. + + + + + Call this method when the drag operation started by a call has completed. + This method may be called immediately without first calling DragSourceEndedAt to cancel a drag operation. + If the web view is both the drag source and the drag target then all DragTarget* methods should be called before DragSource* mthods. + This method is only used when window rendering is disabled. + + + + + Search for text + + can be used to have multiple searches running simultaniously + text to search for + indicates whether to search forward or backward within the page + indicates whether the search should be case-sensitive + indicates whether this is the first request or a follow-up + The IFindHandler instance, if any, will be called to report find results. + + + + Retrieve the window handle of the browser that opened this browser. + + The handler + + + + Retrieve the window handle for this browser. + + The handler + + + + Get the current zoom level. The default zoom level is 0.0. This method can only be called on the CEF UI thread. + + a that when executed returns the zoom level as a double. + + + + Invalidate the view. The browser will call CefRenderHandler::OnPaint asynchronously. + This method is only used when window rendering is disabled (OSR). + + indicates which surface to re-paint either View or Popup. + + + + Begins a new composition or updates the existing composition. Blink has a + special node (a composition node) that allows the input method to change + text without affecting other DOM nodes. + + This method may be called multiple times as the composition changes. When + the client is done making changes the composition should either be canceled + or completed. To cancel the composition call ImeCancelComposition. To + complete the composition call either ImeCommitText or + ImeFinishComposingText. Completion is usually signaled when: + The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR + flag (on Windows). + This method is only used when window rendering is disabled. (WPF and OffScreen) + + is the optional text that + will be inserted into the composition node + is an optional set + of ranges that will be underlined in the resulting text. + is an optional range of the resulting text that + will be selected after insertion or replacement. + + + + Completes the existing composition by optionally inserting the specified + text into the composition node. + This method is only used when window rendering is disabled. (WPF and OffScreen) + + text that will be committed + + + + Completes the existing composition by applying the current composition node + contents. See comments on ImeSetComposition for usage. + This method is only used when window rendering is disabled. (WPF and OffScreen) + + If keepSelection is false the current selection, if any, will be discarded. + + + + Cancels the existing composition and discards the composition node + contents without applying them. See comments on ImeSetComposition for + usage. + This method is only used when window rendering is disabled. (WPF and OffScreen) + + + + + Notify the browser that the window hosting it is about to be moved or resized. + + + + + Send a notification to the browser that the screen info has changed. + The browser will then call CefRenderHandler::GetScreenInfo to update the screen information with the new values. + This simulates moving the webview window from one display to another, or changing the properties of the current display. + This method is only used when window rendering is disabled. + + + + + Print the current browser contents. + + + + + Asynchronously prints the current browser contents to the Pdf file specified. + The caller is responsible for deleting the file when done. + + Output file location. + Print Settings, can be null + Callback executed when printing complete + + + + If a misspelled word is currently selected in an editable node calling this method will replace it with the specified word. + + word to be replaced + + + + Send a capture lost event to the browser. + + + + + Send a focus event to the browser. . (Used for OSR Rendering e.g. WPF or OffScreen) + + set focus + + + + Send a key event to the browser. + + represents keyboard event + + + + Send key event to browser based on operating system message + + message + wParam + lParam + + + + + + Set whether the browser is focused. (Used for Normal Rendering e.g. WinForms) + + set focus + + + + Change the zoom level to the specified value. Specify 0.0 to reset the zoom level. + If called on the CEF UI thread the change will be applied immediately. + Otherwise, the change will be applied asynchronously on the UI thread. + + zoom level + + + + Open developer tools in its own window. If inspectElementAtX and/or inspectElementAtY are specified then + the element at the specified (x,y) location will be inspected. + + window info used for showing dev tools + x coordinate (used for inspectElement) + y coordinate (used for inspectElement) + + + + Download the file at url using IDownloadHandler. + + url to download + + + + Cancel all searches that are currently going on. + + clear the selection + + + + Send a mouse move event to the browser, coordinates, + + x coordinate - relative to upper-left corner of view + y coordinate - relative to upper-left corner of view + mouse leave + click modifiers .e.g Ctrl + + + + Notify the browser that it has been hidden or shown. + Layouting and rendering notification will stop when the browser is hidden. + This method is only used when window rendering is disabled (WPF/OffScreen). + + + + + + Notify the browser that the widget has been resized. + The browser will first call CefRenderHandler::GetViewRect to get the new size and then call CefRenderHandler::OnPaint asynchronously with the updated regions. + This method is only used when window rendering is disabled. + + + + + Retrieve a snapshot of current navigation entries as values sent to the + specified visitor. + + visitor + If true only the current navigation + entry will be sent, otherwise all navigation entries will be sent. + + + + Returns the current visible navigation entry for this browser. This method + can only be called on the CEF UI thread. + + the current navigation entry + + + + Returns true if this browser currently has an associated DevTools browser. + Must be called on the CEF UI thread. + + + + + Get/Set Mouse cursor change disabled + + + + + Returns the request context for this browser. + + + + + Gets/sets the maximum rate in frames per second (fps) that CefRenderHandler:: + OnPaint will be called for a windowless browser. The actual fps may be + lower if the browser cannot generate frames at the requested rate. The + minimum value is 1 and the maximum value is 60 (default 30). This method + can only be called on the UI thread. Can also be set at browser creation + via BrowserSettings.WindowlessFrameRate. + + + + + Returns true if window rendering is disabled. + + + + + Gets a value indicating whether the browserHost has been disposed of. + + + + + This interface represents a CefFrame object (i.e. a HTML frame) + + + + + Execute undo in this frame. + + + + + Execute redo in this frame. + + + + + Execute cut in this frame. + + + + + Execute copy in this frame. + + + + + Execute paste in this frame. + + + + + Execute delete in this frame. + + + + + Execute select all in this frame. + + + + + Save this frame's HTML source to a temporary file and open it in the + default text viewing application. This method can only be called from the + browser process. + + + + + Retrieve this frame's HTML source as a string sent to the specified visitor. + + + a that when executed returns this frame's HTML source as a string. + + + + + Retrieve this frame's HTML source as a string sent to the specified visitor. + Use the method for a Task based async wrapper + + visitor will recieve string values asynchronously + + + + Retrieve this frame's display text as a string sent to the specified visitor. + + + a that when executed returns the frame's display text as a string. + + + + + Retrieve this frame's display text as a string sent to the specified visitor. + Use the method for a Task based async wrapper + + visitor will recieve string values asynchronously + + + + Load the custom request. + + request to be loaded in the frame + + + + Load the specified url. + + url to be loaded in the frame + + + + Load the contents of html with the specified dummy url. + + html to be loaded + should have a standard scheme (for example, http scheme) or behaviors like + link clicks and web security restrictions may not behave as expected. + + + + Execute a string of JavaScript code in this frame. + + Javascript to execute + is the URL where the script in question can be found, if any. + The renderer may request this URL to show the developer the source of the error. + is the base line number to use for error reporting. + + + + Execute some Javascript code in the context of this WebBrowser, and return the result of the evaluation + in an Async fashion + + The Javascript code that should be executed. + is the URL where the script in question can be found, if any. + is the base line number to use for error reporting. + The timeout after which the Javascript code execution should be aborted. + A Task that can be awaited to perform the script execution + + + + Create a custom request for use with + + Initialize the PostData object when creating this request + A new instance of the request + + + + True if this object is currently attached to a valid frame. + + + + + Returns true if this is the main (top-level) frame. + + + + + Returns true if this is the focused frame. + + + + + Returns the name for this frame. If the frame has an assigned name (for + example, set via the iframe "name" attribute) then that value will be + returned. Otherwise a unique name will be constructed based on the frame + parent hierarchy. The main (top-level) frame will always have an empty name + value. + + + + + Returns the globally unique identifier for this frame or < 0 if the underlying frame does not yet exist. + + + + + Returns the parent of this frame or NULL if this is the main (top-level) frame. + + + + + Returns the URL currently loaded in this frame. + + + + + Returns the browser that this frame belongs to. + + + + + Gets a value indicating whether the frame has been disposed of. + + + + + Interface used to break reference cycles in CefSharp.Core C++ code. + This will ALWAYS be a ManagedCefBrowserAdapter instance. + + + + + Interface to convert a JavascriptCallback dto to a callable implementation. + + + + + Do an unchecked conversion from IntPtr to int + so overflow exceptions don't get thrown. + + the IntPtr to cast + a 32-bit signed integer + + + + Class to store TaskCompletionSources indexed by a unique id. + + The type of the result produced by the tasks held. + + + + Creates a new pending task with a timeout. + + The maximum running time of the task. + The unique id of the newly created pending task and the newly created . + + + + Gets and removed pending task by id. + + Unique id of the pending task. + + The associated with the given id. + + + + + MimeType + + + + + Response Headers + + + + + Returns true if this object is read-only. + + + + + Get/set the response error code. + + + + + The status code of the response. Unless set, the default value used is 200 + (corresponding to HTTP status OK). + + + + + Status Text + + + + + Create the browser using windowless (off-screen) rendering. + No window will be created for the browser and all rendering will occur via the CefRenderHandler interface. + + Value will be used to identify monitor info and to act as the parent window for dialogs, context menus, etc. + If not provided then the main screen monitor will be used and some functionality that requires a parent window may not function correctly. + If is true a transparent background color will be used (RGBA=0x00000000). + If is false the background will be white and opaque. + In order to create windowless browsers the CefSettings.windowless_rendering_enabled value must be set to true. + + + + Struct representing a mouse event. + + + + + x coordinate - relative to upper-left corner of view + + + + + y coordinate - relative to upper-left corner of view + + + + + Bit flags describing any pressed modifier keys. + + + + + Factory class used to generate a BitmapInfo object for OSR rendering (WPF and OffScreen projects) + Implement this interface if you wish to render the underlying Bitmap to a custom type + e.g. a GDI Bitmap in the WPF Control + + + + + Create an instance of BitmapInfo based on the params + + create bitmap info for a popup (typically just a bool flag used internally) + DPI scale + newly created BitmapInfo + + + + Used to represent drag data. + + + + + Add a file that is being dragged into the webview. + + File Path + Optional Display Name + + + + Reset the file contents. You should do this before calling + CefBrowserHost::DragTargetDragEnter as the web view does not allow us to + drag in this kind of data. + + + + + Gets the contents of the File as a + For a suggested filename check the property + + the contents of the file + + + + Returns true if this object is read-only. + + + + + Return the name of the file being dragged out of the browser window. + + + + + Retrieve the list of file names that are being dragged into the browser window + + + + + Return the base URL that the fragment came from. This value is used for resolving relative URLs and may be empty. + + + + + Return the text/html fragment that is being dragged. + + + + + Return the plain text fragment that is being dragged. + + + + + Return the metadata, if any, associated with the link being dragged. + + + + + Return the title associated with the link being dragged. + + + + + Return the link URL that is being dragged. + + + + + Returns true if the drag data is a file. + + + + + Returns true if the drag data is a text or html fragment. + + + + + Returns true if the drag data is a link + + + + + Gets a value indicating whether the object has been disposed of. + + + + + Class used to represent a download item. + + + + + Returns true if this object is valid. Do not call any other methods if this function returns false. + + + + + Returns true if the download is in progress. + + + + + Returns true if the download is complete. + + + + + Returns true if the download has been canceled or interrupted. + + + + + Returns a simple speed estimate in bytes/s. + + + + + Returns the rough percent complete or -1 if the receive total size is unknown. + + + + + Returns the total number of bytes. + + + + + Returns the number of received bytes. + + + + + Returns the time that the download started + + + + + Returns the time that the download ended + + + + + Returns the full path to the downloaded or downloading file. + + + + + Returns the unique identifier for this download. + + + + + Returns the URL. + + + + + Returns the URL as it was before any redirects. + + + + + Returns the suggested file name. + + + + + Returns the content disposition. + + + + + Returns the mime type. + + + + + TaskExtension based on the following + https://github.com/ChadBurggraf/parallel-extensions-extras/blob/master/Extensions/TaskExtrasExtensions.cs + https://github.com/ChadBurggraf/parallel-extensions-extras/blob/ec803e58eee28c698e44f55f49c5ad6671b1aa58/Extensions/TaskCompletionSourceExtensions.cs + + + + Creates a new Task that mirrors the supplied task but that will be canceled after the specified timeout. + Specifies the type of data contained in the task. + The task. + The timeout. + The new Task that may time out. + + + Attempts to transfer the result of a Task to the TaskCompletionSource. + Specifies the type of the result. + The TaskCompletionSource. + The task whose completion results should be transfered. + Whether the transfer could be completed. + + + Attempts to transfer the result of a Task to the TaskCompletionSource. + Specifies the type of the result. + The TaskCompletionSource. + The task whose completion results should be transfered. + Whether the transfer could be completed. + + + + Set the TaskCompletionSource in an async fashion. This prevents the Task Continuation being executed sync on the same thread + This is required otherwise contintinuations will happen on CEF UI threads + + Generic param + tcs + result + + + + Wrapper for the CefContextMenuParams + + + + + Returns the Y coordinate of the mouse where the context menu was invoked. + Coords are relative to the associated RenderView's origin. + + + + + Returns the X coordinate of the mouse where the context menu was invoked. + Coords are relative to the associated RenderView's origin. + + + + + Returns flags representing the type of node that the context menu was invoked on. + + + + + Returns the URL of the link, if any, that encloses the node that the + context menu was invoked on. + + + + + Returns the link URL, if any, to be used ONLY for "copy link address". We + don't validate this field in the frontend process. + + + + + Returns the source URL, if any, for the element that the context menu was + invoked on. Example of elements with source URLs are img, audio, and video. + + + + + Returns true if the context menu was invoked on an image which has + non-empty contents. + + + + + Returns the URL of the top level page that the context menu was invoked on. + + + + + Returns the URL of the subframe that the context menu was invoked on. + + + + + Returns the character encoding of the subframe that the context menu was + invoked on. + + + + + Returns the type of context node that the context menu was invoked on. + + + + + Returns flags representing the actions supported by the media element, if + any, that the context menu was invoked on. + + + + + Returns the text of the selection, if any, that the context menu was + invoked on. + + + + + Returns the text of the misspelled word, if any, that the context menu was + invoked on. + + + + + Returns a list of strings from the spell check service for the misspelled word if there is one. + + + + + Returns true if the context menu was invoked on an editable node. + + + + + Returns true if the context menu was invoked on an editable node where + spell-check is enabled. + + + + + Returns flags representing the actions supported by the editable node, if + any, that the context menu was invoked on. + + Returns ContextMenuEditState as flags + + + + Returns true if the context menu contains items specified by the renderer + process (for example, plugin placeholder or pepper plugin menu items). + + + + + Returns true if the context menu was invoked from a pepper plugin. + + + + + Gets a value indicating whether the object has been disposed of. + + + + + JavascriptIgnoreAttribute - Methods and Properties marked with this attribute + will be excluded from Javascript Binding + + + + + A convenience extension method that extracts the Character set from + the content-type header. Can be used in conjuncation with + + the request + character set e.g. UTF-8 + + + + Converts the property into a string + using the specified charset (Encoding) or if unable to parse then uses + the + + post data + character set + encoded string + + + + Add a new that represents the specified file + + post data instance + file name + + + + Add a new that represents the key and value + The data is encoded using + + Post Data + Data to be encoded for the post data element + Specified Encoding. If null then will be used + + + + Represents a range + + + + + From + + + + + To + + + + + Represents a rectangle + + + + + X coordinate + + + + + Y coordinate + + + + + Width + + + + + Height + + + + + The result code - on success + + + + + List of resolved IP addresses or empty if the resolution failed. + + + + + Default implementation of . This latest implementation provides some simplification, at + a minimum you only need to override ProcessRequestAsync. See the project source on GitHub for working examples. + used to implement a custom request handler interface. The methods of this class will always be called on the IO thread. + Static helper methods are included like FromStream and FromString that make dealing with fixed resources easy. + + + + + MimeType to be used if none provided + + + + + Default Constructor + + + + + Initializes a new instance of the class. + + + + + Begin processing the request. If you have the data in memory you can execute the callback + immediately and return true. For Async processing you would typically spawn a Task to perform processing, + then return true. When the processing is complete execute callback.Continue(); In your processing Task, simply set + the StatusCode, StatusText, MimeType, ResponseLength and Stream + + The request object. + The callback used to Continue or Cancel the request (async). + To handle the request return true and call + once the response header information is available + can also be called from inside this method if + header information is available immediately). + To cancel the request return false. + + + + Populate the response stream, response length. When this method is called + the response should be fully populated with data. + It is possible to redirect to another url at this point in time. + NOTE: It's no longer manditory to implement this method, you can simply populate the + properties of this instance and they will be set by the default implementation. + + The response object used to set Headers, StatusCode, etc + length of the response + If set the request will be redirect to specified Url + The response stream + + + + Called if the request is cancelled + + + + + Gets the resource from the file. + + Location of the file. + The file extension. + ResourceHandler. + + + + Gets the resource from the file path specified. Use the + helper method to lookup the mimeType if required. + + Location of the file. + The mimeType if null then text/html is used. + ResourceHandler. + + + + Gets the resource from the string. + + The text. + The file extension. + ResourceHandler. + + + + Gets a that represents a string. + Without a Preamble, Cef will use BrowserSettings.DefaultEncoding to load the html. + + The html string + Character Encoding + Include encoding preamble + Mime Type + ResourceHandler + + + + Gets the resource from a stream. + + A stream of the resource. + Type of MIME. + ResourceHandler. + + + + Gets a MemoryStream from the given string using the provided encoding + + string to be converted to a stream + encoding + if true a BOM will be written to the beginning of the stream + A memory stream from the given string + + + + Gets the MIME type of the content. + + The extension. + System.String. + extension + + + + Dispose of resources here + + + + + Path of the underlying file + + + + + Gets or sets the Mime Type. + + + + + Gets or sets the resource stream. + + + + + Gets or sets the http status code. + + + + + Gets or sets the status text. + + + + + Gets or sets ResponseLength, when you know the size of your + Stream (Response) set this property. This is optional. + If you use a MemoryStream and don't provide a value + here then it will be cast and it's size used + + + + + Gets or sets the headers. + + The headers. + + + + Specify which type of resource handle represnets + + + + + When true the Stream will be Disposed when + this instance is Disposed. The default value for + this property is false. + + + + + If the ErrorCode is set then the response will be ignored and + the errorCode returned. + + + + + FolderSchemeHandlerFactory is a very simple scheme handler that allows you + to map requests for urls to a folder on your file system. For example + creating a setting the rootFolder to c:\projects\CefSharp\CefSharp.Example\Resources + registering the scheme handler + + + + + Class that creates instances for handling scheme requests. + The methods of this class will always be called on the CEF IO thread. + + + + + Return a new instance to handle the request or an empty + reference to allow default handling of the request. + + the browser window that originated the + request or null if the request did not originate from a browser window + (for example, if the request came from CefURLRequest). + frame that originated the request + or null if the request did not originate from a browser window + (for example, if the request came from CefURLRequest). + the scheme name + The request. (will not contain cookie data) + + Return a new instance to handle the request or an empty + reference to allow default handling of the request + + + + + Initialize a new instance of FolderSchemeHandlerFactory + + Root Folder where all your files exist, requests cannot be made outside of this folder + if not null then schemeName checking will be implemented + if not null then hostName checking will be implemented + default page if no page specified, defaults to index.html + + + + If the file requested is within the rootFolder then a IResourceHandler reference to the file requested will be returned + otherwise a 404 ResourceHandler will be returned. + + the browser window that originated the + request or null if the request did not originate from a browser window + (for example, if the request came from CefURLRequest). + frame that originated the request + or null if the request did not originate from a browser window + (for example, if the request came from CefURLRequest). + the scheme name + The request. (will not contain cookie data) + + A IResourceHandler + + + + + Class representing the SSL information for a navigation entry. + + + + + Returns true if the status is related to a secure SSL/TLS connection. + + + + + Returns a bitmask containing any and all problems verifying the server + certificate. + + + + + + Returns the SSL version used for the SSL connection. + + + + + + Returns a bitmask containing the page security content status. + + + + + Returns the X.509 certificate. + + + + + Gets or sets a delegate which is used to invoke the method if the member is a method. + + + + + Identifies the for BrowserProcess to RenderProcess communication + + + + + Gets or sets the name of the managed property. + + + + + Gets or sets the name of the property in the JavaScript runtime. + + + + + Params this method expects + + + + + Number of Params this function exepects + + + + + This maps the registered objects in the browser process + to the reflection data necessary to update the objects, + and mapping information to how the object/method/proprerty + will be exposed to JavaScript. + + + + + Identifies the for BrowserProcess to RenderProcess communication + + + + + Indicate if JavascriptName is camel case or not + + + + + Gets the methods of the . + + + + + Gets the properties of the . + + + + + Gets or sets the value. + + + + + This class manages the registration of objects in the browser + process to be exposed to JavaScript in the renderer process. + Registration performs method, parameter, property type analysis + of the registered objects into meta-data tied to reflection data + for later use. + + This class also is the adaptation layer between the BrowserProcessService + and the registered objects. This means when the renderer wants to call an + exposed method, get a property of an object, or + set a property of an object in the browser process, that this + class does deals with the previously created meta-data and invokes the correct + behavior via reflection APIs. + + All of the registered objects are tracked via meta-data for the objects + expressed starting with the JavaScriptObject type. + + + + + A hash from assigned object ids to the objects, + this is done to speed up finding the object in O(1) time + instead of traversing the JavaScriptRootObject tree. + + + + + Analyse the object and generate metadata which will + be used by the browser subprocess to interact with Cef. + Method is called recursively + + Javascript object + Analyse methods for inclusion in metadata model + When analysis is done on a property, if true then get it's value for transmission over WCF + camel case the javascript names of properties/methods + Analyse properties for binding + + + + This is the root of the objects that get serialized to the child process. + + + + + This is the root of the objects that get serialized to the child + process with cef ipc serialization (wcf not required). + + + + + Gets or sets a delegate which is used to set the property / field value in the managed object. + + + + + Gets or sets a delegate which is used to get the property / field value from the managed object. + + + + + Identifies the for BrowserProcess to RenderProcess communication + + + + + Gets or sets the name of the managed property. + + + + + Gets or sets the name of the property in the JavaScript runtime. + + + + + Gets or sets if this property represents a complex type + + + + + Gets or sets if this property is read-only + + + + + Gets or sets the property value + Only primative types can be stored in this property + + + + + Used in conjunction with CefSettings.RegisterScheme to register a scheme. + You can register your own custom scheme e.g. custom:// or use an existing + scheme e.g. http:// + + + + + Creates a new CefCustomScheme. + + + + + Method used internally + + command line arguments + list of scheme objects + + + + Schema Name e.g. custom + + + + + Optional Domain Name. An empty value for a standard scheme + will cause the factory to match all domain names. The |domain_name| value + will be ignored for non-standard schemes. + + + + + If true the scheme will be treated as a standard scheme. + Standard schemes are subject to URL canonicalization and parsing rules as + defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 available + at http://www.ietf.org/rfc/rfc1738.txt + + In particular, the syntax for standard scheme URLs must be of the form: +
+              [scheme]://[username]:[password]@[host]:[port]/[url-path]
+             
+ Standard scheme URLs must have a host component that is a fully qualified + domain name as defined in Section 3.5 of RFC 1034 [13] and Section 2.1 of + RFC 1123. These URLs will be canonicalized to "scheme://host/path" in the + simplest case and "scheme://username:password@host:port/path" in the most + explicit case. For example, "scheme:host/path" and "scheme:///host/path" + will both be canonicalized to "scheme://host/path". The origin of a + standard scheme URL is the combination of scheme, host and port (i.e., + "scheme://host:port" in the most explicit case). + + For non-standard scheme URLs only the "scheme:" component is parsed and + canonicalized. The remainder of the URL will be passed to the handler + as-is. For example, "scheme:///some%20text" will remain the same. + Non-standard scheme URLs cannot be used as a target for form submission. +
+
+ + + If true the scheme will be treated as local (i.e. with the + same security rules as those applied to "file" URLs). Normal pages cannot + link to or access local URLs. Also, by default, local URLs can only perform + XMLHttpRequest calls to the same URL (origin + path) that originated the + request. To allow XMLHttpRequest calls from a local URL to other URLs with + the same origin set the CefSettings.file_access_from_file_urls_allowed + value to true. To allow XMLHttpRequest calls from a local URL to all + origins set the CefSettings.universal_access_from_file_urls_allowed value + to true. + + + + + If true the scheme will be treated as display-isolated. + This means that pages cannot display these URLs unless they are + from the same scheme. For example, pages in another origin cannot create + iframes or hyperlinks to URLs with this scheme. + + + + + If true the scheme will be treated with the same security + rules as those applied to "https" URLs. For example, loading this scheme + from other secure schemes will not trigger mixed content warnings. + + + + + If true the scheme can be sent CORS requests. + This value should be true in most cases where IsStandard is true. + + + + + Factory Class that creates instances + for handling scheme requests. + + + + + Interface implemented by UI control that contains + a ManagedCefBrowserAdapter instance. + + + + + ChromiumWebBrowser implementations implement this interface. Can be cast to + the concrete implementation to access UI specific features. + + + + + + Loads the specified URL. + + The URL to be loaded. + + + + Registers a Javascript object in this specific browser instance. + + The name of the object. (e.g. "foo", if you want the object to be accessible as window.foo). + The object to be made accessible to Javascript. + binding options - camelCaseJavascriptNames default to true + + + + Asynchronously registers a Javascript object in this specific browser instance. + Only methods of the object will be available. + + The name of the object. (e.g. "foo", if you want the object to be accessible as window.foo). + The object to be made accessible to Javascript. + binding options - camelCaseJavascriptNames default to true + The registered methods can only be called in an async way, they will all return immeditaly and the resulting + object will be a standard javascript Promise object which is usable to wait for completion or failure. + + + + Attempts to give focus to the IWebBrowser control. + + true if keyboard focus and logical focus were set to this element; false if only logical focus + was set to this element, or if the call to this method did not force the focus to change. + + + + Returns the current CEF Browser Instance + + browser instance or null + + + + Event handler for receiving Javascript console messages being sent from web pages. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + (The exception to this is when your running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread). + + + + + Event handler for changes to the status message. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + (The exception to this is when your running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread). + + + + + Event handler that will get called when the browser begins loading a frame. Multiple frames may be loading at the same + time. Sub-frames may start or continue loading after the main frame load has ended. This method may not be called for a + particular frame if the load request for that frame fails. For notification of overall browser load status use + OnLoadingStateChange instead. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + + Whilst this may seem like a logical place to execute js, it's called before the DOM has been loaded, implement + as it's called when the underlying V8Context is created + (Only called for the main frame at this stage) + + + + Event handler that will get called when the browser is done loading a frame. Multiple frames may be loading at the same + time. Sub-frames may start or continue loading after the main frame load has ended. This method will always be called + for all frames irrespective of whether the request completes successfully. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + + + + + Event handler that will get called when the resource load for a navigation fails or is canceled. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + + + + + Event handler that will get called when the Loading state has changed. + This event will be fired twice. Once when loading is initiated either programmatically or + by user action, and once when loading is terminated due to completion, cancellation of failure. + It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI + thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. + To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. + + + + + Implement and assign to handle dialog events. + + The dialog handler. + + + + Implement and assign to handle events related to browser requests. + + The request handler. + + + + Implement and assign to handle events related to browser display state. + + The display handler. + + + + Implement and assign to handle events related to browser load status. + + The load handler. + + + + Implement and assign to handle events related to popups. + + The life span handler. + + + + Implement and assign to handle events related to key press. + + The keyboard handler. + + + + Implement and assign to handle events related to JavaScript Dialogs. + + The js dialog handler. + + + + Implement and assign to handle events related to dragging. + + The drag handler. + + + + Implement and assign to handle events related to downloading files. + + The download handler. + + + + Implement and assign to handle events related to the browser context menu + + The menu handler. + + + + Implement and assign to handle events related to the browser component's focus + + The focus handler. + + + + Implement and control the loading of resources + + The resource handler factory. + + + + Implement and assign to handle requests for permission to use geolocation. + + The geolocation handler. + + + + Implement and assign to handle messages from the render process. + + The render process message handler. + + + + Implement to handle events related to find results. + + The find handler. + + + + A flag that indicates whether the WebBrowser is initialized (true) or not (false). + + true if this instance is browser initialized; otherwise, false. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + A flag that indicates whether the control is currently loading one or more web pages (true) or not (false). + + true if this instance is loading; otherwise, false. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + A flag that indicates whether the state of the control current supports the GoBack action (true) or not (false). + + true if this instance can go back; otherwise, false. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + A flag that indicates whether the state of the control currently supports the GoForward action (true) or not (false). + + true if this instance can go forward; otherwise, false. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + The address (URL) which the browser control is currently displaying. + Will automatically be updated as the user navigates to another page (e.g. by clicking on a link). + + The address. + In the WPF control, this property is implemented as a Dependency Property and fully supports data + binding. + + + + The text that will be displayed as a ToolTip + + The tooltip text. + + + + A flag that indicates if you can execute javascript in the main frame. + Flag is set to true in IRenderProcessMessageHandler.OnContextCreated. + and false in IRenderProcessMessageHandler.OnContextReleased + + + + + Called to retrieve the translation from view coordinates to actual screen coordinates. + + x + y + screen x + screen y + Return true if the screen coordinates were provided. + + + + Called when the IME composition range has changed. + + is the range of characters that have been selected + is the bounds of each character in view coordinates. + + + + Interface to implement for visiting cookie values. + The methods of this class will always be called on the IO thread. + If there are no cookies then Visit will never be called, you must implement + Dispose to handle this scenario. + + + + + Method that will be called once for each cookie. This method may never be called if no cookies are found. + + cookie + is the 0-based index for the current cookie. + is the total number of cookies. + Set to true to delete the cookie currently being visited. + Return false to stop visiting cookies otherwise true + + + + Callback interface for IBrowserHost.GetNavigationEntries. + The methods of this class will be called on the CEF UI thread. + + + + + Method that will be executed. + + if the navigationEntry will be invalid then + is true if this entry is the currently loaded navigation entry + is the 0-based index of this entry + is the total number of entries. + Return true to continue visiting entries or false to stop. + + + + Implement this interface to receive string values asynchronously. + + + + + Method that will be executed. + + string (result of async execution) + + + + Method that will be called once for each plugin. + This method may never be called if no plugins are found. + + plugin information + is the 0-based index for the current plugin + total is the total number of plugins. + Return false to stop visiting plugins otherwise true + + + + Cookie Visitor implementation that uses a TaskCompletionSource + to return a List of cookies + + + + + Default constructor + + + + + Task that can be awaited for the result to be retrieved async + + + + + A that uses a TaskCompletionSource + to simplify things + + + + + Default constructor + + + + + Task that can be awaited for the result to be retrieved async + + + + + Task that can be awaited for the result to be retrieved async + + + + + A that uses a TaskCompletionSource + to simplify things + + + + + Default constructor + + + + + Method that will be executed. + + string (result of async execution) + + + + Task that can be awaited for the result to be retrieved async + + + + + Returns the main (top-level) frame for the browser window. + + Frame + + + + Returns the focused frame for the browser window. + + Frame + + + + Execute Undo on the focused frame + + The ChromiumWebBrowser instance this method extends + + + + Execute Redo on the focused frame + + The ChromiumWebBrowser instance this method extends + + + + Execute Cut on the focused frame + + The ChromiumWebBrowser instance this method extends + + + + Execute Copy on the focused frame + + The ChromiumWebBrowser instance this method extends + + + + Execute Paste on the focused frame + + The ChromiumWebBrowser instance this method extends + + + + Execute Delete on the focused frame + + The ChromiumWebBrowser instance this method extends + + + + Execute SelectAll on the focused frame + + The ChromiumWebBrowser instance this method extends + + + + Opens up a new program window (using the default text editor) where the source code of the currently displayed web + page is shown. + + The ChromiumWebBrowser instance this method extends + + + + Retrieve the main frame's HTML source using a . + + The ChromiumWebBrowser instance this method extends + that when executed returns the frame source as a string + + + + Retrieve the main frame's display text using a . + + The ChromiumWebBrowser instance this method extends + that when executed returns the frame display text as a string. + + + + Execute some Javascript code in the context of this WebBrowser. As the method name implies, the script will be + executed asynchronously, and the method therefore returns before the script has actually been executed. + This simple helper extension will encapsulate params in single quotes (unless int, uint, etc) + + The ChromiumWebBrowser instance this method extends + The javascript method name to execute + the arguments to be passed as params to the method + + + + Execute some Javascript code in the context of this WebBrowser. As the method name implies, the script will be + executed asynchronously, and the method therefore returns before the script has actually been executed. + + The ChromiumWebBrowser instance this method extends + The Javascript code that should be executed. + + + + Load the string contents with the specified dummy url. Web security restrictions may not behave as expected. + + The ChromiumWebBrowser instance this method extends + html string to load + the url should have a standard scheme (for example, http scheme) or behaviors like link clicks + + + + Registers and loads a that represents the HTML content. + + + `Cef` Native `LoadHtml` is unpredictable and only works sometimes, this method wraps + the provided HTML in a and loads the provided url using + the method. + Defaults to using for character encoding + The url must start with a valid schema, other uri's such as about:blank are invalid + A valid example looks like http://test/page + + The ChromiumWebBrowser instance this method extends + The HTML content. + The URL that will be treated as the address of the content. + returns false if the Url was not successfully parsed into a Uri + + + + Loads html as Data Uri + See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs for details + If base64Encode is false then html will be Uri encoded + + The ChromiumWebBrowser instance this method extends + Html to load as data uri. + if true the html string will be base64 encoded using UTF8 encoding. + + + + Registers and loads a that represents the HTML content. + + + `Cef` Native `LoadHtml` is unpredictable and only works sometimes, this method wraps + the provided HTML in a and loads the provided url using + the method. + + The ChromiumWebBrowser instance this method extends + The HTML content. + The URL that will be treated as the address of the content. + Character Encoding + returns false if the Url was not successfully parsed into a Uri + + + + Register a ResourceHandler. Can only be used when browser.ResourceHandlerFactory is an instance of DefaultResourceHandlerFactory + + The ChromiumWebBrowser instance this method extends + the url of the resource to unregister + Stream to be registered, the stream should not be shared with any other instances of DefaultResourceHandlerFactory + the mimeType + + + + Unregister a ResourceHandler. Can only be used when browser.ResourceHandlerFactory is an instance of DefaultResourceHandlerFactory + + The ChromiumWebBrowser instance this method extends + the url of the resource to unregister + + + + Stops loading the current page. + + + + + Navigates back, must check before calling this method. + + + + + Navigates forward, must check before calling this method. + + + + + Reloads the page being displayed. This method will use data from the browser's cache, if available. + + + + + Reloads the page being displayed, optionally ignoring the cache (which means the whole page including all .css, .js + etc. resources will be re-fetched). + + The ChromiumWebBrowser instance this method extends + true A reload is performed ignoring browser cache; false A reload is + performed using files from the browser cache, if available. + + + + Asynchronously gets the current Zoom Level. + + + + + Asynchronously gets the current Zoom Level. + + + + + Change the ZoomLevel to the specified value. Can be set to 0.0 to clear the zoom level. + + + If called on the CEF UI thread the change will be applied immediately. + Otherwise, the change will be applied asynchronously on the CEF UI thread. + The CEF UI thread is different to the WPF/WinForms UI Thread + + The ChromiumWebBrowser instance this method extends + zoom level + + + + Change the ZoomLevel to the specified value. Can be set to 0.0 to clear the zoom level. + + + If called on the CEF UI thread the change will be applied immediately. + Otherwise, the change will be applied asynchronously on the CEF UI thread. + The CEF UI thread is different to the WPF/WinForms UI Thread + + The ChromiumWebBrowser instance this method extends + zoom level + + + + Search for text within the current page. + + The ChromiumWebBrowser instance this method extends + Can be used in can conjunction with searchText to have multiple + searches running simultaneously. + search text + indicates whether to search forward or backward within the page. + indicates whether the search should be case-sensitive. + indicates whether this is the first request or a follow-up. + + + + Search for text within the current page. + + The ChromiumWebBrowser instance this method extends + Can be used in can conjunction with searchText to have multiple + searches running simultaneously. + search text + indicates whether to search forward or backward within the page. + indicates whether the search should be case-sensitive. + indicates whether this is the first request or a follow-up. + + + + Cancel all searches that are currently going on. + + The ChromiumWebBrowser instance this method extends + clear the current search selection + + + + Cancel all searches that are currently going on. + + The ChromiumWebBrowser instance this method extends + clear the current search selection + + + + Opens a Print Dialog which if used (can be user cancelled) will print the browser contents. + + The ChromiumWebBrowser instance this method extends + + + + Asynchronously prints the current browser contents to the PDF file specified. + The caller is responsible for deleting the file when done. + + The object this method extends. + Output file location. + Print Settings. + A task that represents the asynchronous print operation. + The result is true on success or false on failure to generate the Pdf. + + + + Opens a Print Dialog which if used (can be user cancelled) will print the browser contents. + + The ChromiumWebBrowser instance this method extends + + + + Asynchronously prints the current browser contents to the PDF file specified. + The caller is responsible for deleting the file when done. + + The ChromiumWebBrowser instance this method extends + Output file location. + Print Settings. + A task that represents the asynchronous print operation. + The result is true on success or false on failure to generate the Pdf. + + + + Open developer tools in its own window. + + The ChromiumWebBrowser instance this method extends + + + + Open developer tools in its own window. + + The ChromiumWebBrowser instance this method extends + + + + Explicitly close the developer tools window if one exists for this browser instance. + + The ChromiumWebBrowser instance this method extends + + + + Explicitly close the developer tools window if one exists for this browser instance. + + The ChromiumWebBrowser instance this method extends + + + + If a misspelled word is currently selected in an editable node calling + this method will replace it with the specified word. + + The ChromiumWebBrowser instance this method extends + The new word that will replace the currently selected word. + + + + If a misspelled word is currently selected in an editable node calling + this method will replace it with the specified word. + + The ChromiumWebBrowser instance this method extends + The new word that will replace the currently selected word. + + + + Add the specified word to the spelling dictionary. + + The ChromiumWebBrowser instance this method extends + The new word that will be added to the dictionary. + + + + Add the specified word to the spelling dictionary. + + The ChromiumWebBrowser instance this method extends + The new word that will be added to the dictionary. + + + + Evaluate some Javascript code in the context of this WebBrowser. The script will be executed asynchronously and the + method returns a Task encapsulating the response from the Javascript + This simple helper extension will encapsulate params in single quotes (unless int, uint, etc) + + The ChromiumWebBrowser instance this method extends + The javascript method name to execute + the arguments to be passed as params to the method + that can be awaited to perform the script execution + + + + Evaluate some Javascript code in the context of this WebBrowser using the specified timeout. The script will be executed asynchronously and the + method returns a Task encapsulating the response from the Javascript + This simple helper extension will encapsulate params in single quotes (unless int, uint, etc) + + The ChromiumWebBrowser instance this method extends + The timeout after which the Javascript code execution should be aborted. + The javascript method name to execute + the arguments to be passed as params to the method + that can be awaited to perform the script execution + + + + Transforms the methodName and arguments into valid Javascript code. Will encapsulate params in single quotes (unless int, uint, etc) + + The javascript method name to execute + the arguments to be passed as params to the method + The Javascript code + + + + Information about a specific web plugin. + + + + + Gets or sets the plugin name (i.e. Flash). + + + + + Gets or sets tge description of the plugin from the version information. + + + + + Gets or sets the plugin file path (DLL/bundle/library). + + + + + Gets or sets the version of the plugin (may be OS-specific). + + + + + Set the referrer URL and policy. If non-empty the referrer URL must be + fully qualified with an HTTP or HTTPS scheme component. Any username, + password or ref component will be removed. + + the referrer url + referrer policy + + + + Initialize a new instance of . + Make sure to check if the is null + before calling otherwise the existing data will be overridden. + + + + + Request Url + + + + + Returns the globally unique identifier for this request or 0 if not specified. + Can be used by implementations in the browser process to track a + single request across multiple callbacks. + + + + + Request Method GET/POST etc + + + + + Get the referrer URL. + + + + + Get the resource type for this request. + + + + + Get the referrer policy. + + + + + Header Collection + NOTE: This collection is a copy of the underlying type, to make changes, take a reference to the collection, + make your changes, then reassign the collection. At some point this will be replaced with a proper wrapper. + + + + + Post data + + + + + Get the transition type for this request. + Applies to requests that represent a main frame or sub-frame navigation. + + + + + Gets a value indicating whether the request has been disposed of. + + + + + Returns true if this object is read-only. + + +
+
diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebkitPanel.xaml b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebkitPanel.xaml index 701dd81..8de9ffe 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebkitPanel.xaml +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebkitPanel.xaml @@ -4,9 +4,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:QuickLook.Plugin.HtmlViewer" + xmlns:cef="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> - - + + diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebkitPanel.xaml.cs b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebkitPanel.xaml.cs index 8892b2c..c416f52 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebkitPanel.xaml.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebkitPanel.xaml.cs @@ -1,27 +1,47 @@ using System; +using System.Collections.Generic; using System.IO; +using System.Runtime.CompilerServices; using System.Text; +using System.Windows; using System.Windows.Controls; +using CefSharp; namespace QuickLook.Plugin.HtmlViewer { /// /// Interaction logic for UserControl1.xaml /// - public partial class WebkitPanel : UserControl + public partial class WebkitPanel : UserControl,IDisposable { + private string _cefPath = + Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)); + public WebkitPanel() { + var libraryLoader = new CefLibraryHandle(Path.Combine(_cefPath, "libcef.dll")); + + if (!Cef.IsInitialized) + Cef.Initialize(new CefSettings + { + BrowserSubprocessPath = Path.Combine(_cefPath, "CefSharp.BrowserSubprocess.exe"), + LocalesDirPath = Path.Combine(_cefPath, "locales"), + ResourcesDirPath = _cefPath, + LogSeverity = LogSeverity.Disable, + CefCommandLineArgs = {new KeyValuePair("disable-gpu", "1")}, + }); + InitializeComponent(); + + Application.Current.Exit += (sender, e) => Cef.Shutdown(); } public void Navigate(string path) { - //path = "http://pooi.moe/QuickLook"; if (Path.IsPathRooted(path)) path = FilePathToFileUrl(path); - browser.Loaded += (sender, e) => browser.Navigate(path); + browser.IsBrowserInitializedChanged += (sender, e) => browser.Load(path); } private static string FilePathToFileUrl(string filePath) @@ -50,5 +70,10 @@ namespace QuickLook.Plugin.HtmlViewer uri.Insert(0, "file:///"); return uri.ToString(); } + + public void Dispose() + { + browser?.Dispose(); + } } } \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/packages.config b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/packages.config deleted file mode 100644 index cf58da0..0000000 --- a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file