Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#11511 closed defect (fixed)

support html5 data-dojo-config param for djConfig

Reported by: dante Owned by: dante
Priority: high Milestone: 1.6
Component: Core Version: 1.5
Keywords: Cc: James Burke
Blocked By: Blocking:

Description

as part of #11490 I added a one-liner to hostenv_bootstrap.js to check for a data-dojo-config="" attr in lieu of a {{djConfig}} attr, to satisfy validation. #11490 deals with the parser, which is not a djConfig thing. Filing this ticket to track this change.

Objections?

Attachments (2)

djconfig.patch (587 bytes) - added by dante 9 years ago.
fix
dojo-config.patch (8.1 KB) - added by dante 9 years ago.
updated. makes use of djConfig or dojoConfig identicial, adds unit tests. could throw deprecation warning for djConfig usage in first !== undefined check.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by dante

Attachment: djconfig.patch added

fix

comment:1 Changed 9 years ago by dante

additionally, I propose we get rid of the djConfig attr sniff, use data-dojo-config exclusively in 2.0, and still read from a potential global 'dojoConfig' object for symmetry.

comment:2 Changed 9 years ago by James Burke

+1. I wonder if we can just use data-dojo for this one too. It would mean changing the parser to scope the query on "body" to not pick up the script tag, but it does have a nice symmetry to it.

comment:3 Changed 9 years ago by dante

wadr, I think it should be 'data-dojo-config', to pair with data-dojo-type and data-dojo-props (for the parsers benefit). overload the "root" 'data-dojo' we should be using might be a bad thing in the long run. also data-dojo-config converts to dataset.dojoConfig, which is why I suggested we deprecate djConfig usage and look for window.dojoConfig as an alternative to the script elem.

Changed 9 years ago by dante

Attachment: dojo-config.patch added

updated. makes use of djConfig or dojoConfig identicial, adds unit tests. could throw deprecation warning for djConfig usage in first !== undefined check.

comment:4 Changed 9 years ago by dante

I've updated the patch on this for review. Should be ready to roll. Added unit tests to ensure djConfig remained working and tests various iterations of element-djConfig and global-djCOnfig (for both djConfig and dojoConfig)

comment:5 Changed 9 years ago by James Burke

patch is fine with me.

comment:6 Changed 9 years ago by dante

Resolution: fixed
Status: newclosed

(In [22681]) fixes #11511 - deprecate djConfig attribute and global. use dojoConfig global or data-dojo-config attribute. updates tests, adds regression test for djConfig \!strict

comment:7 Changed 9 years ago by Ben Lowery

(In [22688]) Merged revisions 22670,22679-22681 via svnmerge from https://svn.dojotoolkit.org/src/dojo/trunk

Had to merge a conflict in _base/_loader/bootstrap.js. Seemed harmless, just a whitespace / var consolidation change.

........

r22670 | jburke | 2010-08-04 00:03:14 -0400 (Wed, 04 Aug 2010) | 1 line

Refs #11510: fix issue with regexp looking like a comment for debugAtAllCosts removal.

........

r22679 | kzyp | 2010-08-05 17:21:51 -0400 (Thu, 05 Aug 2010) | 1 line

Initial commit of dojo.store.JsonRest?, a RESTful implementation of Dojo object store, refs #11537

........

r22680 | kzyp | 2010-08-05 17:35:29 -0400 (Thu, 05 Aug 2010) | 2 lines

Added ObjectStore? adapter for new object store to dojo data, refs #11537

........

r22681 | dante | 2010-08-05 18:15:33 -0400 (Thu, 05 Aug 2010) | 1 line

fixes #11511 - deprecate djConfig attribute and global. use dojoConfig global or data-dojo-config attribute. updates tests, adds regression test for djConfig \!strict

........

comment:8 Changed 8 years ago by bill

Cc: James Burke added; jrburke removed
Note: See TracTickets for help on using tickets.