<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>12408</bug_id>
          
          <creation_ts>2007-01-25 12:22:59 -0800</creation_ts>
          <short_desc>Documents loaded via &quot;javascript:&quot; URLs have empty URLs</short_desc>
          <delta_ts>2023-12-09 18:11:12 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>calvinstock</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32636</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-01-25 12:22:59 -0800</bug_when>
    <thetext>&lt;iframe frameborder=0 src=&quot;javascript:&apos;&lt;script&gt;alert(document.URL)&lt;/script&gt;&apos;&quot;&gt;&lt;/iframe&gt;

This shows an alert with iframe&apos;s URL. In WebKit, it&apos;s empty (displayed as about:blank), while Firefox displays the actual &quot;javascript:&quot; URL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100642</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2008-11-28 14:14:43 -0800</bug_when>
    <thetext>Yeah, we can fix this, but we have to it carefully.  When you go down this path, you end up with javascript URLs in the back/forward list, etc, and you have to be careful only to run them once and not to introduce security problems.

When Firefox creates a document with a javascript URL, they actually represent the document&apos;s URL internally as a &quot;wyciwyg&quot; URL (what you cache is what you get).  That why when you return to the document (say with back/forward) you know the result of evaling the JavaScript without having to do it again (and you remember the right security context).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>140802</commentid>
    <comment_count>2</comment_count>
    <who name="Calvin">calvinstock</who>
    <bug_when>2009-08-17 13:09:23 -0700</bug_when>
    <thetext>That&apos;s nothing! :P I have even seen &quot;null&quot; title&apos;s on my iPhone.

I never liked the generic &quot;Javascript&quot; or &quot;index.html&quot; title&apos;s in those popup boxes. That&apos;s the reason that I&apos;m here... although it is not really a bug (more a design flaw)... I would love to see a way to customize the title&apos;s (and button names)

my idea is to expand:

alert(&quot;hello world&quot;)

to (note the [ and ] for optional parameters so that it stays standard compliant):

alert(&quot;hello world&quot; [, &quot;title&quot; [, &quot;name of the button&quot; ]])


the prompt and confirm popup syntax is analogue:

prompt(&quot;text goes here&quot; [, &quot;title&quot; [, &lt;array of length 2 with the button names&gt;]])

-&gt; it should be possible here to only have one button if you pass an array of length 1 (longer arrays can be ignored) so that a log in box makes more sense (when you *have/want* to log in you don&apos;t cancel)

confirm(&quot;text&quot; [, &quot;title [, button-names]])



As a webapp developer (mostly iphone optimized webapps) I want to be able to deliver the best user experience and standard javascript boxes doesn&apos;t fit always but because they are well integrated (and nice lookin&apos; on the iPhone) I want to keep using them.


And... a suggestion for a new popup would be a &apos;choice&apos;-box. It&apos;s like a confirm-popup but with more that 2 buttons (you can integrate it with the confirm but then it wouldn&apos;t be standard compliant anymore... i think).

like:

choice(&quot;would you like to save you&apos;re progress?&quot;, &quot;My webapp&quot;, [ &quot;Cancel&quot;, &quot;yes&quot;, no&quot;], cancel)


you specify text, title, buttons and ofcourse a default for the buttons



is this possible? or is it something that will never be supported? I would love to see these little things in the next major update (safari 5 and iphoneOS 4.0)


Thank you... and please keep me posted... I would like your opinion on my ideas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>140817</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-08-17 13:34:47 -0700</bug_when>
    <thetext>&gt; my idea is to expand:
&gt; 
&gt; alert(&quot;hello world&quot;)
&gt; 
&gt; to (note the [ and ] for optional parameters so that it stays standard
&gt; compliant):
&gt; 
&gt; alert(&quot;hello world&quot; [, &quot;title&quot; [, &quot;name of the button&quot; ]])

It&apos;s unlikely we will expand these API unilaterally without consensus from other browser vendors.  If you would like to build consensus among browser vendors for these features, I recommend you bring you ideas up to the HTML working group:

http://www.w3.org/html/wg/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>140840</commentid>
    <comment_count>4</comment_count>
    <who name="Calvin">calvinstock</who>
    <bug_when>2009-08-17 14:44:23 -0700</bug_when>
    <thetext>that was a quick reponse.

not the one i hoped for but one that i can understand... standards are good but they are slow to &apos;evolve&apos;


thx for the link</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>