Difference between revisions of "CR.url"

From Market Ruler Help
Jump to: navigation, search
Line 3: Line 3:
 
== Using CR.URL() ==
 
== Using CR.URL() ==
  
__CR.data = function (name, value) { ... }
+
When you call CR.URL() the following structure is returned (data is included as part of this example).
 
+
    {protocol: "https", host: "addresslock.com", path: "/", hash: "", query: "", …}
The '''name''' is the exact name of the variable to store and can be a string or scalar value. The '''name''' is converted to a string before usage. The '''value''' is a simple string, object, or numeric value to store. Values which are arbitrarily large (such as objects or deep structures) should be avoided as they can cause issues with servers which reject cookies which grow beyond a certain size limit.  
 
Example usage:  
 
 
 
 
     hash: ""  
 
     hash: ""  
     host: ""
+
     host: "addresslock.com"
 
     parse: ƒ (url)
 
     parse: ƒ (url)
 
     parseQuery: ƒ (q)
 
     parseQuery: ƒ (q)
     path: ""
+
     path: "/"
 
     port:  
 
     port:  
     protocol: ""
+
     protocol: "https"
 
     query: ""
 
     query: ""
     queryParams:  
+
     queryParams: undefined
 
     queryparams: {}
 
     queryparams: {}
 
     unparse: ƒ ()
 
     unparse: ƒ ()
 
     unparseQuery: ƒ ()
 
     unparseQuery: ƒ ()
     url: ""
+
     url: "https://addresslock.com/"
 
     arguments: (...)
 
     arguments: (...)
 
     caller: (...)
 
     caller: (...)
Line 36: Line 33:
  
 
== See also ==
 
== See also ==
 +
 +
* [[:Category:ConversionRuler JavaScript Functions|JavaScript Functions]]
 +
 +
Category:ConversionRuler]]
 +
Category:ConversionRuler JavaScript Functions]]

Revision as of 02:42, 23 June 2020

The __CR.URL function is a JavaScript function that parses the URL. It returns a newly created URL object representing the URL defined by the parameters.

Using CR.URL()

When you call CR.URL() the following structure is returned (data is included as part of this example).

   {protocol: "https", host: "addresslock.com", path: "/", hash: "", query: "", …}
   hash: "" 
   host: "addresslock.com"
   parse: ƒ (url)
   parseQuery: ƒ (q)
   path: "/"
   port: 
   protocol: "https"
   query: ""
   queryParams: undefined
   queryparams: {}
   unparse: ƒ ()
   unparseQuery: ƒ ()
   url: "https://addresslock.com/"
   arguments: (...)
   caller: (...)
   length: 
   name: ""
   prototype: {}
   __proto__: ƒ ()
   FunctionLocation: 
   Scopes: Scopes[]




See also

Category:ConversionRuler]] Category:ConversionRuler JavaScript Functions]]