Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: safari/ext/content.js

Issue 4526994515558400: Fixed request type for sub frames on Safari (Closed)
Patch Set: Created Dec. 20, 2013, 9:35 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/ext/content.js
===================================================================
--- a/safari/ext/content.js
+++ b/safari/ext/content.js
@@ -263,24 +263,24 @@
{
var type;
- switch(event.target.nodeName)
+ switch(event.target.localName)
{
- case "FRAME":
- case "IFRAME":
- type = "frame";
+ case "frame":
+ case "iframe":
+ type = "sub_rame";
break;
- case "IMG":
+ case "img":
type = "image";
break;
- case "OBJECT":
- case "EMBED":
+ case "object":
+ case "embed":
type = "object";
break;
- case "SCRIPT":
+ case "script":
type = "script";
break;
- case "LINK":
- if (/(^|\s)stylesheet($|\s)/i.test(event.target.rel))
+ case "link":
+ if (/\bstylesheet\b/i.test(event.target.rel))
{
type = "stylesheet";
break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld