首页 \ 问答 \ console.log()已定义但未登录IE - 空控制台(console.log() is defined but doesn't log in IE - empty console)

console.log()已定义但未登录IE - 空控制台(console.log() is defined but doesn't log in IE - empty console)

打开Developer Tools的 Internet Explorer(8和9)页面上的Javascript到达console.log()它已定义 - 但实际日志中没有任何内容

事情尝试:

  • 使用alert()双重检查,定义console并且console.log是一个函数。
  • 在代码到达console.log()行之前和之后检查alert() s,
  • 检查任何IE回退的代码,例如if(ie){console={log:function(){}}} ,删除指向库的链接并检查代码片段以提及console
  • 检查IE的设置并启用与调试相关的任何内容
  • 通过使用console.log() s加载第三方页面来检查IE是否已损坏(例如http://jsbin.com记录“init”和“runner”)
  • 交换window.console console

因此,控制台处于活动状态,但实际控制台中没有控制台消息显示(在“脚本”选项卡或“控制台”选项卡上)。

还有什么可以阻止console.log()实际记录任何内容,即使Developer Tools已打开且console.log是已定义的函数?


Javascript on a page in Internet Explorer (8 and 9) with Developer Tools open reaches console.log(), which is defined - but nothing appears in the actual log.

Things tried:

  • Double-checking with alert()s that console is defined and that console.log is a function.
  • Checking with alert()s before and after that the code does reach the console.log() line,
  • Checking code for any IE fallbacks like if(ie){console={log:function(){}}}, removing links to libraries and checking code snippets for mentions of console
  • Checking IE's settings and enabling anything relating to debugging
  • Checking that IE isn't broken by loading a 3rd party page with console.log()s (e.g. http://jsbin.com logs "init" and "runner")
  • Swapping console for window.console

So the console is there and active, but no console messages show up in the actual console (on either the Script tab or the Console tab).

What else could stop console.log() from actually logging anything, even when Developer Tools is open and console.log is a defined function?


原文:https://stackoverflow.com/questions/21321872
更新时间:2022-09-09 12:09

最满意答案

希望这个Intent Filter可以帮到你

<intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="content"/>
        <data android:scheme="file"/>
        <data android:mimeType="audio/*"/>
    </intent-filter>

Hope this Intent Filter can help you

<intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="content"/>
        <data android:scheme="file"/>
        <data android:mimeType="audio/*"/>
    </intent-filter>

相关问答

更多
  • 第一个决定是这个“客户端”(即HTML / Javascript)还是服务器端(即用你的网站构建的任何语言,例如PHP,C#,Ruby等)。 你的编辑说你想要它.Net - 所以如果你想在服务器端做,你必须找到一个音频库(参见这个问题),然后“寻找”到MP3流中的正确位置,然后使用适当的MIME类型将其返回给浏览器。 但是,您应该小心这样的实现 - 您可能会发现支持大量请求可能会阻塞,特别是如果您无法将MP3文件加载到内存中并且必须为每个请求从磁盘读取它们。 另一种方法是在客户端进行 - 可能使用像JPla ...
  • 正如@TuomasK指出的那样,你在播放之前就会发布媒体。 您应该实现OnCompletionListener以正确释放MediaPlayer。 你可以这样做: MediaPlayer mMp = MediaPlayer.create(ShapesActivity.this, R.raw.circle); mMp.start(); mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { public void onCo ...
  • 像Skurmedel说的那样,你需要防止空集。 但是,你遇到这个问题的原因是你的集合中没有任何.mp3文件。 另一个错误是: .GetFiles(".mp3") 。 你的意思是.GetFiles("*.mp3") 。 Like Skurmedel said, you need to protect against an empty collection. But, the reason you're having this problem is that you couldn't ever have any ...
  • 您正在使用异步 XMLHttpRequest (请注意,它应该用大写“H”拼写),因此在request.onLoad (note:missing = )完成之前调用playSound函数最有可能。 尝试使用console.log或类似命令跟踪脚本的执行情况,以查找类似的错误,并使用JavaScript Console捕获语法错误。 i got this thing fixed :) i made use of audio tag along with web audio API. here's the co ...
  • 将AvBin添加到PATH环境变量中: 你可以使用folowwing命令执行此操作 setx path "%path%;c:\pathToAvBin" 请注意,您需要将“c:\ pathToAvBin”更改为av bin的真实路径:) 要小心,不要清除你的路径 Add AvBin to your PATH enviroment variable: you can do this with the folowwing command setx path "%path%;c:\pathToAvBin" pl ...
  • 我已经成功地使用了令人敬畏的AFNetworking库来成功运行 NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; operation.outputStream = [NSOutputStream outputStreamToFileAtPa ...
  • HTML 5音频标签将是iPhone的最佳选择,因为Flash不受支持,但请记住,互联网上的大多数PC 尚不支持HTML 5 ,因为浏览器世界的巨头(Internet Explorer)不支持但支持它。 这将在IE9发布时发生变化,但仍会有相当多的人/实体无法升级。 如果您关心不支持HTML 5的受众,则需要使用其他方法,如Flash或Silverlight。 幸运的是,音频标签允许您在不支持标记时指定备用内容,从而将此考虑在内。
  • 如果您可以假设您的用户具有支持HTML5的浏览器,则可以向页面添加隐藏的

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)